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

feat: fetch container registries with new nodes query #2746

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Oct 10, 2024

TR;DR
New GraphQL queries and mutations have been added related to the Registry since 24.09. Internally, the management from etcd has been changed to DB table. Therefore, version management is as follows:

  • 24.09.0 and above: Use ContainerRegistryList.tsx, ContainerRegistryEditorModal.tsx
  • 23.09.2 and above but below 24.09.0: Use ContainerRegistryListBefore2409.tsx, ContainerRegistryEditorModalBefore2409.tsx
  • Below 23.09.2: Use backend-ai-registry-list.ts

What's changed

  • ContainerRegistryList.tsx and ContainerRegistryEditorModal.tsx have been renamed to ContainerRegistryListBefore2409.tsx, ContainerRegistryEditorModalBefore2409.tsx.
  • From 24.09.0, ContainerRegistryList.tsx and ContainerRegistryEditorModal.tsx use container_registry_nodes related query and mutation.
  • Pagination and sorting (only for registry name) are supported.
  • Updated schema

How to test

  1. Change
    isSupportContainerRegistryGraphQL ? (
    isSupportContainerRegistryNodes ? (
    // manager ≤ v24.09.0
    <ContainerRegistryList />
    ) : (
    // v23.09.2 ≤ manager < v24.09.0
    <ContainerRegistryListBefore2409 />
    )
    ) : (
    to like this.
isSupportContainerRegistryGraphQL ? (
    <ContainerRegistryList />
) : (
  1. Change this line to like this. (since 24.09.0 is not released yet).
          ) @since(version: "24.09.0b1") {
  1. Go to Environments - Registries page.

Checklist for reviewers

  • CRUD registries.
  • The project is set to 'library' when the type is 'docker' and the input field is disabled.
  • Registry name filtering and sorting work well.
  • Pagination works well.

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link

graphite-app bot commented Oct 10, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

agatha197 commented Oct 10, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @agatha197 and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added area:lib Library and SDK related issue. area:ux UI / UX issue. area:i18n Localization size:XL 500~ LoC labels Oct 10, 2024
@agatha197 agatha197 force-pushed the feature/fetch-container-registries-with-nodes branch 4 times, most recently from baabae1 to 924a6c1 Compare October 11, 2024 06:52
Copy link

github-actions bot commented Oct 11, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 5.15% 348/6752
🔴 Branches 4.7% 218/4643
🔴 Functions 3.02% 67/2222
🔴 Lines 5.05% 333/6597

Test suite run success

93 tests passing in 12 suites.

Report generated by 🧪jest coverage report action from ccb9a9b

@agatha197 agatha197 force-pushed the feature/fetch-container-registries-with-nodes branch 3 times, most recently from 326e2fd to a7ab1ed Compare October 11, 2024 07:21
@agatha197 agatha197 marked this pull request as ready for review October 11, 2024 07:23
@agatha197 agatha197 added this to the 24.09 milestone Oct 11, 2024
@agatha197 agatha197 force-pushed the feature/fetch-container-registries-with-nodes branch 2 times, most recently from 5d2b8ab to 983c8ff Compare October 15, 2024 04:31
@agatha197 agatha197 force-pushed the feature/fetch-container-registries-with-nodes branch 3 times, most recently from fa69e9c to 18d5597 Compare October 15, 2024 06:24
@agatha197 agatha197 added the urgency:blocker IT SHOULD BE RESOLVED BEFORE DISTRIBUTING label Oct 15, 2024
@agatha197 agatha197 force-pushed the feature/fetch-container-registries-with-nodes branch from 18d5597 to 84e86de Compare October 17, 2024 08:58
Copy link
Contributor

@lizable lizable left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link

graphite-app bot commented Oct 21, 2024

Merge activity

- related PR: lablup/backend.ai#1917, lablup/backend.ai#2888

**TR;DR**
New GraphQL queries and mutations have been added related to the Registry since 24.09. Internally, the management from etcd has been changed to DB table. Therefore, version management is as follows:
- 24.09.0 and above: Use `ContainerRegistryList.tsx`, `ContainerRegistryEditorModal.tsx`
- 23.09.2 and above but below 24.09.0: Use `ContainerRegistryListBefore2409.tsx`, `ContainerRegistryEditorModalBefore2409.tsx`
- Below 23.09.2: Use `backend-ai-registry-list.ts`

**What's changed**
- `ContainerRegistryList.tsx` and `ContainerRegistryEditorModal.tsx` have been renamed to `ContainerRegistryListBefore2409.tsx`, `ContainerRegistryEditorModalBefore2409.tsx`.
- From 24.09.0, `ContainerRegistryList.tsx` and `ContainerRegistryEditorModal.tsx` use `container_registry_nodes` related query and mutation.
- Pagination and sorting (only for registry name) are supported.
- Updated schema

**How to test**
1. Change https://github.com/lablup/backend.ai-webui/blob/7163812c4b3a70679b0efb347e11b52c3f9948cb/react/src/pages/EnvironmentPage.tsx#L65-L73 to like this.
```ts
isSupportContainerRegistryGraphQL ? (
    <ContainerRegistryList />
) : (
````
2. Change this line https://github.com/lablup/backend.ai-webui/blob/7163812c4b3a70679b0efb347e11b52c3f9948cb/react/src/components/ContainerRegistryList.tsx#L87 to like this. (since 24.09.0 is not released yet).
```ts
          ) @SInCE(version: "24.09.0b1") {
```
3. Go to Environments - Registries page.

**Checklist for reviewers**
- [ ] CRUD registries.
- [ ] The project is set to 'library' when the type is 'docker' and the input field is disabled.
- [ ] Registry name filtering and sorting work well.
- [ ] Pagination works well.
  - For testing this, you can add '1' option to this line. https://github.com/lablup/backend.ai-webui/blob/a7ab1ed6fe540070010f87a437f52c1c42b30abc/react/src/components/ContainerRegistryList.tsx#L347

**Checklist:** (if applicable)

- [x] Mention to the original issue
- [ ] Documentation
- [x] Minium required manager version
- [x] Specific setting for review (eg., KB link, endpoint or how to setup)
- [x] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
@lizable lizable force-pushed the feature/fetch-container-registries-with-nodes branch from 84e86de to ccb9a9b Compare October 21, 2024 04:40
@graphite-app graphite-app bot merged commit ccb9a9b into main Oct 21, 2024
6 checks passed
@graphite-app graphite-app bot deleted the feature/fetch-container-registries-with-nodes branch October 21, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:lib Library and SDK related issue. area:ux UI / UX issue. size:XL 500~ LoC urgency:blocker IT SHOULD BE RESOLVED BEFORE DISTRIBUTING
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants