Skip to content

Commit 4c98ce5

Browse files
3.1 preview1 (#276)
* Rev to 3.1 * Semver update - Allow differing minor versions between packages. * pipeline update * Do a preview release first. * Show pipeline as a solution file.
1 parent 2565cb8 commit 4c98ce5

8 files changed

+47
-7
lines changed

MicrosoftConfigurationBuilders.sln

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "test\Microsoft.Conf
3737
EndProject
3838
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{91E7BC05-1980-48F2-B3F4-CE56EB3D114F}"
3939
ProjectSection(SolutionItems) = preProject
40+
azure-pipeline\azure-pipeline.yml = azure-pipeline\azure-pipeline.yml
4041
tools\MicrosoftConfigurationBuilders.settings.targets = tools\MicrosoftConfigurationBuilders.settings.targets
4142
README.md = README.md
4243
EndProjectSection

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ For more information about Configuration Builders and the features and builders
1414

1515

1616
<a name="updates"></a>
17+
### V3.1 Updates:
18+
* Added Snapshot capabilities to the [`AzureAppConfigurationBuilder`](docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder).
19+
* Added ability to provide "[default values](docs/KeyValueConfigBuilders.md#tokenPattern)" in `Token` mode.
20+
* Fixed bug with rooted-paths and `Utils.MapPath` in ASP.Net scenarios.
21+
* Fixed `GetCredential()` and related option-overload issues in [`AzureAppConfigurationBuilder`](docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder).
22+
* Auth failures are "optional" for [Azure Config Builders](docs/KeyValueConfigBuilders.md#azure-config-builders).
23+
* Fixed [`AzureAppConfigurationBuilder`](docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder) bug with key filters in `Strict` mode.
24+
1725
### V3 Updates:
1826
* :warning: ***Breaking Change*** - `Expand` mode is gone. It has been [replaced by `Token` mode](docs/KeyValueConfigBuilders.md#mode).
1927
* `Utils.MapPath` - This was somewhat broken in ASP.Net scenarios previously. It should now reliably go against `Server.MapPath()` in ASP.Net scenarios. It has also been updated to fall back against the directory of the config file being processed when resolving the app root in the case of a `Configuration` object being created by `ConfigurationManager.OpenConfiguration*` API's rather than being part of a fully-initialized runtime configuration stack.

azure-pipeline/azure-pipeline.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ extends:
157157
displayName: Verify Signed Packages
158158
inputs:
159159
TargetFolder: $(Build.SourcesDirectory)\.binaries\verify\packages
160-
WhiteListPathForCerts: tools/.verif.whitelist
160+
WhiteListPathForCerts: $(Build.SourcesDirectory)\tools\.verif.whitelist
161161
ExcludeFolders: .git MicroBuild decomp *.xml
162162
# Following article on https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline
163163
# No longer need the old format, and following guideline to use (ApiScanClientId)
164164
- task: APIScan@2
165165
displayName: Run APIScan
166166
inputs:
167167
softwareFolder: '$(Build.SourcesDirectory)\.binaries\verify\dlls'
168-
softwareName: 'Microsoft.Configuration.ConfigurationBuilders.*'
168+
softwareName: 'Microsoft.Configuration.ConfigurationBuilders'
169169
softwareVersionNum: '*'
170170
softwareBuildNum: '$(Build.BuildId)'
171171
symbolsFolder: '$(Build.SourcesDirectory)\.binaries\bin\Release;SRV*http://symweb'

docs/KeyValueConfigBuilders.md

+4
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ In a similar vein to `GetCredential()`, builders who need finer control over the
152152
<add name="AzureAppConfig"
153153
[@mode|@enabled="enabled"|@charMap|@prefix|@stripPrefix|tokenPattern|@escapeExpandedValues]
154154
(@endpoint="https://your-appconfig-store.azconfig.io" | <del>@connectionString="Endpoint=https://your-appconfig-store.azconfig.io;Id=XXXXXXXXXX;Secret=XXXXXXXXXX"</del>)
155+
[@snapshot="string"]
155156
[@keyFilter="string"]
156157
[@labelFilter="label"]
157158
[@acceptDateTime="DateTimeOffset"]
158159
[@useAzureKeyVault="bool"]
160+
[@preloadValues="bool"]
159161
type="Microsoft.Configuration.ConfigurationBuilders.AzureAppConfigurationBuilder, Microsoft.Configuration.ConfigurationBuilders.AzureAppConfiguration" />
160162
```
161163
> :information_source: **NOTE:**
@@ -164,12 +166,14 @@ In a similar vein to `GetCredential()`, builders who need finer control over the
164166
[AppConfiguration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview) is a new offering from Azure. If you wish to use this new service for managing your configuration, then use this AzureAppConfigurationBuilder. Either `endpoint` or `connectionString` are required, but all other attributes are optional. If both `endpoint` and `connectionString` are used, then preference is given to the connection string.
165167
* `endpoint` - This specifies the AppConfiguration store to connect to.
166168
* ~~`connectionString`~~ - The recommendation is to use `endpoint` in conjunction with [DefaultAzureCredential](#azure-config-builders). ~~This specifies the AppConfiguration store to connect to, along with the Id and Secret necessary to access the service. Be careful not to expose any secrets in your code, repos, or App Configuration stores if you use this method for connecting.~~
169+
* `snapshot` - Use this attribute to draw configuration values from the specific AppConfig snapshot named by the value of this attribute. **Setting this attribute will cause `keyFilter`, `labelFilter`, and `acceptDateTime` to be silently ignored.**
167170
* `keyFilter` - Use this to select a set of configuration values matching a certain key pattern.
168171
> :information_source: NOTE:
169172
> This filter is conceptually similar to the `prefix` attribute, but this filter is handled by the AppConfiguration service on the server side, whereas `prefix` filtering is done directly by the config builder in the application. They achieve the same goal through different mechanisms which have tradeoffs and merits according to the situation.
170173
* `labelFilter` - Only retrieve configuration values that match a certain label.
171174
* `acceptDateTime` - Instead of versioning ala Azure Key Vault, AppConfiguration uses timestamps. Use this attribute to go back in time to retrieve configuration values from a past state.
172175
* `useAzureKeyVault` - Enable this feature to allow AzureAppConfigurationBuilder to connect to and retrieve secrets from Azure Key Vault for config values that are stored in Key Vault. The same managed service identity that is used for connecting to the AppConfiguration service will be used to connect to Key Vault. The Key Vault uri is retrieved as part of the data from AppConfiguration and does not need to be specified here. Default is `false`.
176+
* `preloadValues` - Enable this feature to have the builder pre-load all values from the AppConfiguration store into memory. Essentially the same as a 'Greedy' mode fetch of config values from the AppConfig store - but without dumping them all into the working config section.If you have a large cache of config values, or you have some values (that match key and label filters) that you don't want to pull into application memory - even if they don't get applied to existing config entries - then disable this. Otherwise, it is `true` by default because fetching as many config values as possible in one request is a much more scalable design and will help applications avoid throttling on the service end.
173177

174178
#### AzureKeyVaultConfigBuilder
175179
```xml

src/packages/assets/Readme-Azure.md

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ __Tip:__ To use versioned secrets, it is _not_ recommended to use the `version`
2626
</appSettings>
2727
```
2828

29+
### V3.1 Updates:
30+
* Auth failures are "optional" for [Azure Config Builders](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azure-config-builders).
31+
2932
### V3 Updates:
3033
A more complete list of updates [lives here](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/README.md#v3-updates). These are the ones most relevant to this builder:
3134
* :warning: ***Breaking Change*** - `Expand` mode is gone. It has been [replaced by `Token` mode](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#mode).

src/packages/assets/Readme-AzureAppConfig.md

+11
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ The basic usage of this builder is given below. Parameters inside `[]`s are opti
88
<add name="AzureAppConfig"
99
[@mode|@enabled="enabled"|@charMap|@prefix|@stripPrefix|tokenPattern|@escapeExpandedValues]
1010
(@endpoint="https://your-appconfig-store.azconfig.io" | @connectionString="Endpoint=https://your-appconfig-store.azconfig.io;Id=XXXXXXXXXX;Secret=XXXXXXXXXX")
11+
[@snapshot="string"]
1112
[@keyFilter="string"]
1213
[@labelFilter="label"]
1314
[@acceptDateTime="DateTimeOffset"]
1415
[@useAzureKeyVault="bool"]
16+
[@preloadValues="bool"]
1517
type="Microsoft.Configuration.ConfigurationBuilders.AzureAppConfigurationBuilder, Microsoft.Configuration.ConfigurationBuilders.AzureAppConfiguration" />
1618
```
1719
>:information_source: [NOTE]
@@ -20,10 +22,19 @@ The basic usage of this builder is given below. Parameters inside `[]`s are opti
2022
2123
* `endpoint` - This specifies the AppConfiguration store to connect to.
2224
* `connectionString` - The recommendation is to use `endpoint`. ~~This specifies the AppConfiguration store to connect to, along with the Id and Secret necessary to access the service. Be carefulnot to expose any secrets in your code, repos, or App Configuration stores if you use this method for connecting.~~
25+
* `snapshot` - Use this attribute to draw configuration values from the specific AppConfig snapshot named by the value of this attribute. **Setting this attribute will cause `keyFilter`, `labelFilter`, and `acceptDateTime` to be silently ignored.**
2326
* `keyFilter` - Use this to select a set of configuration values matching a certain key pattern.
2427
* `labelFilter` - Only retrieve configuration values that match a certain label.
2528
* `acceptDateTime` - Instead of versioning ala Azure Key Vault, AppConfiguration uses timestamps. Use this attribute to go back in time to retrieve configuration values from a past state.
2629
* `useAzureKeyVault` - Enable this feature to allow AzureAppConfigurationBuilder to connect to and retrieve secrets from Azure Key Vault for config values that are stored in Key Vault. The same managed service identity that is used for connecting to the AppConfiguration service will be used to connect to Key Vault. The Key Vault uri is retrieved as part of the data from AppConfiguration and does not need to be specific here. Default is `false`.
30+
* `preloadValues` - Enable this feature to have the builder pre-load all values from the AppConfiguration store into memory. Essentially the same as a 'Greedy' mode fetch of config values from the AppConfig store - but without dumping them all into the working config section.If you have a large cache of config values, or you have some values (that match key and label filters) that you don't want to pull into application memory - even if they don't get applied to existing config entries - then disable this. Otherwise, it is `true` by default because fetching as many config values as possible in one request is a much more scalable design and will help applications avoid throttling on the service end.
31+
32+
### V3.1 Updates:
33+
* Added Snapshot capabilities.
34+
* Added preloading all values - on by default.
35+
* Fixed `GetCredential()` and related option-overload issues.
36+
* Auth failures are "optional" for [Azure Config Builders](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azure-config-builders).
37+
* Fixed bug with key filters in `Strict` mode.
2738

2839
### V3 Updates:
2940
A more complete list of updates [lives here](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/README.md#v3-updates). These are the ones most relevant to this builder:

src/packages/assets/Readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ The set of builders produced here are styled as "Key/Value Config Builders." The
99
For more information about the builders featured in this project, to report bugs, or submit contributions, please refer to the github project page for [MicrosoftConfigurationBuilders](https://github.com/aspnet/MicrosoftConfigurationBuilders/).
1010

1111

12+
### V3.1 Updates:
13+
* Added Snapshot capabilities to the [`AzureAppConfigurationBuilder`](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder).
14+
* Added ability to provide "[default values](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#tokenPattern)" in `Token` mode.
15+
* Fixed bug with rooted-paths and `Utils.MapPath` in ASP.Net scenarios.
16+
* Fixed `GetCredential()` and related option-overload issues in [`AzureAppConfigurationBuilder`](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder).
17+
* Auth failures are "optional" for [Azure Config Builders](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azure-config-builders).
18+
* Fixed [`AzureAppConfigurationBuilder`](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#azureappconfigurationbuilder) bug with key filters in `Strict` mode.
19+
1220
### V3 Updates:
1321
* :warning: ***Breaking Change*** - `Expand` mode is gone. It has been [replaced by `Token` mode](https://github.com/aspnet/MicrosoftConfigurationBuilders/blob/main/docs/KeyValueConfigBuilders.md#mode).
1422
* `Utils.MapPath` - This was somewhat broken in ASP.Net scenarios previously. It should now reliably go against `Server.MapPath()` in ASP.Net scenarios. It has also been updated to fall back against the directory of the config file being processed when resolving the app root in the case of a `Configuration` object being created by `ConfigurationManager.OpenConfiguration*` API's rather than being part of a fully-initialized runtime configuration stack.

tools/MicrosoftConfigurationBuilders.settings.targets

+10-5
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,28 @@
2323
Release: Third for Info and Package.
2424
Update package and file without touching assembly, except for major releases.
2525
-->
26-
<BuildQuality Condition="'$(BuildQuality)' == ''">rtm</BuildQuality>
27-
<VersionStartYear>2022</VersionStartYear>
26+
<BuildQuality Condition="'$(BuildQuality)' == ''">preview1</BuildQuality>
27+
<VersionStartYear>2025</VersionStartYear>
2828
<!-- Update version in config.xdt's for major/minor changes. (Don't update for 'release' changes.) -->
2929
<VersionMajor>3</VersionMajor>
30-
<VersionMinor>0</VersionMinor>
30+
<!-- Minor versions can differ within a major release according to semver. Use 'Contains' here to catch the main project and the package project. -->
31+
<VersionMinor Condition="'$(VersionMinor)' == '' AND $(MSBuildProjectName.Contains('AzureAppConfig'))">1</VersionMinor>
32+
<VersionMinor Condition="'$(VersionMinor)' == '' AND $(MSBuildProjectName.Contains('Azure'))">1</VersionMinor>
33+
<VersionMinor Condition="'$(VersionMinor)' == '' AND $(MSBuildProjectName.Contains('Base'))">1</VersionMinor>
34+
<VersionMinor Condition="'$(VersionMinor)' == '' AND $(MSBuildProjectName.Contains('Json'))">1</VersionMinor>
35+
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
3136
<VersionRevision>0</VersionRevision>
3237
<VersionRelease>0</VersionRelease>
3338
<VersionBuild Condition="'$(VersionBuild)' == '' OR '$(VersionBuild)' == '0'">$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))</VersionBuild>
3439
<NuGetPackageVersion>$(VersionMajor).$(VersionMinor).$(VersionRelease)</NuGetPackageVersion>
35-
<NuGetPackageBaseDependencyVersion>$(VersionMajor).$(VersionMinor).$(VersionRelease)</NuGetPackageBaseDependencyVersion>
40+
<NuGetPackageBaseDependencyVersion>"$(VersionMajor).0.0"</NuGetPackageBaseDependencyVersion> <!-- SemVer proposes that non-major updates should be backward compatible. -->
3641
</PropertyGroup>
3742

3843
<!-- Add release type for non-RTM releases. -->
3944
<PropertyGroup Label="Prerelease version adjustments" Condition="'$(BuildQuality)' != 'rtm'">
4045
<VersionRelease>$(VersionRelease)-$(BuildQuality)</VersionRelease>
4146
<NuGetPackageVersion>$(NuGetPackageVersion)-$(BuildQuality)</NuGetPackageVersion>
42-
<NuGetPackageBaseDependencyVersion>$(NuGetPackageBaseDependencyVersion)-$(BuildQuality)</NuGetPackageBaseDependencyVersion>
47+
<NuGetPackageBaseDependencyVersion>$(VersionMajor).$(VersionMinor).$(VersionRelease)-$(BuildQuality)</NuGetPackageBaseDependencyVersion> <!-- Bend SemVer guidelines for preview releases. -->
4348
</PropertyGroup>
4449

4550
<!-- Additionaly, add date stamp to 'preview' releases. -->

0 commit comments

Comments
 (0)