-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Appconfig] consistency check #19281
[Appconfig] consistency check #19281
Conversation
/azp run python - appconfiguration - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - appconfiguration - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
...onfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py
Outdated
Show resolved
Hide resolved
...onfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py
Outdated
Show resolved
Hide resolved
...onfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py
Outdated
Show resolved
Hide resolved
except (ValueError, JSONDecodeError): | ||
pass | ||
|
||
return cls( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If value is malformed, we will lost it?
self.value = {} | ||
def value(self): | ||
if self.enabled is None and self.filters is None: | ||
return self._value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we cache the value instead of re-generating it every time?
How can we know if enabled or filters changed or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this. We have to store value in case the value is set to malformed json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if value is malformed, is it still a FeaFlagConfigSetting?
What's the behavior of filters.setter if it is malformed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user is setting value
, they lose all protections, we assume they know what they are doing. If the value is malformed and then a user sets filters, the filters will be lost. The only way to get a malformed json is by setting value directly and in that case we assume the customer understands what they are doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we need another variable to store if it is malformed.
Or how can we track filters is modified or not?
…into appconfig-consistency
…into appconfig-consistency
* adding docstrings for displayname and description * changing key -> feature_id * fixing up secret reference for consistency * pylint fix * updates to clients * fixing tests * updates to clients * changing base_url -> endpoint * undoing changes to generated * adding changelog * updating changelog, enabled is kwarg * lint fixes * formatting * using key instead of feature_id * feature_id strips key prefix * working for sync * removing if conditional on delete * doc and typehint * adding delete overload to async * fixing tests * adding back label to not be breaking * non breaking for delete * undoing breaking change * undoing rename of endpoint * undoing more breaking changes * fixing up a couple more * one more removal * changelog * fixing breaking change * secret reference issue, breaking change fixed * pylint and mypy fixes * more of xiangs feedback * fixing key and feature_id * working with xiang * fixed secref * fixed feature flag * fixed feature filter tests * mypy and pylint fixes * updating tests * fixes * remove overload * fixing changelog * fixing docstrings * fixing attribute map * fixing for py2.7 * mypy, pylint, and py2.7 fixes * pylint fix * renaming * testing typeerror * value property instead of enabled and filters * fixing value configuring * fixing tests for only value @Property on featflag * working for secref * pylint and mypy fixes * test fix * cleaning up * xiangs comment * patching storage stuff * fixing value property * to generated update
remove global config (Azure#19281)
No description provided.