backend.ai icon indicating copy to clipboard operation
backend.ai copied to clipboard

feat: Migrate container registries from `etcd` to `postgreSQL`

Open jopemachine opened this issue 1 year ago • 1 comments

Checklist: (if applicable)

  • [ ] Milestone metadata specifying the target backport version
  • [x] Mention to the original issue
  • [x] Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • [ ] Update of end-to-end CLI integration tests in ai.backend.test
  • [ ] API server-client counterparts (e.g., manager API -> client SDK)
  • [x] Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • [ ] Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

Resolves https://github.com/lablup/backend.ai/issues/1907

Changes

  • Migrate container registry schema and data from etcd to PostgreSQL
  • Update ContainerRegistry graphql API argument from hostname to id (UUID)
  • hostname is changed into registry_name
  • Add is_global column to the ContainerRegistry table

jopemachine avatar Feb 19 '24 01:02 jopemachine

Just a little suggestion about type hint in is_known_registry(). How about accepting only dict (or Mapping) type as known_registries parameter? Please enlighten me how the known_registries looks like in list type and dict type

dict example:

{'stable': {'cr.backend.ai': URL('https://cr.backend.ai')}, 'community': {'cr.backend.ai': URL('https://cr.backend.ai')}, 'multiarch': {'cr.backend.ai': URL('https://cr.backend.ai')}}

list example:

 ['cr.backend.ai']

Note: list is not aware of project unlike dict type here as you see above example.

jopemachine avatar Mar 17 '24 17:03 jopemachine

I am postponing milestone to 24.09. We managed to meet our internal deadline for per-user image customization feature (#1973). From now on, at this PR, let's focus on forming concrete definitions and stabilizing things rather than rushing for the merge approval.

kyujin-cho avatar Apr 08 '24 08:04 kyujin-cho

  • #2831 Graphite
  • #2665 Graphite
  • #2624 Graphite
  • #2623 Graphite
  • #2622 Graphite
  • #2621 Graphite
  • #2815 Graphite
  • #2620 Graphite
  • #2615 Graphite
  • #2707 Graphite
  • #1917 Graphite 👈
  • main

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

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

jopemachine avatar Aug 02 '24 11:08 jopemachine

Backport to 24.03 is failed. Please backport manually.

github-actions[bot] avatar Sep 30 '24 14:09 github-actions[bot]