tests: Determine initial version from filename #142
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.
Upgrade tests need to determine the initial MicroOVN version so that it can be deployed, and then upgraded to the MicroOVN built from source. This verifies that the upgrade path is possible.
This initial version was previously controlled by env variable
MICROOVN_SNAP_CHANNEL
, but the limitation was that in a single run, we could define only one set of upgrade tests (fromMICROOVN_SNAP_CHANNEL
to currently built).This change introduces a mechanism to determine the initial MicroOVN version based on the test filename instead. With this approach, we can create multiple symbolic links (e.g.
upgrade_22.03.bats -> upgrade.bast
,upgrade_24.03.bats -> upgrade.bats
) to trigger multiple parallel upgrade tests.Upgrade tests with the original/generic name (e.g.
upgrade.bats
) will upgrade from the version that's in the default channel for the MicroOVN snap.Some general thoughts/discussion:
Every branch,
main
,branch-22.03
,branch-24.03
will have to have a different set of upgrade tests.For
branch-22.03
we will:upgrade.bats
withupgrade_22.03.bats
This will ensure that any change backported to
branch-22.03
will test upgrade against22.03/stable
channelFor
main
branch we'll keep only theupgrade.bats
file. This ensures that whatever goes tomain
branch (as eventual successor to the current default channel), will be tested against whatever is currently default MicroOVN. We can not add something likeupgrade_22.03.bats
to themain
branch because we'll eventually build MicroOVN based onOVN 24.09
(and later), and that won't be compatible for upgrade from22.03
.Also, since the
main
will become the development of26.03
, we do not have to keep direct backward compatibility with22.03
, only with24.03
.For
branch-24.03
we will keep onlyupgrade.bats
for now. Once the24.03/stable
channel is released, we will:upgrade.bats
upgrade_22.03.bats
upgrade_24.03.bats
This will ensure that whatever we backport to
branch-24.03
will be tested for upgrade with22.03/stable
and24.03/stable
.I know this sounds like a lot, but after the initial setup, all we need to do in future releases is, at the point of publishing new stable channel, replace
upgrade.bats
withupgrade_<current_LTS>.bats
andupgrade_<previous_LTS>
in the corresponding branch.