cli: conditionally allow version skipping#121011
Closed
celiala wants to merge 1 commit intocockroachdb:masterfrom
Closed
cli: conditionally allow version skipping#121011celiala wants to merge 1 commit intocockroachdb:masterfrom
celiala wants to merge 1 commit intocockroachdb:masterfrom
Conversation
Member
a2ba9c3 to
fc3defe
Compare
Collaborator
Author
|
These tests are failing: The error message for all of these is something like
The error message for the below tests is more like
|
Collaborator
Author
|
@RaduBerinde wondering if you might have any ideas on how to fix these failing tests? |
Member
|
In all these cases, we are probably executing a binary and we need to pass the new env var. The diff below fixes the logic tests. The other tests should be similar - let me know if you get stuck. --- a/pkg/sql/logictest/logic.go
+++ b/pkg/sql/logictest/logic.go
@@ -1317,8 +1317,19 @@ func (t *logicTest) newTestServerCluster(bootstrapBinaryPath, upgradeBinaryPath
}
}
- // During config initialization, NumNodes is required to be 3.
+ var envVars []string
+ if strings.Contains(upgradeBinaryPath, "cockroach-short") {
+ // If we're using a cockroach-short binary, that means it was
+ // locally built, so we need to opt-out of version offsetting to
+ // better simulate a real upgrade path.
+ envVars = append(envVars, "COCKROACH_TESTING_FORCE_RELEASE_BRANCH=true")
+ // The build is made during testing, so it has metamorphic constants.
+ // We disable them here so that the test is more stable.
+ envVars = append(envVars, "COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING=true")
+ }
+ envVars = append(envVars, "COCKROACH_ALLOW_VERSION_SKIPPING=true")
opts := []testserver.TestServerOpt{
+ // During config initialization, NumNodes is required to be 3.
testserver.ThreeNodeOpt(),
testserver.StoreOnDiskOpt(),
testserver.CacheSizeOpt(0.1),
@@ -1326,17 +1337,7 @@ func (t *logicTest) newTestServerCluster(bootstrapBinaryPath, upgradeBinaryPath
testserver.UpgradeCockroachBinaryPathOpt(upgradeBinaryPath),
testserver.PollListenURLTimeoutOpt(120),
testserver.CockroachLogsDirOpt(logsDir),
- }
- if strings.Contains(upgradeBinaryPath, "cockroach-short") {
- opts = append(opts, testserver.EnvVarOpt([]string{
- // If we're using a cockroach-short binary, that means it was
- // locally built, so we need to opt-out of version offsetting to
- // better simulate a real upgrade path.
- "COCKROACH_TESTING_FORCE_RELEASE_BRANCH=true",
- // The build is made during testing, so it has metamorphic constants.
- // We disable them here so that the test is more stable.
- "COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING=true",
- }))
+ testserver.EnvVarOpt(envVars), |
Currently the code allows upgrading from TWO previous releases (23.1 and 23.2); however, for now we only want to allow skipping a version experimentally. This commit changes the cli code to set the minimum supported version to `PreviousRelease` by default, or to `MinSupported` when a special env var is used. Epic: none Release note: None
fc3defe to
894d486
Compare
Member
|
Closing in favor of #121952. |
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.
This PR revives #113695, where we want to conditionally allow version skipping:
Currently the code allows upgrading from TWO previous releases (23.1 and 23.2); however, for now we only want to allow skipping a version experimentally.
This commit changes the cli code to set the minimum supported version to
PreviousReleaseby default, or toMinSupportedwhen a special env var is used.Epic: none
Release note: None