fix(cssc): 31694592 Added validations to ensure dry run and run immediately options are mutually exclusive#33
Merged
Conversation
… be used together
There was a problem hiding this comment.
Pull Request Overview
This PR adds validations to enforce that the --dryrun and --run-immediately options cannot be used together, addressing bug 31694592.
- Updated validate_inputs to accept dryrun and run_immediately parameters and added a new validate_run_type function.
- Enhanced tests in test_validators.py to cover the new validation scenarios.
- Modified cssc.py to pass the new parameters during the continuous patch operation validation.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/acrcssc/azext_acrcssc/_validators.py | Added dryrun/run_immediately parameters to validate_inputs and defined validate_run_type. |
| src/acrcssc/azext_acrcssc/tests/latest/test_validators.py | Introduced unit tests for validate_run_type. |
| src/acrcssc/azext_acrcssc/cssc.py | Updated call to validate_inputs to include the new parameters. |
cegraybl
approved these changes
Mar 12, 2025
cegraybl
pushed a commit
that referenced
this pull request
Apr 23, 2025
…iately options are mutually exclusive (#33) Added validation to ensure that the `--dryrun` and `--run-immediately` options cannot be used together both during create and update. Also added unit tests for this scenario to ensure the validation works as expected. Bug - https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694592/?view=edit After fix:  Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
cegraybl
pushed a commit
that referenced
this pull request
Apr 24, 2025
…iately options are mutually exclusive (#33) Added validation to ensure that the `--dryrun` and `--run-immediately` options cannot be used together both during create and update. Also added unit tests for this scenario to ensure the validation works as expected. Bug - https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694592/?view=edit After fix:  Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added validation to ensure that the
--dryrunand--run-immediatelyoptions cannot be used together both during create and update.Also added unit tests for this scenario to ensure the validation works as expected.
Bug - https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694592/?view=edit
After fix:
