diff --git a/src/ApiService/ApiService/Functions/ValidateScriban.cs b/src/ApiService/ApiService/Functions/ValidateScriban.cs index d32f70b52..64bb73a33 100644 --- a/src/ApiService/ApiService/Functions/ValidateScriban.cs +++ b/src/ApiService/ApiService/Functions/ValidateScriban.cs @@ -139,6 +139,7 @@ public class ValidateScriban { reportContainer, reportFileName, report, + _log, task, job, targetUrl, diff --git a/src/ApiService/ApiService/onefuzzlib/notifications/Ado.cs b/src/ApiService/ApiService/onefuzzlib/notifications/Ado.cs index dd193b588..facbb00fe 100644 --- a/src/ApiService/ApiService/onefuzzlib/notifications/Ado.cs +++ b/src/ApiService/ApiService/onefuzzlib/notifications/Ado.cs @@ -69,7 +69,7 @@ public class Ado : NotificationsBase, IAdo { private readonly Uri _instanceUrl; private readonly ILogTracer _logTracer; public static async Async.Task AdoConnectorCreator(IOnefuzzContext context, Container container, string filename, AdoTemplate config, Report report, ILogTracer logTracer, Renderer? renderer = null) { - renderer ??= await Renderer.ConstructRenderer(context, container, filename, report); + renderer ??= await Renderer.ConstructRenderer(context, container, filename, report, logTracer); var instanceUrl = context.Creds.GetInstanceUrl(); var project = await renderer.Render(config.Project, instanceUrl); diff --git a/src/ApiService/ApiService/onefuzzlib/notifications/GithubIssues.cs b/src/ApiService/ApiService/onefuzzlib/notifications/GithubIssues.cs index 46f9f21ca..0a8dc696c 100644 --- a/src/ApiService/ApiService/onefuzzlib/notifications/GithubIssues.cs +++ b/src/ApiService/ApiService/onefuzzlib/notifications/GithubIssues.cs @@ -31,7 +31,7 @@ public class GithubIssues : NotificationsBase, IGithubIssues { } private async Async.Task Process(GithubIssuesTemplate config, Container container, string filename, Report report) { - var renderer = await Renderer.ConstructRenderer(_context, container, filename, report); + var renderer = await Renderer.ConstructRenderer(_context, container, filename, report, _logTracer); var handler = await GithubConnnector.GithubConnnectorCreator(config, container, filename, renderer, _context.Creds.GetInstanceUrl(), _context, _logTracer); await handler.Process(); } diff --git a/src/ApiService/ApiService/onefuzzlib/notifications/NotificationsBase.cs b/src/ApiService/ApiService/onefuzzlib/notifications/NotificationsBase.cs index ba416ed84..4956746ad 100644 --- a/src/ApiService/ApiService/onefuzzlib/notifications/NotificationsBase.cs +++ b/src/ApiService/ApiService/onefuzzlib/notifications/NotificationsBase.cs @@ -48,6 +48,7 @@ public abstract class NotificationsBase { Container container, string filename, Report report, + ILogTracer log, Task? task = null, Job? job = null, Uri? targetUrl = null, @@ -76,7 +77,10 @@ public abstract class NotificationsBase { } await context.ConfigurationRefresher.TryRefreshAsync().IgnoreResult(); - var scribanOnly = scribanOnlyOverride ?? await context.FeatureManagerSnapshot.IsEnabledAsync(FeatureFlagConstants.EnableScribanOnly); + var scribanOnlyFeatureFlag = await context.FeatureManagerSnapshot.IsEnabledAsync(FeatureFlagConstants.EnableScribanOnly); + log.Info($"ScribanOnlyFeatureFlag: {scribanOnlyFeatureFlag}"); + + var scribanOnly = scribanOnlyOverride ?? scribanOnlyFeatureFlag; return new Renderer( container, diff --git a/src/deployment/bicep-templates/feature-flags.bicep b/src/deployment/bicep-templates/feature-flags.bicep index 49742cd72..a7cf53474 100644 --- a/src/deployment/bicep-templates/feature-flags.bicep +++ b/src/deployment/bicep-templates/feature-flags.bicep @@ -6,9 +6,22 @@ var appConfigName = 'app-config-${suffix}' resource featureFlags 'Microsoft.AppConfiguration/configurationStores@2022-05-01' = { name: appConfigName location: location - sku:{ + sku: { name: 'standard' } } +resource configStoreFeatureflag 'Microsoft.AppConfiguration/configurationStores/keyValues@2021-10-01-preview' = { + parent: featureFlags + name: '.appconfig.featureflag~2FEnableScribanOnly' + properties: { + value: string({ + id: 'EnableScribanOnly' + description: 'Render notification templates with scriban only' + enabled: true + }) + contentType: 'application/vnd.microsoft.appconfig.ff+json;charset=utf-8' + } +} + output AppConfigEndpoint string = 'https://${appConfigName}.azconfig.io'