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

[Appconfig] consistency check #19281

Merged
merged 66 commits into from
Jun 30, 2021

Conversation

seankane-msft
Copy link
Member

@seankane-msft seankane-msft commented Jun 16, 2021

No description provided.

@seankane-msft seankane-msft added the App Configuration Azure.ApplicationModel.Configuration label Jun 16, 2021
@seankane-msft seankane-msft self-assigned this Jun 16, 2021
@seankane-msft
Copy link
Member Author

/azp run python - appconfiguration - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@seankane-msft
Copy link
Member Author

/azp run python - appconfiguration - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@seankane-msft seankane-msft linked an issue Jun 16, 2021 that may be closed by this pull request
@check-enforcer
Copy link

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:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

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:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

except (ValueError, JSONDecodeError):
pass

return cls(
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

@seankane-msft seankane-msft merged commit 589d8c8 into Azure:main Jun 30, 2021
@seankane-msft seankane-msft deleted the appconfig-consistency branch June 30, 2021 20:41
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Jul 16, 2021
* 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
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AppConfig] Consistency updates
2 participants