Skip to content

fix(cssc): 31694592 Added validations to ensure dry run and run immediately options are mutually exclusive#33

Merged
Ruchii-27 merged 1 commit into
feature/cssc_extfrom
ruchi/FixDryRunAndRunImmediately
Mar 12, 2025
Merged

fix(cssc): 31694592 Added validations to ensure dry run and run immediately options are mutually exclusive#33
Ruchii-27 merged 1 commit into
feature/cssc_extfrom
ruchi/FixDryRunAndRunImmediately

Conversation

@Ruchii-27
Copy link
Copy Markdown

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:
image

@Ruchii-27 Ruchii-27 requested review from cegraybl and huanwu March 12, 2025 17:52
@cegraybl cegraybl requested a review from Copilot March 12, 2025 18:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@Ruchii-27 Ruchii-27 merged commit aaa3d7e into feature/cssc_ext Mar 12, 2025
@cegraybl cegraybl deleted the ruchi/FixDryRunAndRunImmediately branch April 23, 2025 17:33
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:

![image](https://github.com/user-attachments/assets/b5a2f868-8904-42ea-aa9e-acb561943d2f)

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:

![image](https://github.com/user-attachments/assets/b5a2f868-8904-42ea-aa9e-acb561943d2f)

Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
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.

3 participants