feat: fix shipit_import command and make it more useful#1971
Merged
Conversation
Staging data is a mess; most testing (eg: of product details rebuilds) benefits more from production data.
Importing aborted and scheduled releases is really not going to help testing, and it seems to make the production backend return 502s more often than not.
76bf534 to
be55e09
Compare
This currently fails with an error about not being able to find the Flask app.
be55e09 to
7db658f
Compare
ahal
approved these changes
May 26, 2026
Contributor
ahal
left a comment
There was a problem hiding this comment.
Thanks for making this work again!
Importing everything takes ages, and in most cases is unnecessary.
This makes imports idempotent.
7db658f to
a2b68bc
Compare
bhearsum
added a commit
to bhearsum/shipit
that referenced
this pull request
May 27, 2026
…leng#1971) * feat: import from production ship it instance instead of staging Staging data is a mess; most testing (eg: of product details rebuilds) benefits more from production data. * fix: only fetch shipped releases during import Importing aborted and scheduled releases is really not going to help testing, and it seems to make the production backend return 502s more often than not. * fix: db session setup in shipit-import command This currently fails with an error about not being able to find the Flask app. * feat: print release names as they are imported * add support for importing versions * feat: add support for limiting the number of releases imported Importing everything takes ages, and in most cases is unnecessary. * fix: don't import releases that already exist This makes imports idempotent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was trying to test the rebuild product details functionality locally and found that was impractical (if not impossible) to get the right local data to do so. It seems we had the ability to import data from an existing instance once upon a time, but it long since broke. This pull request fixes it and adds the minimal enhancements needed to get a local database in shape enough to rebuild product details (import some or all releases; import nightly version information).
With this patch,
shipit_rebuild_product_detailsis able to regenerate product details locally aftershipit_importis run.This is probably best reviewed commit-by-commit.