fix(cssc): 31694510, 31694600 Check for existence of cssc tasks before calling list command + enhance log message#32
Merged
Ruchii-27 merged 2 commits intoMar 11, 2025
Conversation
…aying list command for last n days + test updates
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that CSSC tasks are verified before calling the list command and enhances the log messages to provide clearer output on the operations performed. Key changes include:
- Adding a check for CSSC tasks in the track_scan_progress function.
- Enhancing user output by printing the execution details for the last n days.
- Updating tests to mock the new check and verify the improved functionality.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/acrcssc/azext_acrcssc/helper/_taskoperations.py | Adds CSSC task existence check and prints additional log messages |
| src/acrcssc/azext_acrcssc/cssc.py | Removes redundant print statements and simplifies return of task progress |
| src/acrcssc/azext_acrcssc/tests/latest/test_helper_taskoperations.py | Updates tests to accommodate changes in track_scan_progress |
cegraybl
reviewed
Mar 11, 2025
|
|
||
| cssc_tasks_exists, _ = check_continuous_task_exists(cmd, registry) | ||
| if not cssc_tasks_exists: | ||
| logger.warning(f"{CONTINUOUS_PATCHING_WORKFLOW_NAME} workflow task does not exist. Run 'az acr supply-chain workflow create' to create workflow tasks") |
There was a problem hiding this comment.
since the error/warning message is now used in multiple places, I think we should add it as a constant
cegraybl
approved these changes
Mar 11, 2025
cegraybl
pushed a commit
that referenced
this pull request
Apr 23, 2025
…e calling list command + enhance log message (#32) This PR adds a check to ensure that the cssc tasks exist before calling the list command. It also displays that the list command is executed for the last n days. Updated tests as well. With this, below 2 bugs are addressed: 1. https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694510/?view=edit Before Fix:  After Fix:  2. https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694600/?view=edit After Fix: added a line to indicate list executed for last n days:  --------- Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
cegraybl
pushed a commit
that referenced
this pull request
Apr 24, 2025
…e calling list command + enhance log message (#32) This PR adds a check to ensure that the cssc tasks exist before calling the list command. It also displays that the list command is executed for the last n days. Updated tests as well. With this, below 2 bugs are addressed: 1. https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694510/?view=edit Before Fix:  After Fix:  2. https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694600/?view=edit After Fix: added a line to indicate list executed for last n days:  --------- 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.
This PR adds a check to ensure that the cssc tasks exist before calling the list command. It also displays that the list command is executed for the last n days. Updated tests as well.
With this, below 2 bugs are addressed:
https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694510/?view=edit


Before Fix:
After Fix:
https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694600/?view=edit

After Fix: added a line to indicate list executed for last n days: