-
Notifications
You must be signed in to change notification settings - Fork 159
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
refactor(BA-483): Revamp ContainerRegistryNode
API
#3424
base: topic/11-11-feat_implement_associatecontainerregistrywithgroup_disassociatecontainerregistrywithgroup_
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
adc707a
to
265cecf
Compare
ContainerRegistryNode
API
265cecf
to
bb4b42a
Compare
23a194c
to
978b571
Compare
4113540
to
0c45704
Compare
…stryResponseModel`
…r `common` package
17c3313
to
a76fd01
Compare
0d29589
to
cd53aa4
Compare
…er_registry_scope()`
cd53aa4
to
f5d681b
Compare
if target_scope is not None: | ||
permission_ctx = await builder.build(ctx, target_scope, requested_permission) | ||
elif container_registry_scope is not None: | ||
permission_ctx = await builder.build_ctx_in_container_registry_scope( | ||
ctx, container_registry_scope | ||
) | ||
else: | ||
raise ValueError("either target_scope or container_registry_scope must be provided") | ||
|
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.
In our RBAC system, target scope should not be null. You can use SystemScope
if you need to query in a system wide scope.
before: str | None = None, | ||
last: int | None = None, | ||
scope: Optional[ScopeType] = None, | ||
container_registry_scope: Optional[ContainerRegistryScope] = None, |
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.
Just an idea. Since we are likely to have more orthogonal scopes mapped to project scopes, we could define a parameter type that contains container_registry_scope
and use it here.
e.g.
@dataclass # Can replace this with pydantic, TypedDict whatever you want!
class ProjectAdditionalScope:
container_registry_scope: Optional[ContainerRegistryScope] = None
async def get_connection(
cls,
info: graphene.ResolveInfo,
scope: Optional[ScopeType] = None,
extra_scopes: ProjectAdditionalScope,
Resolves #3418 (BA-483).
Outlines
Caution
This PR include breaking change.
This PR performs the following tasks:
In PR feat: Migrate container registry config storage from
Etcd
toPostgreSQL
#1917, there was some confusion as theContainerRegistryNode
API was changed to no longer usegraphene.InputObjectType
. Let's revert to usinggraphene.InputObjectType
for accepting arguments.PR feat(BA-463): Implement APIs for associating, disassociating
container_registries
withgroups
#3067 implements an API to establish the relationship betweencontainer_registries
andgroups
. It removes the undocumented APIs and adds new ones.GQL example
Refer to the
schema.graphql
file to see how the input types for each GQL query and mutation have changed.In this section, I will explain each GQL usage with examples.
create_container_registry_node
modify_container_registry_node
delete_container_registry_node
allowed_groups
Checklist: (if applicable)
docs
directory📚 Documentation preview 📚: https://sorna--3424.org.readthedocs.build/en/3424/
📚 Documentation preview 📚: https://sorna-ko--3424.org.readthedocs.build/ko/3424/