diff --git a/.ci-operator.yaml b/.ci-operator.yaml new file mode 100644 index 000000000..e307e5af6 --- /dev/null +++ b/.ci-operator.yaml @@ -0,0 +1,4 @@ +build_root_image: + name: release + namespace: openshift + tag: rhel-9-release-golang-1.24-openshift-4.21 diff --git a/build/ci-tf-e2e.Dockerfile b/build/ci-tf-e2e.Dockerfile index b0276380b..b4fd1366b 100644 --- a/build/ci-tf-e2e.Dockerfile +++ b/build/ci-tf-e2e.Dockerfile @@ -10,7 +10,7 @@ RUN yum install -y wget &&\ chmod +x /usr/local/bin/ocm # go -RUN curl -Ls https://go.dev/dl/go1.23.9.linux-amd64.tar.gz |tar -C /usr/local -xzf - +RUN curl -Ls https://go.dev/dl/go1.24.9.linux-amd64.tar.gz |tar -C /usr/local -xzf - ENV PATH="/usr/local/go/bin:${PATH}" ENV GOPATH=/usr/local/go ENV TEST_OFFLINE_TOKEN="" @@ -27,4 +27,4 @@ RUN yum install -y yum-utils && \ go install go.uber.org/mock/mockgen@v0.3.0 &&\ cd terraform-provider-rhcs && go mod tidy && go mod vendor && make install &&\ chmod -R 777 $GOPATH &&\ - echo 'RUN done' \ No newline at end of file + echo 'RUN done' diff --git a/go.mod b/go.mod index 89ac26cb2..d1910d5d0 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/terraform-redhat/terraform-provider-rhcs -go 1.23.0 +go 1.24.0 -toolchain go1.23.9 +toolchain go1.24.9 require ( github.com/Masterminds/semver v1.5.0 @@ -17,9 +17,8 @@ require ( github.com/hashicorp/terraform-plugin-sdk v1.17.2 github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.30.0 - github.com/openshift-online/ocm-api-model/clientapi v0.0.434 github.com/openshift-online/ocm-common v0.0.12 - github.com/openshift-online/ocm-sdk-go v0.1.479 + github.com/openshift-online/ocm-sdk-go v0.1.481 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/thoas/go-funk v0.9.3 @@ -60,7 +59,8 @@ require ( github.com/go-jose/go-jose/v4 v4.0.2 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/openshift-online/ocm-api-model/model v0.0.434 // indirect + github.com/openshift-online/ocm-api-model/clientapi v0.0.436 // indirect + github.com/openshift-online/ocm-api-model/model v0.0.436 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/net v0.43.0 // indirect diff --git a/go.sum b/go.sum index 4034184d1..5dfbd7359 100644 --- a/go.sum +++ b/go.sum @@ -498,14 +498,14 @@ github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8 github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/openshift-online/ocm-api-model/clientapi v0.0.434 h1:ZpTM+gxzOFpSuV8OSYJvlXWocuchgRs301kfxU52dXA= -github.com/openshift-online/ocm-api-model/clientapi v0.0.434/go.mod h1:fZwy5HY2URG9nrExvQeXrDU/08TGqZ16f8oymVEN5lo= -github.com/openshift-online/ocm-api-model/model v0.0.434 h1:XhbQoeOh0BMESvFqXZdc1Nrm5CydyaT/hpuNWxTm1Ys= -github.com/openshift-online/ocm-api-model/model v0.0.434/go.mod h1:PQIoq6P8Vlb7goOdRMLK8nJY+B7HH0RTqYAa4kyidTE= +github.com/openshift-online/ocm-api-model/clientapi v0.0.436 h1:Uz+LG7fZ6d5hab1XSPqCg2JJrxq4fMmpiZYfuaIH9ck= +github.com/openshift-online/ocm-api-model/clientapi v0.0.436/go.mod h1:fZwy5HY2URG9nrExvQeXrDU/08TGqZ16f8oymVEN5lo= +github.com/openshift-online/ocm-api-model/model v0.0.436 h1:8KIJ2GHsFiroPdqvjOnqpwnAzIJUIg2ikYYjCmLCLw4= +github.com/openshift-online/ocm-api-model/model v0.0.436/go.mod h1:PQIoq6P8Vlb7goOdRMLK8nJY+B7HH0RTqYAa4kyidTE= github.com/openshift-online/ocm-common v0.0.12 h1:2oGZCXd8O/nZVlM0pvTtm3hDGbW/ncTtvSLLB+nuQf0= github.com/openshift-online/ocm-common v0.0.12/go.mod h1:6MWje2NFNJ3IWpGs7BYj6DWagWXHyp8EnmYY7XFTtI4= -github.com/openshift-online/ocm-sdk-go v0.1.479 h1:Zcvlc9UWx6Opyx2+2TrDpMmKDji7WDCDtWBG4BT8anc= -github.com/openshift-online/ocm-sdk-go v0.1.479/go.mod h1:z7e8pdSD/3xYYwS5imxizLB9z6xVaE5LclGDreLpYls= +github.com/openshift-online/ocm-sdk-go v0.1.481 h1:DGB4i3gXUNQwZlKth0m3N+i2FAM9IxetJ70NJdNvQ8M= +github.com/openshift-online/ocm-sdk-go v0.1.481/go.mod h1:/9HjZnR6/uyRaketBvbe4eyvbgZtrkd7Y4TzaqpZLcY= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= diff --git a/provider/clusterrosa/classic/cluster_rosa_classic_resource.go b/provider/clusterrosa/classic/cluster_rosa_classic_resource.go index 0730f3350..721e7c2a9 100644 --- a/provider/clusterrosa/classic/cluster_rosa_classic_resource.go +++ b/provider/clusterrosa/classic/cluster_rosa_classic_resource.go @@ -778,7 +778,7 @@ func validateHttpTokensVersion(ctx context.Context, state *ClusterRosaClassicSta msg := fmt.Sprintf("version '%s' is not supported with ec2_metadata_http_tokens, "+ "minimum supported version is %s", version, lowestHttpTokensVer) tflog.Error(ctx, msg) - return fmt.Errorf(msg) + return fmt.Errorf("version '%s' is not supported with ec2_metadata_http_tokens, minimum supported version is %s", version, lowestHttpTokensVer) } return nil } diff --git a/provider/common/cluster_waiter.go b/provider/common/cluster_waiter.go index 107acc034..585d723f6 100644 --- a/provider/common/cluster_waiter.go +++ b/provider/common/cluster_waiter.go @@ -37,7 +37,7 @@ func (dw *DefaultClusterWait) WaitForStdComputeNodesToBeReady(ctx context.Contex if err != nil && resp.Status() == http.StatusNotFound { message := fmt.Sprintf("Failed to get Cluster '%s', with error: %v", clusterId, err) tflog.Error(ctx, message) - return nil, fmt.Errorf(message) + return nil, fmt.Errorf("Failed to get Cluster '%s', with error: %v", clusterId, err) } tflog.Info(ctx, fmt.Sprintf("WaitForStdComputeNodesToBeReady: Cluster '%s' is expected to initiate with %d worker replicas."+ @@ -85,13 +85,13 @@ func (dw *DefaultClusterWait) WaitForClusterToBeReady(ctx context.Context, clust if err != nil && resp.Status() == http.StatusNotFound { message := fmt.Sprintf("Failed to get Cluster '%s', with error: %v", clusterId, err) tflog.Error(ctx, message) - return nil, fmt.Errorf(message) + return nil, fmt.Errorf("Failed to get Cluster '%s', with error: %w", clusterId, err) } currentState := resp.Body().State() if currentState == cmv1.ClusterStateError || currentState == cmv1.ClusterStateUninstalling { message := fmt.Sprintf("Cluster '%s' is in state '%s' and will not become ready", clusterId, currentState) tflog.Error(ctx, message) - return resp.Body(), fmt.Errorf(message) + return resp.Body(), fmt.Errorf("Cluster '%s' is in state '%s' and will not become ready", clusterId, currentState) } if currentState == cmv1.ClusterStateReady { tflog.Info(ctx, fmt.Sprintf("WaitForClusterToBeReady: Cluster '%s' is with state \"READY\"", clusterId))