Skip to content

Commit 28f3245

Browse files
committed
fix comment, improve performance
1 parent b262d58 commit 28f3245

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Config/ObjectModel/RuntimeConfig.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,12 @@ public RuntimeConfig(
353353
// This loader is not used as a part of hot reload and therefore does not need a handler.
354354
FileSystemRuntimeConfigLoader loader = new(fileSystem, handler: null);
355355

356+
// Pass the parent's AKV options so @akv() references in child configs can
357+
// be resolved using the parent's Key Vault configuration.
358+
DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: this.AzureKeyVault, doReplaceEnvVar: true, doReplaceAkvVar: true);
359+
356360
foreach (string dataSourceFile in DataSourceFiles.SourceFiles)
357361
{
358-
// Pass the parent's AKV options so @akv() references in child configs can
359-
// be resolved using the parent's Key Vault configuration.
360-
DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: this.AzureKeyVault, doReplaceEnvVar: true, doReplaceAkvVar: true);
361362

362363
if (loader.TryLoadConfig(dataSourceFile, out RuntimeConfig? config, replacementSettings: replacementSettings))
363364
{

src/Service.Tests/Configuration/RuntimeConfigLoaderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public async Task CanLoadValidMultiSourceConfigWithAutoentities(string configPat
137137
/// Validates that when a parent config has azure-key-vault options configured,
138138
/// child configs can resolve @akv('...') references using the parent's AKV configuration.
139139
/// Uses a local .akv file to simulate Azure Key Vault without requiring a real vault.
140-
/// Regression test for https://github.com/Azure/data-api-builder/issues/3271
140+
/// Regression test for https://github.com/Azure/data-api-builder/issues/3322
141141
/// </summary>
142142
[TestMethod]
143143
public async Task ChildConfigResolvesAkvReferencesFromParentAkvOptions()

0 commit comments

Comments
 (0)