Skip to content

feat: fix shipit_import command and make it more useful#1971

Merged
bhearsum merged 7 commits into
mozilla-releng:mainfrom
bhearsum:push-uqrlyutmslsx
May 26, 2026
Merged

feat: fix shipit_import command and make it more useful#1971
bhearsum merged 7 commits into
mozilla-releng:mainfrom
bhearsum:push-uqrlyutmslsx

Conversation

@bhearsum
Copy link
Copy Markdown
Contributor

@bhearsum bhearsum commented May 22, 2026

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_details is able to regenerate product details locally after shipit_import is run.

This is probably best reviewed commit-by-commit.

bhearsum added 2 commits May 22, 2026 10:52
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.
@bhearsum bhearsum force-pushed the push-uqrlyutmslsx branch from 76bf534 to be55e09 Compare May 22, 2026 15:08
@bhearsum bhearsum force-pushed the push-uqrlyutmslsx branch from be55e09 to 7db658f Compare May 22, 2026 15:14
@bhearsum bhearsum marked this pull request as ready for review May 22, 2026 15:23
@bhearsum bhearsum requested a review from a team as a code owner May 22, 2026 15:23
Copy link
Copy Markdown
Contributor

@ahal ahal left a comment

Choose a reason for hiding this comment

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

Thanks for making this work again!

Comment thread api/src/shipit_api/admin/cli.py Outdated
bhearsum added 2 commits May 26, 2026 16:45
Importing everything takes ages, and in most cases is unnecessary.
This makes imports idempotent.
@bhearsum bhearsum force-pushed the push-uqrlyutmslsx branch from 7db658f to a2b68bc Compare May 26, 2026 20:47
@bhearsum bhearsum merged commit 21c18ae into mozilla-releng:main May 26, 2026
7 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants