From c3dbb1c58914330257ab03f18dc35a30ccdc1412 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 2 Oct 2025 14:27:17 +0100 Subject: [PATCH] e2e: Add ability to skip known bad Consul versions in compat test. (#26867) If the latest Consul version has known bugs that cause failures of the test suite, it is useful to be able to skip this. Otherwise, CI will fail on all PRs and release branches until a new version is released. --- e2e/consulcompat/shared_download_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/e2e/consulcompat/shared_download_test.go b/e2e/consulcompat/shared_download_test.go index d337fad48..4a7235746 100644 --- a/e2e/consulcompat/shared_download_test.go +++ b/e2e/consulcompat/shared_download_test.go @@ -27,6 +27,18 @@ const ( exactConsulVersionEnv = "NOMAD_E2E_CONSULCOMPAT_CONSUL_VERSION" ) +var ( + // skipped versions are specific versions we skip due to known issues with + // that version. + // + // 1.22.0-rc1 is skipped as it introduced a dual stack check in the connect + // envoy command that did not use passed HTTP API flags to construct the + // config object and would always use defaults. + skippedVersions = []*version.Version{ + version.Must(version.NewVersion("1.22.0-rc1")), + } +) + func downloadConsulBuild(t *testing.T, b build, baseDir string) { path := filepath.Join(baseDir, binDir, b.Version) must.NoError(t, os.MkdirAll(path, 0755)) @@ -58,6 +70,15 @@ func getMinimumVersion(t *testing.T) *version.Version { return v } +func skipVersion(v *version.Version) bool { + for _, sv := range skippedVersions { + if v.Equal(sv) { + return true + } + } + return false +} + type build struct { Version string `json:"version"` OS string `json:"os"` @@ -134,6 +155,9 @@ func scanConsulVersions(t *testing.T, minimum *version.Version) *set.Set[build] if !usable(v, minimum) { continue } + if skipVersion(v) { + continue + } for _, build := range obj.Builds { if keep(build) { track.add(v, build)