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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 馃挕 Use validator to validate or default deployment #4188

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

yuwzho
Copy link
Contributor

@yuwzho yuwzho commented Dec 3, 2021

In most secenarios under az spring-cloud app, it can accept a
parameter deployment. If the deployment is set, the command will update apps/deployments resource. Otherwise, it will look for one deployment under the app meets deployment.properties.active = true to be operated.
In today's code, each command handle such logic to fetch or use default value. This PR abstract this logic to validator, and make custom command can be focus on the operation logic


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

In most secenarios under `az spring-cloud app`, it can accept a
parameter deployment. If the deployment is set, the command will update
apps/deployments resource. Otherwise, it will look for one deployment
under the app meets deployment.properties.active = true to be operated.
In today's code, each command handle such logic to fetch or use default
value. This PR abstract this logic to validator, and make custom command
can be focus on the operation logic
@zhoxing-ms
Copy link
Contributor

LGTM. By the way, may I ask do we need to write the description of this change into HISTORY.rst and update the setup.py to release a new version

@yuwzho
Copy link
Contributor Author

yuwzho commented Dec 3, 2021

LGTM. By the way, may I ask do we need to write the description of this change into HISTORY.rst and update the setup.py to release a new version

No, it is not a fix or feature. Will be shipped with coming features.

@zhoxing-ms zhoxing-ms merged commit a5bd1c5 into Azure:main Dec 3, 2021
@yuwzho yuwzho deleted the yuwzho/validate-active-deployment branch December 3, 2021 08:27
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