-
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
fix: Make image table's project, registry_id column nullable #2888
Closed
jopemachine
wants to merge
12
commits into
main
from
fix/wrong-container-registries-migration-script
Closed
fix: Make image table's project, registry_id column nullable #2888
jopemachine
wants to merge
12
commits into
main
from
fix/wrong-container-registries-migration-script
Conversation
This file contains 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
jopemachine
added
type:bug
Reports about that are not working
require:db-migration
Automatically set when alembic migrations are added or updated
labels
Oct 2, 2024
jopemachine
added
the
skip:ci
Make the action workflow to skip running lint, check, and test (use with caution!)
label
Oct 2, 2024
jopemachine
force-pushed
the
fix/wrong-container-registries-migration-script
branch
from
October 3, 2024 10:06
c420fd8
to
2274fc8
Compare
jopemachine
added
the
skip:changelog
Make the action workflow to skip towncrier check
label
Oct 3, 2024
jopemachine
changed the title
fix: Wrong container registries migration script
fix: Improve container registries migration script
Oct 3, 2024
achimnol
requested changes
Oct 4, 2024
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.
Still it fails:
File "/home/joongi/bai-edge/src/ai/backend/manager/models/alembic/versions/1d42c726d8a3_migrate_container_registries_from_etcd_to_psql.py", line 457, in upgrade
insert_registry_id_to_images_with_black_registry_id()
File "/home/joongi/bai-edge/src/ai/backend/manager/models/alembic/versions/1d42c726d8a3_migrate_container_registries_from_etcd_to_psql.py", line 381, in insert_registry_id_to_images_with_black_registry_id
registry_info = dict(registry_info)
^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
...nager/models/alembic/versions/1d42c726d8a3_migrate_container_registries_from_etcd_to_psql.py
Outdated
Show resolved
Hide resolved
jopemachine
changed the title
fix: Improve container registries migration script
fix: Make image table's project, registry_id column nullable
Oct 6, 2024
jopemachine
added
comp:manager
Related to Manager component
and removed
skip:changelog
Make the action workflow to skip towncrier check
skip:ci
Make the action workflow to skip running lint, check, and test (use with caution!)
labels
Oct 6, 2024
jopemachine
force-pushed
the
fix/wrong-container-registries-migration-script
branch
from
October 6, 2024 05:17
2059891
to
03ecb01
Compare
10 tasks
lizable
pushed a commit
to lablup/backend.ai-webui
that referenced
this pull request
Oct 21, 2024
- 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
jopemachine
force-pushed
the
fix/wrong-container-registries-migration-script
branch
from
October 23, 2024 13:22
872fb3b
to
b51f89d
Compare
…exists for the image canonical name.
jopemachine
force-pushed
the
fix/wrong-container-registries-migration-script
branch
from
October 25, 2024 05:56
5613c3f
to
b4c8741
Compare
The current PR has become larger than initially intended, making it difficult to review. So, I will close this PR and recreate it as a PR stack in Graphite. See #2978 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp:manager
Related to Manager component
require:db-migration
Automatically set when alembic migrations are added or updated
type:bug
Reports about that are not working
type:refactor
Refactor codes or add tests.
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.
Follow-up of #1917.
Refactoring the image rescan command
rescan_images
.rescan_single_registry
tasks concurrently has been found to trigger an abort. Therefore, I modified it to execute each iteration sequentially. While this results in a slight performance decrease, we can consider improving it to support parallel processing in the future.More flexible support for local-type container registries
Make image table's
project
column nullableMake container registry table's
project
column nullableModified the
upgrade()
to automatically generate the corresponding container registry row instead of raising an error when no container registry exists for the image canonical name.Thoughts
Local-type container registry records currently do not contain meaningful information. Additionally, having more than one local container registry type would be awkward.
Whether an image is local can be determined by checking if the container registry pointed to by
image.registry_id
is of the Local type, making theis_local
column redundant.Container registry row auto-generation example
Checklist: (if applicable)