Prevent restoring snapshots to older releases#420
Merged
Conversation
This ensures all the individual scripts also detect the version step down if run individually.
dbussink
approved these changes
Aug 6, 2018
Merged
dooleydevin
added a commit
that referenced
this pull request
Jul 21, 2023
…/boxofyellow/2023-06/mssql-backup_0 Backport 348 for 3.7: Allow the caller to handle setting failures
Merged
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.
As pointed out in https://github.com/github/backup-utils/issues/403, Backup Utilities currently allows snapshots to be restored to older releases of GitHub Enterprise than that of the snapshot, ie 2.14.x to 2.13.x.
This isn't supported and causes problems when the database migrations run as they're only intended to be run in ascending order.
This PR implements a block to stop attempts to restore snapshots of newer releases of GitHub Enterprise to older releases of GitHub Enterprise. Snapshots can still be restored to older patch releases of the same release, eg 2.14.2 to 2.14.0, as no migrations take in during patch releases.
Whilst I was at it, I also simplified the version checking for two other tests, though I'm contemplating removing these tests entirely as we don't mimic restores against 2.11.0 anymore.
Fixes https://github.com/github/backup-utils/issues/403