I've started testing the steps for migrating all FireFly repos from the hyperledger org to hyperledger-firefly. This testing has initially focussed on reducing impact to users of the golang packages.
This was initially discussed in Discord thread.
Approach
Repos should be transferred in dependency order. Roughly:
- Group 1 (no local dependencies):
firefly-fir, firefly-common, firefly-ethconnect, firefly-fabconnect, firefly-cordaconnect, firefly-dataexchange-https, firefly-tokens-erc1155, firefly-tokens-erc20-erc721, firefly-ui, firefly-cardano, firefly-sdk-nodejs, firefly-helm-charts, firefly-samples
- Group 2 (depend only on
firefly-common): firefly-signer, firefly-transaction-manager
- Group 3 (depend on Group 2):
firefly (core), firefly-cli, firefly-evmconnect, firefly-tezosconnect, firefly-sandbox
- Group 4 (depends on core
firefly): firefly-perf-cli
For each repo the steps are:
- Transfer repo to new org. GitHub automatically redirects the old repo to the new one. Existing imports continue to function exactly as before
- Update
go.mod with new org/repo name and update all import paths across .go source files.
- Update hardcoded
ghcr.io/hyperledger/ image references in workflows.
- Make a minor release to test CI
Existing imports of Go packages will continue to work. When users update their package version they will see an import error and need to update imports/go.mod:
go: github.com/2ec76f8bee8a4e47c9dcd92df5eb27bc/firefly-common@v1.6.1: parsing go.mod:
module declares its path as: github.com/d1070c86639b82c5758e7bf79873b21e/firefly-common
but was required as: github.com/2ec76f8bee8a4e47c9dcd92df5eb27bc/firefly-common
While GitHub redirects all requests for the repo it does not redirect GitHub Pages. To handle this the 404.html in the org site will be updated to redirect FireFly docs to the new org. This relies on the organisation remaining active for a transitional period.
Additional steps:
Docker images stored in GitHub packages/GHCR will not automatically transfer or redirect. Images must be recreated under ghcr.io/hyperledger-firefly/ in the new org. Several repos reference GHCR images. These references must be updated as part of each repo's migration, particularly in firefly core (which embeds all connector image paths) and firefly-helm-charts.
Some repos contain hardcoded references to github.com/hyperledger/ or ghcr.io/hyperledger/ outside of go.mod in source code and workflow files. These must be updated in addition to the go.mod changes. firefly-cli in particular embeds image references directly in source, so these must be updated before any post-migration release.
@hyperledger/firefly-sdk is published under the @hyperledger npm scope. @ryjones — are we keeping this scope or moving to @hyperledger-firefly? An NPM token org secret will need to be created in the new org. If moving scope, downstream consumers must be updated and the old package deprecated with a pointer to the new one.
The Homebrew formula will need to be updated after firefly-cli is migrated.
Alternatives
Alternative approaches involving keeping a repository at the old path have not been considered due to the following note from GitHub docs:
If the transferred repository contains an action listed on GitHub Marketplace, or had more than 100 clones or more than 100 uses of GitHub Actions in the week prior to the transfer, GitHub permanently retires the owner name and repository name combination (OWNER/REPOSITORY-NAME) when you transfer the repository. If you try to create a repository using a retired owner name and repository name combination, you will see the error: "The repository REPOSITORY_NAME has been retired and cannot be reused."
I've started testing the steps for migrating all FireFly repos from the
hyperledgerorg tohyperledger-firefly. This testing has initially focussed on reducing impact to users of the golang packages.This was initially discussed in Discord thread.
Approach
Repos should be transferred in dependency order. Roughly:
firefly-fir,firefly-common,firefly-ethconnect,firefly-fabconnect,firefly-cordaconnect,firefly-dataexchange-https,firefly-tokens-erc1155,firefly-tokens-erc20-erc721,firefly-ui,firefly-cardano,firefly-sdk-nodejs,firefly-helm-charts,firefly-samplesfirefly-common):firefly-signer,firefly-transaction-managerfirefly(core),firefly-cli,firefly-evmconnect,firefly-tezosconnect,firefly-sandboxfirefly):firefly-perf-cliFor each repo the steps are:
go.modwith new org/repo name and update all import paths across.gosource files.ghcr.io/hyperledger/image references in workflows.Existing imports of Go packages will continue to work. When users update their package version they will see an import error and need to update imports/go.mod:
While GitHub redirects all requests for the repo it does not redirect GitHub Pages. To handle this the 404.html in the org site will be updated to redirect FireFly docs to the new org. This relies on the organisation remaining active for a transitional period.
Additional steps:
Docker images stored in GitHub packages/GHCR will not automatically transfer or redirect. Images must be recreated under
ghcr.io/hyperledger-firefly/in the new org. Several repos reference GHCR images. These references must be updated as part of each repo's migration, particularly infireflycore (which embeds all connector image paths) andfirefly-helm-charts.Some repos contain hardcoded references to
github.com/hyperledger/orghcr.io/hyperledger/outside ofgo.modin source code and workflow files. These must be updated in addition to thego.modchanges.firefly-cliin particular embeds image references directly in source, so these must be updated before any post-migration release.@hyperledger/firefly-sdkis published under the@hyperledgernpm scope. @ryjones — are we keeping this scope or moving to@hyperledger-firefly? An NPM token org secret will need to be created in the new org. If moving scope, downstream consumers must be updated and the old package deprecated with a pointer to the new one.The Homebrew formula will need to be updated after
firefly-cliis migrated.Alternatives
Alternative approaches involving keeping a repository at the old path have not been considered due to the following note from GitHub docs: