From d203c0abe3e6acfc7a025f26c19da8ca7573f3d2 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:15:40 -0600 Subject: [PATCH] test: update deployer default images (#19554) --- .../catalogv2/explicit_destinations_test.go | 2 +- .../catalogv2/implicit_destinations_test.go | 2 +- test-integ/topoutil/images.go | 36 ------------------- testing/deployer/topology/default_versions.go | 8 ++--- testing/deployer/update-latest-versions.sh | 2 ++ 5 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 test-integ/topoutil/images.go diff --git a/test-integ/catalogv2/explicit_destinations_test.go b/test-integ/catalogv2/explicit_destinations_test.go index 9c86e05952..fe8d751e4a 100644 --- a/test-integ/catalogv2/explicit_destinations_test.go +++ b/test-integ/catalogv2/explicit_destinations_test.go @@ -108,7 +108,7 @@ func (c testBasicL4ExplicitDestinationsCreator) NewConfig(t *testing.T) *topolog } return &topology.Config{ - Images: topoutil.TargetImages(), + Images: utils.TargetImages(), Networks: []*topology.Network{ {Name: clusterName}, {Name: "wan", Type: "wan"}, diff --git a/test-integ/catalogv2/implicit_destinations_test.go b/test-integ/catalogv2/implicit_destinations_test.go index daf19945a9..da3180bcf7 100644 --- a/test-integ/catalogv2/implicit_destinations_test.go +++ b/test-integ/catalogv2/implicit_destinations_test.go @@ -108,7 +108,7 @@ func (c testBasicL4ImplicitDestinationsCreator) NewConfig(t *testing.T) *topolog } return &topology.Config{ - Images: topoutil.TargetImages(), + Images: utils.TargetImages(), Networks: []*topology.Network{ {Name: clusterName}, {Name: "wan", Type: "wan"}, diff --git a/test-integ/topoutil/images.go b/test-integ/topoutil/images.go deleted file mode 100644 index 49c5fdda4c..0000000000 --- a/test-integ/topoutil/images.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package topoutil - -import ( - "os" - - "github.com/hashicorp/consul/test/integration/consul-container/libs/utils" - "github.com/hashicorp/consul/testing/deployer/topology" -) - -func TargetImages() topology.Images { - // Start with no preferences. - var images topology.Images - if !runningInCI() { - // Until 1.17 GAs, we want the pre-release versions for these tests, - // run outside of CI for convenience. - images = topology.Images{ - ConsulCE: HashicorpDockerProxy + "/hashicorppreview/consul:1.17-dev", - ConsulEnterprise: HashicorpDockerProxy + "/hashicorppreview/consul-enterprise:1.17-dev", - Dataplane: HashicorpDockerProxy + "/hashicorppreview/consul-dataplane:1.3-dev", - } - } - - // We want the image overridden by the local build produced by - // 'make test-deployer-setup' or 'make dev-docker'. - testImages := utils.TargetImages() - images = images.OverrideWith(testImages) - - return images -} - -func runningInCI() bool { - return os.Getenv("GITHUB_ACTIONS") != "" || os.Getenv("CI") != "" -} diff --git a/testing/deployer/topology/default_versions.go b/testing/deployer/topology/default_versions.go index b35bb7ecfa..d4743b8626 100644 --- a/testing/deployer/topology/default_versions.go +++ b/testing/deployer/topology/default_versions.go @@ -6,8 +6,8 @@ package topology const ( - DefaultConsulImage = "hashicorp/consul:1.16.2" - DefaultConsulEnterpriseImage = "hashicorp/consul-enterprise:1.16.2-ent" - DefaultEnvoyImage = "envoyproxy/envoy:v1.26.4" - DefaultDataplaneImage = "hashicorp/consul-dataplane:1.2.2" + DefaultConsulImage = "hashicorp/consul:1.17.0" + DefaultConsulEnterpriseImage = "hashicorp/consul-enterprise:1.17.0-ent" + DefaultEnvoyImage = "envoyproxy/envoy:v1.27.2" + DefaultDataplaneImage = "hashicorp/consul-dataplane:1.3.0" ) diff --git a/testing/deployer/update-latest-versions.sh b/testing/deployer/update-latest-versions.sh index 16f0231422..7c2eef790a 100755 --- a/testing/deployer/update-latest-versions.sh +++ b/testing/deployer/update-latest-versions.sh @@ -32,7 +32,9 @@ docker run -d --name consul-envoy-check "$consul_latest" envoy_version="" while true; do # We have to retry in case consul doesn't fully start up before we get here. + set +e envoy_version="$(docker exec consul-envoy-check sh -c 'wget -q localhost:8500/v1/agent/self -O -' | jq -r '.xDS.SupportedProxies.envoy[0]')" + set -e if [[ -n "$envoy_version" ]]; then break fi