[patch] Mongo remove upgrade assert #793
Merged
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.
This PR fixes a problem where we were expecting
--mongo-v5-upgrade
to be passed in when using--no-confirm
flag even if the Mongo was already upgraded to v5. The condition to enforce--mongo-v5-upgrade
is now inside the parent condition that checks if MongoDB version needs upgrading.Tests to prove it's working well now:
1. Upgrade Mongo v4 to v5
Interactive mode, warning will still be shown to let users know about the upgrade:
Non-interactive with
--no-confirm
- it must fail as--mongo-v5-upgrade
was not set:Non-interactive with
--no-confirm --mongo-v5-upgrade
- it must install update pipeline directly:2. Upgrade Mongo v5 to v5:
Interactive mode - no warning as no update needed:
Non-interactive with
--no-confirm
- it must NOT ask for--mongo-v5-upgrade
as no update needed: