Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restored backwards compatibility with 1.3 #1131

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

ItalyPaleAle
Copy link
Contributor

#972 accidentally introduced a backwards-incompatible change with a feature added in 1.3. Before, it was possible to specify an Azure environment for the AKV secret store by passing a FQDN as "vaultName" property that included the suffix for the Azure environment.
#972 introduced a better way to handle this (using the "azureEnvironment" metadata property), but accidentally broke the behavior added in 1.3
This patch restores full compatibility with 1.3. Although that behavior should be considered deprecated and thus discouraged (and it will be removed from docs), it will still be supported.

This should be considered a hotfix for the upcoming 1.4

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • N/A Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

dapr#972 accidentally introduced a backwards-incompatible change with a feature added in 1.3. Before, it was possible to specify an Azure environment for the AKV secret store by passing a FQDN as "vaultName" property that included the suffix for the Azure environment.
dapr#972 introduced a better way to handle this (using the "azureEnvironment" metadata property), but accidentally broke the behavior added in 1.3
This patch restores full compatibility with 1.3. Although that behavior should be considered deprecated and thus discouraged (and it will be removed from docs), it will still be supported.
@ItalyPaleAle ItalyPaleAle requested review from a team as code owners September 10, 2021 16:57
// This should be considered deprecated and users should rely the "azureEnvironment" metadata instead, but it's maintained here for backwards-compatibility
if vaultName, ok := metadata.Properties[componentVaultName]; ok {
keyVaultSuffixToEnvironment := map[string]string{
".vault.azure.net": "AZUREPUBLICCLOUD",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the list of suffixes is hardcoded here because it was in 1.3. This will support any (and all) the ones that were supported by 1.3

yaron2
yaron2 previously approved these changes Sep 10, 2021
artursouza
artursouza previously approved these changes Sep 10, 2021
@yaron2
Copy link
Member

yaron2 commented Sep 10, 2021

@ItalyPaleAle there's a small lint issue

@ItalyPaleAle ItalyPaleAle dismissed stale reviews from artursouza and yaron2 via 6cc5d52 September 10, 2021 17:34
@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #1131 (6cc5d52) into master (253ef85) will decrease coverage by 0.80%.
The diff coverage is 23.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1131      +/-   ##
==========================================
- Coverage   34.53%   33.72%   -0.81%     
==========================================
  Files         132      138       +6     
  Lines       10870    11629     +759     
==========================================
+ Hits         3754     3922     +168     
- Misses       6736     7304     +568     
- Partials      380      403      +23     
Impacted Files Coverage Δ
authentication/azure/storage.go 0.00% <0.00%> (ø)
bindings/azure/cosmosdb/cosmosdb.go 22.78% <0.00%> (-2.93%) ⬇️
bindings/azure/eventhubs/eventhubs.go 17.32% <0.00%> (-0.14%) ⬇️
...indings/azure/servicebusqueues/servicebusqueues.go 15.06% <0.00%> (-0.21%) ⬇️
bindings/gcp/bucket/bucket.go 5.71% <0.00%> (-0.17%) ⬇️
bindings/gcp/pubsub/pubsub.go 5.26% <0.00%> (-0.15%) ⬇️
bindings/influx/influx.go 10.52% <0.00%> (-0.59%) ⬇️
bindings/postgres/postgres.go 6.66% <0.00%> (-0.38%) ⬇️
pubsub/jetstream/jetstream.go 0.00% <0.00%> (ø)
pubsub/rocketmq/rocketmq.go 0.00% <ø> (ø)
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 418fc72...6cc5d52. Read the comment docs.

@yaron2 yaron2 merged commit 99c2ace into dapr:master Sep 10, 2021
artursouza pushed a commit to artursouza/components-contrib that referenced this pull request Sep 10, 2021
* Restored backwards compatibility with 1.3
dapr#972 accidentally introduced a backwards-incompatible change with a feature added in 1.3. Before, it was possible to specify an Azure environment for the AKV secret store by passing a FQDN as "vaultName" property that included the suffix for the Azure environment.
dapr#972 introduced a better way to handle this (using the "azureEnvironment" metadata property), but accidentally broke the behavior added in 1.3
This patch restores full compatibility with 1.3. Although that behavior should be considered deprecated and thus discouraged (and it will be removed from docs), it will still be supported.

* Lint
artursouza added a commit that referenced this pull request Sep 10, 2021
* Restored backwards compatibility with 1.3
#972 accidentally introduced a backwards-incompatible change with a feature added in 1.3. Before, it was possible to specify an Azure environment for the AKV secret store by passing a FQDN as "vaultName" property that included the suffix for the Azure environment.
#972 introduced a better way to handle this (using the "azureEnvironment" metadata property), but accidentally broke the behavior added in 1.3
This patch restores full compatibility with 1.3. Although that behavior should be considered deprecated and thus discouraged (and it will be removed from docs), it will still be supported.

* Lint

Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
amimimor pushed a commit to amimimor/components-contrib that referenced this pull request Dec 9, 2021
* Restored backwards compatibility with 1.3
dapr#972 accidentally introduced a backwards-incompatible change with a feature added in 1.3. Before, it was possible to specify an Azure environment for the AKV secret store by passing a FQDN as "vaultName" property that included the suffix for the Azure environment.
dapr#972 introduced a better way to handle this (using the "azureEnvironment" metadata property), but accidentally broke the behavior added in 1.3
This patch restores full compatibility with 1.3. Although that behavior should be considered deprecated and thus discouraged (and it will be removed from docs), it will still be supported.

* Lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants