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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocker: the table is still being written to.
autopilot'ssave_competitionstill inserts intoauction_priceson every auction:crates/autopilot/src/database/competition.rs:51→database::auction_prices::insert(...)→INSERT INTO auction_prices (...)(crates/database/src/auction_prices.rs:26)crates/autopilot/src/run_loop.rs:642), inside atry_join!whose error is propagated with?.Once this migration runs, that
INSERTwill fail with relation "auction_prices" does not exist, rolling back the whole competition-save transaction and failing post-processing for every auction. Because migrations apply before/independently of the new binary rolling out, this breaks autopilot regardless of deploy ordering.The write path (
insertincrates/database/src/auction_prices.rsand its call site incompetition.rs) must be removed before or together with dropping the table.Also note the deprecation comment in
crates/database/src/auction_prices.rs:1-3states the table "can't currently be removed, since the solver team is still using it." If that's stale, please confirm with the solver team (and any analytics/replica consumers) before dropping — otherwise it's an external breakage too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Why did you decide to apply this change on top of
maininstead of the PR series that actually removes and refactors the related code?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to do a bit of git surgery on the other branches, I was just tired of it so I just took the code out and placed it outside. Eventually it gets merged to main anyway