From a344015811e618d51e89d3ada305fd10761ebdb0 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 5 Sep 2024 13:15:59 -0500 Subject: [PATCH] bump go 1.23; implement one iter.Seq --- .github/workflows/integration-tests.yml | 2 +- .tool-versions | 2 +- core/platform/monitoring.go | 16 +++++++++++++++- core/scripts/go.mod | 2 +- core/services/workflows/engine.go | 2 +- deployment/go.mod | 4 +++- go.mod | 2 +- integration-tests/.tool-versions | 2 +- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 2 +- 10 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 52c8e8f71b2..014b19ce05f 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -148,7 +148,7 @@ jobs: - name: Lint Go uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 with: - version: v1.59.1 + version: v1.62.0 # We already cache these directories in setup-go skip-pkg-cache: true skip-build-cache: true diff --git a/.tool-versions b/.tool-versions index 70b6d01ce14..49f7ef749d1 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -golang 1.22.8 +golang 1.23.3 mockery 2.46.3 nodejs 20.13.1 pnpm 9.4.0 diff --git a/core/platform/monitoring.go b/core/platform/monitoring.go index 30221db240c..b5e12ace80c 100644 --- a/core/platform/monitoring.go +++ b/core/platform/monitoring.go @@ -1,5 +1,10 @@ package platform +import ( + "iter" + "slices" +) + // Observability keys const ( KeyCapabilityID = "capabilityID" @@ -12,4 +17,13 @@ const ( KeyStepRef = "stepRef" ) -var OrderedLabelKeys = []string{KeyStepRef, KeyStepID, KeyTriggerID, KeyCapabilityID, KeyWorkflowExecutionID, KeyWorkflowID} +func LabelKeysSorted() iter.Seq[string] { + return slices.Values([]string{ + KeyStepRef, + KeyStepID, + KeyTriggerID, + KeyCapabilityID, + KeyWorkflowExecutionID, + KeyWorkflowID, + }) +} diff --git a/core/scripts/go.mod b/core/scripts/go.mod index caf3d5e68e6..3da96a04067 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/core/scripts -go 1.22.8 +go 1.23 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../../ diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index e20af85540d..ccb81e1c116 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -1280,7 +1280,7 @@ func (e *workflowError) Error() string { } // prefix the error with the labels - for _, label := range platform.OrderedLabelKeys { + for label := range platform.LabelKeysSorted() { // This will silently ignore any labels that are not present in the map // are we ok with this? if value, ok := e.labels[label]; ok { diff --git a/deployment/go.mod b/deployment/go.mod index 19720794189..36331da32ec 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -1,6 +1,8 @@ module github.com/smartcontractkit/chainlink/deployment -go 1.22.8 +go 1.23 + +toolchain go1.23.0 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../ diff --git a/go.mod b/go.mod index 2b6f03333c0..a183c7ad11d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/v2 -go 1.22.8 +go 1.23 require ( github.com/Depado/ginprom v1.8.0 diff --git a/integration-tests/.tool-versions b/integration-tests/.tool-versions index e85f4cdc4e5..5d980451979 100644 --- a/integration-tests/.tool-versions +++ b/integration-tests/.tool-versions @@ -1,4 +1,4 @@ -golang 1.22.8 +golang 1.23.3 k3d 5.4.6 kubectl 1.25.5 nodejs 20.13.1 diff --git a/integration-tests/go.mod b/integration-tests/go.mod index aba17e10397..7a9dc06f029 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/integration-tests -go 1.22.8 +go 1.23 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../ diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index c89baf21bd9..ec543b9d982 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/load-tests -go 1.22.8 +go 1.23 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../../