Skip to content

zos repos migration plan after renaming the repos #2691

Description

@ashraffouda

threefoldtech repo-rename migration plan (off GitHub redirects)

Confirmed rename map (old -> new) + Go module identity

Old name New repo Type Go module path today Path stale?
zosbase zos_base Go lib github.com/threefoldtech/zosbase YES
zoslight zos_light Go (OS) INCONSISTENT per branch: main=…/zos4 (stale/wrong), most branches=…/zos, rename-to-zoslight=…/zoslight YES — needs its own path, NOT zos4
zos-config zos_config data (no Go)
0-initramfs zos_initramfs shell build
zinit zos_zinit Rust bin
rfs zos_rfs Rust bin
tfgrid-sdk-go zos_sdk_go Go monorepo (11 mods) github.com/threefoldtech/tfgrid-sdk-go/* YES
tfgrid-sdk-rust zos_sdk_rust Rust
tfgrid-sdk-ts zos_sdk_ts npm
tfgrid-sdk-dart zos_sdk_dart dart
tfchain ledger_chain Go client github.com/threefoldtech/tfchain/clients/tfchain-client-go YES

Key: Go imports still resolve because the module paths were NOT changed + GitHub redirect. proxy.golang.org permanently caches old tagged versions, so Go is resilient short-term; non-Go URL fetches hit the redirect on EVERY build.


P0 — Build/CI/runtime fetches (do FIRST; hit redirect every run, least durable)

Repo Old ref -> New File:line Mechanism
zos_images zinit (~38) zos_zinit tfgrid3/*/Dockerfile, benchmark/build.sh:30 release-asset DL
zos_images tfgrid-sdk-go zos_sdk_go tfrobot/scripts/tfrobot.sh:7,9,22 release DL
zos_v4 rfs zos_rfs bins/packages/rfs/rfs.sh:5-6, scripts/debug_image.sh:109 release DL
zos_v4 zos-config zos_config bootstrap/bootstrap/src/hub.rs:18 raw URL in code
zos_base zos-config zos_config pkg/environment/environment.go:18 raw URL, runtime
zos_initramfs zinit zos_zinit packages/zinit.sh:3 release DL
zos_initramfs rfs zos_rfs packages/0-fs.sh:3 release DL
qss_quantum_storage zinit zos_zinit quantumd/Dockerfile:18 (+2 _archive) release DL
zos_sdk_ts zinit zos_zinit packages/stats/Dockerfile:17 release DL
grid_connect tfgrid-sdk-dart zos_sdk_dart app/pubspec.yaml:21,26,31 pub git dep
tfgridv4-sdk-dart tfgrid-sdk-dart zos_sdk_dart packages/registrar_client/pubspec.yaml:14 pub git dep
zos_zinit zinit (own old name) zos_zinit install.sh:12,17, install_run.sh:22,26 raw URL + GITHUB_REPO var
zos_rfs rfs (own old name) zos_rfs docs/zdb_flists.md:39 git clone in docs
grid_agent old module path new sdk path grid-cli/Makefile:34-35 ldflag -X (do with P1)
zos_sdk_go_v4 old module path (decide) .goreleaser.yaml:19, Makefile:4 ldflag / go get (do with P1)

VERIFY separately (container registry, NOT a GitHub rename)

  • grid_deployment: ghcr.io/threefoldtech/tfchain across 28 compose files — ghcr package names are independent of repo rename; confirm whether the image was re-published as ledger_chain before touching.
  • zos_sdk_dart: .github/workflows/coverage.yaml:38 pulls ghcr.io/threefoldtech/tfchain — same check.

P1 — Go module-path migration (bottom-up, coordinated; breaking)

Only needed to publish FUTURE releases without redirects. Do base libs first (rename module + fix internal imports + tag), then consumers switch to new path@new tag. Consumers keep building on the old cached tag until they switch — no hard break.

Step 1 — base libs (rename module path, fix self-imports, tag)

  1. zos_sdk_go (was tfgrid-sdk-go): 11 submodules …/tfgrid-sdk-go/* -> new. Biggest blast radius. DE-CONFLICT with zos_sdk_go_v4, which currently also declares …/tfgrid-sdk-go/rmb-sdk-go (module-path collision) + …/tfgrid4-sdk-go/node-registrar.
  2. ledger_chain (was tfchain): …/tfchain/clients/tfchain-client-go -> new (decision needed).
  3. zos_base (was zosbase): …/zosbase -> …/zos_base, ~663 internal imports.
  4. zos_light (was zoslight): its main wrongly declares module …/zos4 because zos_v4 was created as a modified copy of zoslight, and the zos4 module name leaked back into zoslight's branches. zos_light needs its OWN module path (e.g. …/zos_light), made consistent across branches. It is NOT zos4.
  5. zos_v4: this is the genuine module …/zos4. Keep (or rename to …/zos_v4) — separate decision from zos_light.

Step 2 — consumers (update go.mod require + imports + any ldflags)

Repo zosbase tfgrid-sdk-go tfchain notes
zos ✓ (rmb-sdk-go)
zos_light module wrongly zos4 on main — fix to its own path
zos_v4 ✓ (140) ✓ (rmb) ✓ (8) genuine module zos4 (a modified copy of zoslight)
grid_agent ✓ (45 imports) + Makefile ldflag
griddriver
grid_terraform ✓ (36)
grid_pulumi ✓ (17)
qss_quantum_storage/quantumd ✓ (grid-proxy, rmb)
grid_kyc_verifier

P2 — cosmetic (docs/badges/catalog links; batch last, bulk find/replace)

  • grid_wiki (~630: md + wiki/products/v3/*.toml repo= fields)
  • zos_sdk_ts (~619: generated HTML API docs + badges/homepage URLs)
  • grid_manual (~194 md)
  • zos_base docs (~20), plus scattered README/godoc badges everywhere.

Clean — no action (28 repos)

zos_bootstrap, zos_flist_hub, zos_flist_publish, zos_rmb, zos-update-worker, zos4_specs, zos_sdk_rust, zos-rs, zbus, grid_worker_pool, grid_tailstream, grid3_deployments_builder, grid_geoip, grid_auth_taiga, grid_kyc_openkyc, tfchain4, tfchain-explorer, 0-stor_v2, 0-db, 0-db-fs, 0-flist, 0-fs, 0-hub-gw, corex, flist-builder-config, tfgrid_demos, tfgrid_simulator, tfgridv4-sdk-ts.

Cross-cutting rules

  • NEVER recreate/reuse an old repo name — that is what actually kills a redirect. Keep old names reserved as the safety net during migration.
  • P1 strictly bottom-up; tag base libs before switching consumers; run go build ./... && go mod tidy per repo.
  • Decisions needed before P1: new module paths for zos_sdk_go / ledger_chain; give zos_light its own module path and stop main declaring …/zos4 (zos4 = zos_v4, which was forked as a modified copy of zoslight); resolve rmb-sdk-go collision (zos_sdk_go vs zos_sdk_go_v4).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions