Skip to content
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

fix(BA-754): ContainerRegistry per-project API misc bugs #3701

Merged
merged 6 commits into from
Feb 14, 2025

Conversation

jopemachine
Copy link
Member

@jopemachine jopemachine commented Feb 14, 2025

Follow-up of #3090, #3116.

Resolves #3702 (BA-754).

The following bugs have been fixed.

  • 401 error occurs when calling the read_quota in the Harbor registry CRUD API. Credentials are required to retrieve the Harbor project quota.
  • The container_registry.py is not registered in global_subapp_pkgs, causing a 404 error when a Harbor registry webhook request is received.
  • In modify_container_registry_node_v2, when removing specific allowed_groups, a ContainerRegistryNotFound error occurs if the association does not exist. However, the missing object is an association, not a ContainerRegistry.
  • Fixed a bug where an ImageNode accessible by a user from a non-global registry not associated with the domain was being queried when querying ImageRBAC with DomainScope.
  • openapi.json updates

Checklist: (if applicable)

  • Mention to the original issue

📚 Documentation preview 📚: https://sorna--3701.org.readthedocs.build/en/3701/


📚 Documentation preview 📚: https://sorna-ko--3701.org.readthedocs.build/ko/3701/

@github-actions github-actions bot added comp:manager Related to Manager component size:S 10~30 LoC labels Feb 14, 2025
@github-actions github-actions bot added area:docs Documentations size:L 100~500 LoC and removed size:S 10~30 LoC labels Feb 14, 2025
@jopemachine jopemachine changed the title fix: Register harbor webhook API handler fix: Harbor Registry API misc bugs (Read per project quota authentication error, Webhook router not registered) Feb 14, 2025
@jopemachine jopemachine changed the title fix: Harbor Registry API misc bugs (Read per project quota authentication error, Webhook router not registered) fix: ContainerRegistry per-project API misc bugs Feb 14, 2025
@jopemachine jopemachine marked this pull request as ready for review February 14, 2025 04:15
@HyeockJinKim HyeockJinKim self-requested a review February 14, 2025 04:44
@jopemachine jopemachine changed the title fix: ContainerRegistry per-project API misc bugs fix(BA-754): ContainerRegistry per-project API misc bugs Feb 14, 2025
Comment on lines +1025 to +1035
async def _get_domain_accessible_project_scopes(
self,
ctx: ClientContext,
scope: DomainScope,
) -> list[ProjectScope]:
from .group import GroupRow

stmt = sa.select(GroupRow.id).where(GroupRow.domain_name == scope.domain_name)
project_ids = await self.db_session.scalars(stmt)
return [ProjectScope(project_id=proj_id) for proj_id in project_ids]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple functions now, but since RBAC refactoring is scheduled, I will apply it as is for now.

@HyeockJinKim HyeockJinKim added this pull request to the merge queue Feb 14, 2025
Merged via the queue into main with commit 112e36c Feb 14, 2025
24 checks passed
@HyeockJinKim HyeockJinKim deleted the hotfix/harbor-webhook-api-not-registered branch February 14, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Documentations comp:manager Related to Manager component size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misc bugs of per project custom image PR
2 participants