forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
Port latest cache create behavior #27
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renshao
wants to merge
1
commit into
feature/artifactcache
Choose a base branch
from
shaoren/built-in-role-fix
base: feature/artifactcache
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
In az cli 2.70 we introduced an improvement for `az acr cache create`, where this command does not need to issue a GET registry request first. This change is needed for users with cache rule permission only. If a user only has access to cache rule resource, the GET registry request would fail with 503. This commit ported this change in `arccache` extension, so that even after this extension is installed, user can still run `acr acr cache create` command.
a897098 to
6e985de
Compare
There was a problem hiding this 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 ports the latest cache create behavior so that users with cache rule permission no longer need to perform a GET registry request before creating a cache.
- Removed the retrieval of the full registry object using get_registry_by_name.
- Introduced a new credential set ID formatting using a constant template and subscription, resource group, registry name, and credential set name.
Comments suppressed due to low confidence (2)
src/acrcache/azext_acrcache/cache.py:106
- The previous code retrieved the full registry object to get the registry ID, which is no longer available. Please confirm that get_resource_group_name_by_registry_name returns the correct value needed for constructing the credential set ID.
rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
src/acrcache/azext_acrcache/cache.py:106
- [nitpick] Consider renaming the variable 'rg' to 'resource_group' for improved clarity.
rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
mabelegba
pushed a commit
that referenced
this pull request
Nov 25, 2025
) * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * fix CI testcases for nodepool image issues (#8) * update python version to 3.13 (#12) * changes to support gateway association/disassociation for api version '2025-08-01-preview' (#17) * [Azure RBAC] Deprecate 3P mode flags, fix Azure RBAC enablement bug, add E2E coverage and improve logging (#20) * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * Parameterize for airgapped clouds (#5) * Add parameterization for the airgapped clouds * Fix azdev style * MCR path function * azdev, ruff, and mypy --------- Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> * Oras client fix to work with different MCRs (#6) Co-authored-by: mmcneal <[email protected]> * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * Update cluster diagnostics image to 1.29.3 (#7) * Update cluster diagnostics helm chart to 1.29.3 * Fix lint issues --------- Co-authored-by: bgriddaluru <[email protected]> * RBAC deprecation & fix the issue * typo * fix comments * update tests * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * rebase * fix tests * fix version * fix mypy, lint * fix test * fix test * fix test * fix test * fix test * rename test * deprecate flags * rebase * rebase * bump version for release --------- Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Atchut Kumar Barli <[email protected]> Co-authored-by: mcnealm13 <[email protected]> Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: vithumma <[email protected]> * remove hardcoded public ARM endpoint url for fairfax and mooncake (#24) * Bug Fix for FFX mcr url (#22) * [connectedk8s] update release notes and version (#26) * Add Helm Overrides for AGC (#23) * add agc overrides * update gns endpoint * add indentation * fix linter error * fix ruff formatting * move overrides to it's own method * update method * update ruff formatting * [Azure RBAC] Remove deprecated flags (#16) * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * Parameterize for airgapped clouds (#5) * Add parameterization for the airgapped clouds * Fix azdev style * MCR path function * azdev, ruff, and mypy --------- Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> * Oras client fix to work with different MCRs (#6) Co-authored-by: mmcneal <[email protected]> * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * Update cluster diagnostics image to 1.29.3 (#7) * Update cluster diagnostics helm chart to 1.29.3 * Fix lint issues --------- Co-authored-by: bgriddaluru <[email protected]> * RBAC deprecation & fix the issue * typo * fix comments * update tests * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * rebase * fix tests * fix version * fix mypy, lint * fix test * fix test * fix test * fix test * fix test * rename test * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * fix CI testcases for nodepool image issues (#8) * update python version to 3.13 (#12) * changes to support gateway association/disassociation for api version '2025-08-01-preview' (#17) * [Azure RBAC] Deprecate 3P mode flags, fix Azure RBAC enablement bug, add E2E coverage and improve logging (#20) * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * Parameterize for airgapped clouds (#5) * Add parameterization for the airgapped clouds * Fix azdev style * MCR path function * azdev, ruff, and mypy --------- Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> * Oras client fix to work with different MCRs (#6) Co-authored-by: mmcneal <[email protected]> * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * Update cluster diagnostics image to 1.29.3 (#7) * Update cluster diagnostics helm chart to 1.29.3 * Fix lint issues --------- Co-authored-by: bgriddaluru <[email protected]> * RBAC deprecation & fix the issue * typo * fix comments * update tests * add pester tests for connectedk8s cli extension * Pass the force delete param to the API call (#4) * forcedelete * format * add code owner * mypy * fix CI testcases for nodepool image issues (#8) * update errors for the config and connectivity issues (#11) * update errors * format * style * update python version to 3.13 (#12) * rebase * fix tests * fix version * fix mypy, lint * fix test * fix test * fix test * fix test * fix test * rename test * deprecate flags * rebase * rebase * bump version for release --------- Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Atchut Kumar Barli <[email protected]> Co-authored-by: mcnealm13 <[email protected]> Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: vithumma <[email protected]> * remove breaking change announcement for removed flags --------- Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Atchut Kumar Barli <[email protected]> Co-authored-by: mcnealm13 <[email protected]> Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: vithumma <[email protected]> * update prediag version (#27) * Updating the proxy version constant (#28) * Update relesae notes * dropping 3.9 * dropping testing folder * fixed code review comments * updateversion * Update src/connectedk8s/HISTORY.rst Co-authored-by: Xing Zhou <[email protected]> --------- Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Vineeth Thumma <[email protected]> Co-authored-by: mcnealm13 <[email protected]> Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: bgriddaluru <[email protected]> Co-authored-by: vithumma <[email protected]> Co-authored-by: hapate <[email protected]> Co-authored-by: junw98 <[email protected]> Co-authored-by: gabemousa <[email protected]> Co-authored-by: Xing Zhou <[email protected]>
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.
In az cli 2.70 we introduced an improvement for
az acr cache create,where this command does not need to issue a GET registry request first.
This change is needed for users with cache rule permission only. If a user
only has access to cache rule resource, the GET registry request would
fail with 503.
This commit ported this change in
arccacheextension, so that evenafter this extension is installed, user can still run
acr acr cache createcommand.