Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

migration: Generate upgrade paths statically and make available in migrator#39546

Merged
efritz merged 7 commits into
mainfrom
ef/upgrade-data
Jul 27, 2022
Merged

migration: Generate upgrade paths statically and make available in migrator#39546
efritz merged 7 commits into
mainfrom
ef/upgrade-data

Conversation

@efritz

@efritz efritz commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

This PR adds a file into git about upgrade metadata that can be baked into the migrator binary. This will be used by a future sg migration upgrade/migrator upgrade command without requiring access to the Sourcegraph repository clone (what the current stitch tooling is built on top of).

Test plan

Checked output manually.

@efritz efritz force-pushed the ef/upgrade-data branch from ff2c633 to fcd2167 Compare July 27, 2022 22:50
@efritz efritz marked this pull request as ready for review July 27, 2022 22:51
@efritz efritz requested a review from mrnugget July 27, 2022 22:53
Comment thread internal/database/migration/cliutil/upgrade_data/payload.json Outdated
var MinVersion = oobmigration.NewVersion(3, 29)

// MaxVersion is the highest known released version at the time the migrator was built.
var MaxVersion = oobmigration.NewVersion(3, 42)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to become a release step?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could we derive it from version.Version() so it's not manual? I assume not, it would not return anything useful for dev builds though :/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also concerned about this max, but I think I can baby site it for a release or two until we can unify things like that, the appropriate src-cli patch version, etc.

Comment thread internal/database/migration/cliutil/upgrade_data.go Outdated
Comment thread internal/database/migration/cliutil/upgrade_data/main.go Outdated
Comment thread internal/database/migration/cliutil/upgrade_data/main.go
efritz and others added 4 commits July 27, 2022 18:00
@efritz efritz enabled auto-merge (squash) July 27, 2022 23:06
@efritz efritz merged commit cc0bb8e into main Jul 27, 2022
@efritz efritz deleted the ef/upgrade-data branch July 27, 2022 23:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants