Skip to content

Commit

Permalink
bump go 1.23; implement one iter.Seq (#14353)
Browse files Browse the repository at this point in the history
* bump go 1.23; implement one iter.Seq

* fix linter issues
  • Loading branch information
jmank88 authored Nov 19, 2024
1 parent 7682edc commit e1c6ef9
Show file tree
Hide file tree
Showing 52 changed files with 402 additions and 595 deletions.
1 change: 1 addition & 0 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ runs:
with:
go-version-file: ${{ inputs.go-version-file }}
cache: false
check-latest: true

- name: Get branch name
if: ${{ inputs.only-modules == 'false' }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/find-new-flaky-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
- name: Set up Go 1.21.9
uses: actions/setup-go@v5.0.2
with:
go-version: '1.21.9'
cache: false

- name: Install flakeguard
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
golang 1.22.8
golang 1.23.3
mockery 2.46.3
nodejs 20.13.1
pnpm 9.4.0
Expand Down
4 changes: 2 additions & 2 deletions core/chainlink.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build image: Chainlink binary
FROM golang:1.22-bullseye as buildgo
FROM golang:1.23-bullseye as buildgo
RUN go version
WORKDIR /chainlink

Expand Down Expand Up @@ -31,7 +31,7 @@ RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds | xargs
RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-solana | xargs -I % ln -s % /chainlink-solana

# Build image: Plugins
FROM golang:1.22-bullseye as buildplugins
FROM golang:1.23-bullseye as buildplugins
RUN go version

WORKDIR /chainlink-feeds
Expand Down
1 change: 1 addition & 0 deletions core/cmd/admin_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func (s *Shell) Profile(c *cli.Context) error {
}
respContent := string(b)
// taken from pprof.Profile https://github.com/golang/go/blob/release-branch.go1.20/src/net/http/pprof/pprof.go#L133
// note: no longer triggers as of 1.23
if strings.Contains(respContent, "profile duration exceeds server's WriteTimeout") {
errs <- fmt.Errorf("%w: %s", ErrProfileTooLong, respContent)
} else {
Expand Down
30 changes: 0 additions & 30 deletions core/cmd/shell_remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,36 +463,6 @@ func TestShell_ChangePassword(t *testing.T) {
require.Contains(t, err.Error(), "Unauthorized")
}

func TestShell_Profile_InvalidSecondsParam(t *testing.T) {
t.Parallel()

app := startNewApplicationV2(t, nil)
u := cltest.NewUserWithSession(t, app.AuthenticationProvider())
enteredStrings := []string{u.Email, cltest.Password}
prompter := &cltest.MockCountingPrompter{T: t, EnteredStrings: enteredStrings}

client := app.NewAuthenticatingShell(prompter)

set := flag.NewFlagSet("test", 0)
flagSetApplyFromAction(client.RemoteLogin, set, "")

require.NoError(t, set.Set("file", "../internal/fixtures/apicredentials"))
require.NoError(t, set.Set("bypass-version-check", "true"))

c := cli.NewContext(nil, set, nil)
err := client.RemoteLogin(c)
require.NoError(t, err)

// pick a value larger than the default http service write timeout
d := app.Config.WebServer().HTTPWriteTimeout() + 2*time.Second
set.Uint("seconds", uint(d.Seconds()), "")
tDir := t.TempDir()
set.String("output_dir", tDir, "")
err = client.Profile(cli.NewContext(nil, set, nil))
wantErr := cmd.ErrProfileTooLong
require.ErrorAs(t, err, &wantErr)
}

func TestShell_Profile(t *testing.T) {
t.Parallel()

Expand Down
16 changes: 15 additions & 1 deletion core/platform/monitoring.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package platform

import (
"iter"
"slices"
)

// Observability keys
const (
KeyCapabilityID = "capabilityID"
Expand All @@ -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,
})
}
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
@@ -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 => ../../
Expand Down
259 changes: 0 additions & 259 deletions core/services/keystore/keys/ocrkey/key_bundle.go

This file was deleted.

Loading

0 comments on commit e1c6ef9

Please sign in to comment.