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

Updated to document breaking changes #762

Merged

Conversation

MaryanneNjeri
Copy link
Contributor

This PR updates the AzureDevOpsPushPipelineExtenstion.md and documents importing feature flag breaking change
GitHub issue #760

@@ -3,7 +3,15 @@ Azure App Configuration Push extension for Azure DevOps pipeline can be installe
![sample](pictures/AzureDevOpsPushExtensionVersionSample.PNG)

### v5.0.0 - February, 02 2023
Updated the task to require Node.js 16. It previously required 10
* Updated the task to require Node.js 16. It previously required 10
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, updated to document the breaking change.

Import feature flags to store by specifying the content type as “application/vnd.microsoft.appconfig.ff+json;charset=utf-8 ” and specifying the prefix as “.appconfig.featureflag/”.

**After**:
Import feature flags to store by specifying the prefix as “.appconfig.featureflag/” is not supported and it will be treated as key-value. To import feature flags please follow [feature management schema](https://github.com/microsoft/FeatureManagement-Dotnet/blob/release/v3/docs/schemas/FeatureManagement.v1.0.0.json).
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it true? I thought it was prohibited.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry my bad, it's prohibited, we throw an error to let user know.

@MaryanneNjeri MaryanneNjeri changed the title Updated to document importing feature flag breaking change Updated to document breaking changes Jun 6, 2023
* **Breaking change**:

**Before**:
Import feature flags to store by specifying the content type as “application/vnd.microsoft.appconfig.ff+json;charset=utf-8 ” and specifying the prefix as “.appconfig.featureflag/”.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extra whitespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated and removed extra whitespace

**After**:
[Azure Pipeline agent version 2.206.1](https://github.com/microsoft/azure-pipelines-agent/releases/tag/v2.206.1) or later.

* **Breaking change**:
Copy link
Member

Choose a reason for hiding this comment

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

I'd recommend having a single breaking changes section with bullet points below of the breaking changes.

Breaking Changes

  • Updated the task to require Node.js 16. It previously required 10.
  • Updated the minimum supported agent version to 2.206.1. Previously it was 2.144.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to have a single breaking changes section with bullet points.
To confirm for the Pull task since we only document one breaking change ie on the Node js upgrade, we don't need to have it in bullet points and can have the before and after sections?


* **Breaking change**:

**Before**:
Copy link
Member

Choose a reason for hiding this comment

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

The before and after is a bit hard to follow. I'd like if we can be a bit more direct on what's broken since these are often used for reference. It sounds like maybe it should be:

  • Feature flag import now requires adherence to the feature management schema. Settings with feature flag prefix and content type will fail to import.

A follow up question here. Why did this break?

Copy link
Contributor Author

@MaryanneNjeri MaryanneNjeri Aug 1, 2023

Choose a reason for hiding this comment

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

Updated to have the Breaking changes with bullet points and removed the before and after.

Copy link
Contributor Author

@MaryanneNjeri MaryanneNjeri Aug 1, 2023

Choose a reason for hiding this comment

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

In version 5 of the Push task, we integrated with the sync lib, which tries to have the import behavior consistent with the CLI, the CLI logs a warning on Ignoring the key when importing kvs, and key starts with feature flag prefix, https://github.com/Azure/azure-cli/blob/fde406f3aa731d33e08ef7a77404b25f10f3b559/src/azure-cli/azure/cli/command_modules/appconfig/_kv_helpers.py#L108

Copy link
Member

Choose a reason for hiding this comment

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

The CLI logs a warning, yet this fails outright? Doesn't seem like consistent behavior.

Copy link
Contributor Author

@MaryanneNjeri MaryanneNjeri Aug 3, 2023

Choose a reason for hiding this comment

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

Since Sync client lib doesn't take a logger object, all warnings are treated as errors in the Sync lib. Though I remember on the Sync client lib road map we plan to support a common logger object Pull Request 7654083: Add custom logger support

Copy link
Member

Choose a reason for hiding this comment

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

The portal doesn't allow creation of feature flags as raw KVs.

Push task doesn't allow it (our current discussion)

but CLI does allow it.

I think first we need to align on what we want the behavior to be across all client side tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Portal supports importing configurations from a file and specifying the prefix as ".appconfig.featureflag/" and content type "application/vnd.microsoft.appconfig.ff+json;charset=utf-8"

Copy link
Member

Choose a reason for hiding this comment

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

But the portal doesn't allow that in the individual kv create flow. Right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes right

**Breaking Changes**
- Updated the task to require Node.js 16. It previously required 10.
- Updated the minimum supported azure pipeline agent version to [2.206.1](https://github.com/microsoft/azure-pipelines-agent/releases/tag/v2.206.1) or later. Previously it was [2.144.0](https://github.com/microsoft/azure-pipelines-agent/releases/tag/v2.144.0).
- Importing key vault references value as an escaped json strings is not supported, please specify the key vault reference value as a json object.
Copy link
Member

Choose a reason for hiding this comment

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

This is a change for all files using application/json content type right, not just kv set? If so, we'll want to call that out.

Also, may help to provide a snippet of what has changed.

Something like

Before when you had this

bla bla

you got this

bla bla bla

Now, the input needs to be

bla bla bla

Copy link
Contributor Author

@MaryanneNjeri MaryanneNjeri Oct 13, 2023

Choose a reason for hiding this comment

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

It only applies for default content profile, using application/json content type.
How about something like :
"Importing configurations with values as escaped json strings and the content type "application/json" is no longer supported. Please specify value as a json object."

Before

{  
  "app": "{\"uri\":\"https://keyvault.vault.azure.net/secrets/secret\"}"
}

Results:

Key Value
app {"uri":"https://keyvault.vault.azure.net/secrets/secret"}

After

{  
  "app": {
      "uri": "https://keyvault.vault.azure.net/secrets/secret " 
     }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking since the breaking change is in relation to importing configurations, we can show the before and after of the snipped that has changed and skip showing the results

Copy link
Member

Choose a reason for hiding this comment

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

How about something like :
"Importing configurations with values as escaped json strings and the content type "application/json" is no longer supported. Please specify value as a json object."

I would avoid the phrase "is no longer supported." It's not that we removed support but rather we changed the behavior. We now convert the values of properties in the settings to json strings.

I was thinking since the breaking change is in relation to importing configurations, we can show the before and after of the snipped that has changed and skip showing the results

Sounds reasonable. But, I would include the content type that goes with the associated input snippet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would avoid the phrase "is no longer supported." It's not that we removed support but rather we changed the behavior. We now convert the values of properties in the settings to json strings.

Yes good point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been updated thanks


```

- Feature flag import now requires adherence to the [feature management schema](https://github.com/microsoft/FeatureManagement-Dotnet/blob/release/v3/docs/schemas/FeatureManagement.v1.0.0.json). Settings with feature flag prefix and content type will fail to import
Copy link

@bbrandt bbrandt Oct 16, 2023

Choose a reason for hiding this comment

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

Does specifying the feature flags as the feature management schema for import then get converted to the App Config service feature flag prefix (.appconfig.featureflag/) and content type for feature flags by the extension or the app config service? So that the imported feature flags appear in the Feature Manager view alongside feature flags manually created in the portal?

Address comments

Co-authored-by: Jimmy Campbell <[email protected]>
@MaryanneNjeri MaryanneNjeri merged commit e4ea04b into Azure:main Oct 16, 2023
1 check passed
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

5 participants