You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue outlines the impact to downstream consumers of our packages by migrating to the new org. The approach is outlined in #1737.
Golang Packages
Existing imports of Go packages pinned to a pre-migration version will continue to work. The GitHub redirect is transparent to the Go toolchain and pre-migration tags have a go.mod that still declares the old module path. This means Go's module path consistency check passes:
sequenceDiagram
participant Go as go toolchain
participant GH_old as github.com/hyperledger/firefly-common
participant GH_new as github.com/hyperledger-firefly/firefly-common
Go->>GH_old: fetch v1.5.0
GH_old-->>Go: 301 redirect
Go->>GH_new: fetch v1.5.0
GH_new-->>Go: module zip + go.mod
Note over Go: go.mod declares: github.com/hyperledger/firefly-common ✓
Go-->>Go: build succeeds
Loading
When consumers update the version without also updating the module path in their go.mod, the go.mod in the new release declares a different path to the one required, causing an error:
sequenceDiagram
participant Go as go toolchain
participant GH_old as github.com/hyperledger/firefly-common
participant GH_new as github.com/hyperledger-firefly/firefly-common
Go->>GH_old: fetch v1.6.0
GH_old-->>Go: 301 redirect
Go->>GH_new: fetch v1.6.0
GH_new-->>Go: module zip + go.mod
Note over Go: go.mod declares: github.com/hyperledger-firefly/firefly-common ✗
Go-->>Go: error
Loading
go: github.com/hyperledger/firefly-common@v1.6.0: parsing go.mod:
module declares its path as: github.com/hyperledger-firefly/firefly-common
but was required as: github.com/hyperledger/firefly-common
To update to any post-migration version, consumers must update their go.mod and all import paths across source files to the new repository.
Testing
To provide a representative test, I have created a repository through the following steps:
1-origin-repo-import-v1 - This represents a consumer of v0.1.0, a release made before transfer. Running go get and go run ., there are no changes compared to before migration.
2-origin-repo-import-v2 - If the user from 1. attempted to update their version to v0.2.0 without changing the repo path, they see an error when running go get. From the information in this message, the user should be able to update their imports.
3-dest-repo-import-v2 - Once the user adjusts their go.mod to reflect the new repo path, all works again.
Docker Images & Registry
When an repo is transferred, none of the associated images are moved so no impact to end user. After the migration, new images will be created in the new org, with past releases mirrored.
This will be the same behaviour for helm charts.
NPM
We use @hyperledger/firefly today for our Node.JS SDK. Upon migration, we mark this package as deprecated and then create packages within a new namespace/scope called @hyperledger-firefly.
Rust
Cargo handles the repository redirect without any issue.
Docs Website
We will redirect users from the new URL for all pages in the docsite. Existing URLs will continue to work.
Forks
Existing forks will be now pointing to the new repos. No impact for end consumers
This issue outlines the impact to downstream consumers of our packages by migrating to the new org. The approach is outlined in #1737.
Golang Packages
Existing imports of Go packages pinned to a pre-migration version will continue to work. The GitHub redirect is transparent to the Go toolchain and pre-migration tags have a
go.modthat still declares the old module path. This means Go's module path consistency check passes:sequenceDiagram participant Go as go toolchain participant GH_old as github.com/hyperledger/firefly-common participant GH_new as github.com/hyperledger-firefly/firefly-common Go->>GH_old: fetch v1.5.0 GH_old-->>Go: 301 redirect Go->>GH_new: fetch v1.5.0 GH_new-->>Go: module zip + go.mod Note over Go: go.mod declares: github.com/hyperledger/firefly-common ✓ Go-->>Go: build succeedsWhen consumers update the version without also updating the module path in their
go.mod, thego.modin the new release declares a different path to the one required, causing an error:sequenceDiagram participant Go as go toolchain participant GH_old as github.com/hyperledger/firefly-common participant GH_new as github.com/hyperledger-firefly/firefly-common Go->>GH_old: fetch v1.6.0 GH_old-->>Go: 301 redirect Go->>GH_new: fetch v1.6.0 GH_new-->>Go: module zip + go.mod Note over Go: go.mod declares: github.com/hyperledger-firefly/firefly-common ✗ Go-->>Go: errorTo update to any post-migration version, consumers must update their
go.modand all import paths across source files to the new repository.Testing
To provide a representative test, I have created a repository through the following steps:
v0.1.0go.modto reflect the move and made a tag for a second releasev0.2.0By pulling https://github.com/d1070c86639b82c5758e7bf79873b21e/go-consumer you can recreate the testing which inform the opinions in this issue. The repo contains 3 directories for 3 scenarios:
1-origin-repo-import-v1- This represents a consumer ofv0.1.0, a release made before transfer. Runninggo getandgo run ., there are no changes compared to before migration.2-origin-repo-import-v2- If the user from1.attempted to update their version tov0.2.0without changing the repo path, they see an error when runninggo get. From the information in this message, the user should be able to update their imports.3-dest-repo-import-v2- Once the user adjusts theirgo.modto reflect the new repo path, all works again.Docker Images & Registry
When an repo is transferred, none of the associated images are moved so no impact to end user. After the migration, new images will be created in the new org, with past releases mirrored.
This will be the same behaviour for helm charts.
NPM
We use
@hyperledger/fireflytoday for our Node.JS SDK. Upon migration, we mark this package as deprecated and then create packages within a new namespace/scope called@hyperledger-firefly.Rust
Cargo handles the repository redirect without any issue.
Docs Website
We will redirect users from the new URL for all pages in the docsite. Existing URLs will continue to work.
Forks
Existing forks will be now pointing to the new repos. No impact for end consumers