refactor(BA-5046): migrate artifact registry action classes to RBAC base classes#9992
Merged
fregataa merged 3 commits intoMar 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates artifact registry single-entity action classes (Get/Update/Delete + GetMeta) from BaseAction/BaseActionResult to new RBAC-aware base classes (BaseSingleEntityAction/BaseSingleEntityActionResult), and upgrades the corresponding processors to SingleEntityActionProcessor.
Changes:
- Introduces
ArtifactRegistrySingleEntityAction,ArtifactRegistrySingleEntityActionResult, and scope-action base classes inactions/base.py - Migrates 7 action files (HuggingFace and Reservoir get/update/delete + common get_meta) to the new base classes with
target_entity_id()andtarget_element()implementations - Updates processor type annotations and instantiations from
ActionProcessortoSingleEntityActionProcessor
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
actions/base.py |
Adds new RBAC base classes for single-entity and scope actions |
actions/huggingface/get.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/huggingface/update.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/huggingface/delete.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/reservoir/get.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/reservoir/update.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/reservoir/delete.py |
Migrates to ArtifactRegistrySingleEntityAction |
actions/common/get_meta.py |
Migrates to ArtifactRegistrySingleEntityAction |
processors.py |
Upgrades to SingleEntityActionProcessor for single-entity actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ase classes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
319a39d to
31a745f
Compare
…gistry_name are null Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jopemachine
approved these changes
Mar 20, 2026
jopemachine
reviewed
Mar 20, 2026
|
|
||
| @override | ||
| def target_entity_id(self) -> str: | ||
| if self.registry_id: |
Member
There was a problem hiding this comment.
I think registry_name should not be included here
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.
Summary
ArtifactRegistryScopeAction,ArtifactRegistrySingleEntityActionand corresponding result RBAC base classestarget_element()returningRBACElementRef(ARTIFACT_REGISTRY, id)SingleEntityActionProcessorArtifactRegistryActionTest plan
pants fmt/lint/checkpass onservices/artifact_registry::Resolves BA-5046