Skip to content

fix(cssc): 31250186 remove the explicit 'required=False' under _params.py#53

Closed
cegraybl wants to merge 207 commits intomainfrom
cegrayb/pr_comments_7
Closed

fix(cssc): 31250186 remove the explicit 'required=False' under _params.py#53
cegraybl wants to merge 207 commits intomainfrom
cegrayb/pr_comments_7

Conversation

@cegraybl
Copy link

  • for update command, for parameter --config
  • for list command, for parameter --run-status

pwalecha and others added 30 commits June 4, 2024 21:30
# Fix LINT and Style issues
# Add more unit test
# Add defer_run_immediately support in the CLI command
# Change the command from supply-chain task to supply-chain workflow - Need to read document
# Change the show command to display cadence as "n"d instead of cron expression, order the list by name
# Check if Resource_group is coming as mandatory field Or it can be set in the config and can be fetched directly from there
remove redundant files
Fix formatting
Fix bugs
breaking test cases
upload of dry-run quick task should be done from temp folder
improve logging feedback
Increase time for MI setup
Make cadence and config file updates optional
help file
default values in documentation
test invalid json values
regex for days validation
change error messages
refactor code
fix test cases related to refactoring
Ruchii-27 and others added 25 commits March 7, 2025 14:03
fix(cssc): 31694722 fixed config validation to only allow tag-convention = floating or incremental
fix(cssc): 31694219 inform user when images matching their configuration are 0
…s (2/n) (#25)

- Add ScenarioTest for the extension and the recording
- Fix remaining style and lint issues
- Fix README file to reflect basic usage
- Fix HISTORY and setup.py to have the final release version for private
preview
…ests (#31)

Currently, no validation error is thrown when repositories are empty or
repeated in configuration file.

Bug -
https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31695069/?view=edit

This PR fixes the issue by enhancing schema validation for repositories
and updating the tests to test for this scenario.


![image](https://github.com/user-attachments/assets/1d7d1f0e-feff-49b1-a955-2dbb85c44ab2)

---------

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

![image](https://github.com/user-attachments/assets/61ced20f-d8c4-42d6-bc8d-67e3ae299ed1)
After Fix:

![image](https://github.com/user-attachments/assets/807745a3-71f5-471c-89b5-62161fbd3fd1)

2.
https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31694600/?view=edit
After Fix: added a line to indicate list executed for last n days:

![image](https://github.com/user-attachments/assets/fe832467-d337-4f18-a2c7-f713452e5c3a)

---------

Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
…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>
…mage fix bug (#35)

Updated the cssc image to latest to conclude on the duplicate image fix
bug -
https://msazure.visualstudio.com/AzureContainerRegistry/_workitems/edit/31695069/?view=edit

---------

Co-authored-by: Ruchi Maheshwari <rumahe@microsoft.com>
Co-authored-by: Cesar Gray Blanco <cegraybl@microsoft.com>
To retrieve task logs class `WorkflowTaskStatus` uses a Poller to wait
for a task run to finish before attempting to download the logs. This is
only done during image limit check or when the `--dry-run` option is
used during the `create` and `update` commands. Since this is a remote
call there is a chance that we never get a response.

This PR adds a 10-minute timeout to the Poller. In case the timeout is
reached, the required message is logged, and the attempt will be done to
retrieve the logs if there are any to allow the operation to continue.

In case of a timeout during `create` or `update` the command will not
block in case the image limit check could not be performed, to allow for
a better user experience. In case the image limit is reached, the user
will be informed via the trigger task that will perform the check every
time it runs.
…l any running scan or patch task (#34)

This change allows the 'delete' command to check and prompt to cancel
any running scan or patch task before deleting the workflow. the
operation will not prompt id used with the parameter `--yes|-y` and
accepts `--dryrun` which will run the command without executing the
cancellation of the tasks.
Includes small fixes for style and lint issues.


![image](https://github.com/user-attachments/assets/2d14adf6-617c-4aae-b177-45db995fbd93)
…ner Registry Tasks Contributor' (#38)

Change role assignment during deployment from 'Contributor' to
'Container Registry Tasks Contributor' to trigger and scan tasks during
deployment. Reduce access given to the CSSC tasks.

For the new role assignment to take effect the tasks have to be
redeployed.
#39)

This change is only to add check for empty token.
A following PR will be made to update the oras package. Since there are
substantial changes to the client usage.

Adding a centralized check for every token we retrieve from the registry
and improve on error logging
Fix filtering on the `list` command by `--run-status` to make it correct
once again.
Now the `--run-status` will filter the image status depending on the
final status of both the scan and patch instead of only one of them.
Meaning that for an image to be marked as `FAILED` scan or patch have to
be `FAILED`, for an image to be marked as `SUCCEEDED` both scan and
patch have to be `SUCCEEDED` or `SKIPPED` as that is treated as a
successful execution, and for an image to be marked as `SKIPPED` the
scan has to be `SUCCEEDED` and the patch has to be `SKIPPED`.

This PR also includes a unit test to catch issues with the filtering.

In addition, includes fixes for unit tests that are run without azure
credentials, adding the required mocks to avoid that dependency.
…41)

This change is a continuation of the changes in [PR
39](#39)
Updates the `oras` packages to 0.2.25 to use a more recent version of
the package to avoid the "empty token" error when authenticating to the
registry.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This change addresses all the comments in the [public repo
PR](Azure#8530).
Final change for public preview.
Test passes, lint and style are successful.
…it) (#44)

This change addresses all the comments in the official repo
Final change for public preview.
Test passes, lint and style are successful.
…45)

critical items found during bug bash
To fail faster and avoid creating a task without configuration the
extension has to push the configuration before attempting to deploy
…15 (#46)

Address a partial list of PR comments on the public PR:
Azure#8530
Rest of comments require additional consideration.
…16 (#47)

Second wave of PR comments for
Azure#8530
Fix remaining open comments on public PR until 04/16/25
Test, style and linter are clean
…422 (#48)

Third wave of PR comments for
Azure#8530
Fix remaining open comments on public PR until 04/22/25
Test, style and linter are clean
- remove unused recording
- remove phony secrets from test live recording to avoid flagging
- fix test_acr_cssc_dry_run test, mock required dependency
- add header to test file
- run azdev mask' with LOW to mask anything missing
…r update and --run-status under list parameters
@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@cegraybl cegraybl closed this Apr 24, 2025
@cegraybl
Copy link
Author

targeted the wrong branch, recreating

@github-actions
Copy link

mabelegba pushed a commit that referenced this pull request Nov 25, 2025
* Upstream Merge

* Merge from workload-orchestration : Added Example in Description (#34)

* Merge from workload-orchestration : Fixed Example

* Fixed Example for SolutionTemplateVersion

* Made Changes for command-change CI fix'

* Reset Version 1.0.0b1

* Added Bulk and Diagnostics Back (#35)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Bulk Solution Example (#36)

* Added Bulk and Diagnostics Back

* Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Fixed Solution Template Linter Issue

* Added Integration Tests Framework for WorkloadOrchestration #37

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added ServiceName  (#38)

* Added Tests

* Made Changes on ServiceName

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Full Target Solution Tests (#39)

* Added Tests

* Made Changes on ServiceName

* Nit Changes

* Made Changes for ContextLookup

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added E2E workflow Tests (#40)

* Added Tests

* Made Changes on ServiceName

* Nit Changes

* Made Changes for ContextLookup

* Added complete workflow

* Add Licence

* Added License

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Readme (#41)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Bulk Deployemnent LRO changes (#42)

* made changes

* Added change

* Added Changes in Test

* Added CLi Changes

* Added Setup

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Changes For Backward Compitablity (#43)

* Added Changes For Backward Compitablity

* Made changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Made changes (#44)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Target Operations API refractoring  (#47)

* Changes I made

* Make changes

* Made chnages

* Make changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Stable API 2025-06-01 (#48)

* Made changes

* Made Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Change in ID in Targets (#50)

* Made changes

* changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Remove Id and Name from Target Review  (#51)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* final bulk (#52)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Changes in ARG

* Added Linter Exception

* Added ITTests (#53)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Standardize CLI (#54)

* Made Changes

* Made Changes

* Made changes

* Added Change

* Made changes

* Made changes

* Made changes

* Made Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Linter FIxes and Remove Preview

* Removed Resolved from CLI

* change in version

* made changes (#55)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Fixed history

---------

Co-authored-by: Atharva Udapure <audapure@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