Migrations#327
Conversation
|
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
7a73c63 to
407fa69
Compare
|
@Stebalien Are you able to review this, or pass along to someone else who can? Thank you! |
Stebalien
left a comment
There was a problem hiding this comment.
Looks reasonable to me. I didn't check every change in detail, but if it works, it works. And if something goes wrong, a manual "diff" should catch that.
aschmahmann
left a comment
There was a problem hiding this comment.
LGTM. @gammazero it looks like you've also fixed and cleaned up a few unrelated things.
I left some questions/comments trying to clarify this to make sure A) I understand B) that if we check into why a change was made a few months from now we know why.
| sed "s/ABCGHREPOXYZ/$(sedEscapeArg "$repo")/g" templates/Makefile | sed "s/ABCDISTNAMEXYZ/$name/g" > "dists/$name/Makefile" | ||
| sed "s/github.com\/foo\/bar/$(sedEscapeArg "$repo")/g" templates/Makefile | sed "s/cmd\/bar/$subpkg/g" > "dists/$name/Makefile" |
There was a problem hiding this comment.
Is this just an ancient bug fix?
There was a problem hiding this comment.
Yes. I was a bug leftover from when the string ABCDISTNAMEXYZ appeared in the Makefile template.
| const event = new Date() | ||
| const DIST_DOMAIN = 'dist.ipfs.io' | ||
| const MFS_DIR = `/${DIST_DOMAIN}` | ||
| const MFS_DIR = `/${DIST_DOMAIN}` + '_' + event.toISOString() |
There was a problem hiding this comment.
This means that people who run this will end up with one MFS reference per-build instead of one per dist website. Given that my understanding is we're pinning all the files we add anyway the only problem that could come up with this is just it polluting your MFS root space.
nit: WDYT about having some nesting to keep ipfs files ls / cleaner? An example might be /${DIST_DOMAIN}/${DIST_DOMAIN} + '_' + event.toISOString()`
There was a problem hiding this comment.
I actually want to pollute MFS root. The is so I see that I have multiple dists and remember to remove those that I no longer need. This is not for the purpose of archiving dists, but to avoid stepping on a previous one. Once I am happy with a dist, I expect to remove previous ones.
@Stebalien suggested in the previous review, that I use a random string here. I decided that date was more useful to determine which was the most recent.
There was a problem hiding this comment.
Honestly, keeping old ones should be fine as it shouldn't actually use any more data. It also makes it easier to delete them (delete the root).
But either way. I don't have strong opinions.
There was a problem hiding this comment.
this is just a local thing for the builder we can always change later if it becomes a problem with no significant consequences, so we can just leave it as is and figure it out.
31ab6cd to
492ae26
Compare
- Optional argument to dist.sh to specify sub-package - Fix Makefile to allow dist.sh to correctly edit variables - Do not generate web site data if distribution contains "no-site" file.
Each fs repo migration is build as a separate distribution
- Remove filtered_versions files - Do not create filtered_versions files
- Do not check that version files are sorted since that does not work with semver sorting.
Update migrations version to match current fs-repo-migrations.
- Fix build-go.sh to build using go modules, instead of GOPATH. - Update migration versions to 2.0.0
- Add build target "darwin arm64" for migrations - Update build matrix template
This PR creates individual distributions, for each IPFS fs repo migration. This enables migration tools to download a minimal set of migrations needed to go from one version of IPFS to another.
The individual migrations will be available from the ipfs network, but are not shown on the IPFS distributions web page**. Each migration has the same ipfs path structure as any other migration, so it can easily be found even in the absence of a link on the distributions web page. For example, the
ipfs-10-to-11migration can be found at https://dist.ipfs.io/ipfs-10-to-11 and will have the same contents as other migrations. NOTE: The migrations will not be published to IPFS until after approval/merge of this PR.This PR requires, and is built from, #320
Addresses issue #326
Additional modifications to the build scripts:
no-sitefilejqnot being able to read files directly** NOTE: There is a
no-sitefile in each migration distribution that prevents building the web page content for that distribution.CID: QmVxxcTSuryJYdQJGcS8SyhzN7NBNLTqVPAxpu6gp2ZcrR