Repository navigation
fix(cli): warn when sync stops after saving the lock file - #643
Merged
Merged
Conversation
A sync stopped by Ctrl-C or SIGINT after writing the lock file left it ahead of the installed drivers without a warning. The warning is now printed once after the program stops, worded for a failed install or a stop. Once the program has stopped, a worker still preparing no longer writes the lock file.
Member
|
Looks good to me. No blocking issues, just a few small notes. Checks run on 2d73e19: How the fix holds up
Nits
|
Member
Author
|
Thank you for your review. I've updated the comments. |
This branch was previously deployed
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.
Follow-ups to the non-blocking review notes on #630, #631, #634 and #635.
dbc syncsaves the lock file before installing. It already warned on install failure, but could exit without a warning after Ctrl-C or SIGINT. It now warns once on stderr if it saved the lock file and installation did not finish or could not be confirmed.On an install error, the warning asks you to fix it and rerun
dbc sync. On interruption, it says installation "may be incomplete" and asks you to rerun, since the last install may have finished before sync received its result. Both warnings say the lock file "has been saved" to avoid implying that its contents changed.SIGINT stops the CLI program without canceling sync's worker context. On exit, sync prevents a preparation worker from starting a lock-file write and waits for any write already in progress before deciding whether to warn.
Smaller follow-ups:
Target.PlatformTuple()directly (fix: consistently match platforms by canonical target #630).GetWithConstraintignores build metadata when selecting a record (fix!: match exact driver package versions including build metadata #634).