Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump go 1.23; implement one iter.Seq #14353

Merged
merged 2 commits into from
Nov 20, 2024
Merged

bump go 1.23; implement one iter.Seq #14353

merged 2 commits into from
Nov 20, 2024

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Sep 5, 2024

This PR bumps the core modules to go 1.23, and demonstrates the new range over iter.Seq API by converting a mutable slice.

@jmank88 jmank88 requested review from a team as code owners September 5, 2024 18:16
@jmank88 jmank88 requested review from krehermann, ilija42 and a team and removed request for a team September 5, 2024 18:16
EasterTheBunny
EasterTheBunny previously approved these changes Sep 5, 2024
ilija42
ilija42 previously approved these changes Sep 6, 2024
@ilija42 ilija42 enabled auto-merge September 6, 2024 12:08
@ilija42 ilija42 disabled auto-merge September 6, 2024 12:08
@jmank88 jmank88 dismissed stale reviews from ilija42 and EasterTheBunny via 92327eb October 16, 2024 11:48
@jmank88 jmank88 requested a review from a team as a code owner October 16, 2024 11:48
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

Below is an analysis created by an LLM. Be mindful of hallucinations and verify accuracy.

WF: CI Core#92327eb

1. Invalid reference to runtime.stopTheWorld in abigen:[Clean Go Tidy & Generate]

Source of Error:
Clean Go Tidy & Generate	make generate	2024-10-16T11:50:42.2653354Z # github.com/ethereum/go-ethereum/cmd/abigen
Clean Go Tidy & Generate	make generate	2024-10-16T11:50:42.2654404Z link: github.com/fjl/memsize: invalid reference to runtime.stopTheWorld
Clean Go Tidy & Generate	make generate	2024-10-16T11:50:42.4719014Z make: CHANGELOG.md GNUmakefile LICENSE README.md SECURITY.md ccip common config_docs_test.go contracts core dashboard-lib docs error_reporter_actions flake.lock flake.nix fuzz go.md go.mod go.sum integration-tests internal main.go main_test.go nix.conf operator_ui package.json plugins pnpm-lock.yaml runlog.log shell.nix sonar-project.properties testdata tools [GNUmakefile:95: abigen] Error 1

Why: The error is caused by an invalid reference to runtime.stopTheWorld in the abigen tool, which is part of the Go Ethereum project. This could be due to an outdated or incompatible version of a dependency.

Suggested fix: Update the go-ethereum dependency to a version that either fixes or removes the invalid reference. Ensure all dependencies are compatible with the current Go runtime environment.

2. Test failures due to sensitive string checks and other issues:[Core Tests (go_core_tests)]

Source of Error:
Core Tests (go_core_tests)	Run tests	2024-10-16T12:02:05.6145571Z go_core_tests exiting with code 1

Why: The test suite failed, possibly due to assertions that did not pass or unexpected behavior in the application logic. The logs indicate issues with sensitive string checks and other test failures.

Suggested fix: Review the failing tests and the associated application logic. Fix any bugs or incorrect assumptions in the tests or the code being tested. Ensure that all configurations and environment setups are correct for the tests.

3. Panic due to slice bounds out of range in OCR key tests:[Flakey Test Detection]

Source of Error:
Flakey Test Detection	Re-run tests	2024-10-16T12:07:20.4623629Z {"Time":"2024-10-16T12:07:20.461925773Z","Action":"output","Package":"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey","Test":"TestOCRKeys_BundleSetID","Output":"panic: runtime error: slice bounds out of range [:32] with capacity 13 [recovered]\n"}

Why: The panic is caused by attempting to access a slice beyond its capacity, which is a common runtime error in Go. This indicates a bug in the code where slice boundaries are not correctly checked.

Suggested fix: Review and correct the slice operations in the TestOCRKeys_BundleSetID function or related methods. Ensure that slices are accessed within their valid boundaries. Add checks to prevent out-of-bound access.

Copy link
Contributor

github-actions bot commented Nov 11, 2024

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Find New Flaky Tests In Chainlink Project / Get Tests To Run , lint , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , Find New Flaky Tests In Deployment Project / Get Tests To Run , Find New Flaky Tests In Deployment Project / Run Tests , Find New Flaky Tests In Chainlink Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/cmd, ubuntu-latest) , Find New Flaky Tests In Deployment Project / Report , Find New Flaky Tests In Chainlink Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey, ubuntu-la... , Find New Flaky Tests In Chainlink Project / Report , Flakey Test Detection , SonarQube Scan

1. CSA key does not exist: Run Tests (github.com/smartcontractkit/chainlink/v2/core/cmd, ubuntu-latest)

Source of Error:
logger.go:146: 2024-11-19T20:28:42.113Z	ERROR	chainlink/application.go:706	[Feeds Service] Failed to start CSA key does not exist	{"version": "unset@unset"}
github.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*ChainlinkApplication).Start
	/home/runner/work/chainlink/chainlink/core/services/chainlink/application.go:706
github.com/smartcontractkit/chainlink/v2/core/internal/cltest.(*TestApplication).Start
	/home/runner/work/chainlink/chainlink/core/internal/cltest/cltest.go:606
github.com/smartcontractkit/chainlink/v2/core/cmd_test.startNewApplicationV2
	/home/runner/work/chainlink/chainlink/core/cmd/shell_remote_test.go:75
github.com/smartcontractkit/chainlink/v2/core/cmd_test.TestShell_ListETHKeys
	/home/runner/work/chainlink/chainlink/core/cmd/eth_keys_commands_test.go:97
testing.tRunner
	/opt/hostedtoolcache/go/1.23.3/x64/src/testing/testing.go:1690

Why: The error indicates that the Feeds Service failed to start because the required CSA (Chainlink Service Agreement) key does not exist. This is likely due to a missing or misconfigured key in the test environment.

Suggested fix: Ensure that the CSA key is properly configured and available in the test environment. This might involve setting up the key in the configuration files or environment variables used by the test.

2. Mock method called over expected times: Run Tests (github.com/smartcontractkit/chainlink/v2/core/cmd, ubuntu-latest)

Source of Error:
mock.go:337: 
assert: mock: The method has been called over 1 times.
	Either do one more Mock.On("NonceAt").Return(...), or remove extra call.
	This call was unexpected:
		NonceAt(*context.timerCtx,common.Address,*big.Int)
		0: &context.timerCtx{cancelCtx:context.cancelCtx{Context:(*context.cancelCtx)(0xc00cc1a0a0), mu:sync.Mutex{state:0, sema:0x0}, done:atomic.Value{v:(chan struct {})(0xc007b202a0)}, children:map[context.canceler]struct {}{}, err:error(nil), cause:error(nil)}, timer:(*time.Timer)(0xc001ff9c00), deadline:time.Time{wall:0xc1c75bb4c90ba181, ext:670741372686, loc:(*time.Location)(0xa8b0640)}}
		1: 0x36Ea08b44FEF6099CA391e19293B3525872983F6
		2: <nil>
	at: [/home/runner/work/chainlink/chainlink/core/chains/evm/client/mocks/client.go:1352 /home/runner/work/chainlink/chainlink/core/chains/evm/txmgr/client.go:120 /home/runner/work/chainlink/chainlink/common/txmgr/confirmer.go:294 /home/runner/work/chainlink/chainlink/common/txmgr/confirmer.go:269 /home/runner/work/chainlink/chainlink/common/txmgr/confirmer.go:255 /home/runner/work/chainlink/chainlink/common/txmgr/confirmer.go:240 /opt/hostedtoolcache/go/1.23.3/x64/src/runtime/asm_amd64.s:1700]

Why: The error occurs because the mock method NonceAt was called more times than expected. This indicates a discrepancy between the expected and actual number of calls to this method during the test.

Suggested fix: Adjust the mock setup to either allow for the additional calls by adding more Mock.On("NonceAt").Return(...) statements or investigate why the method is being called more times than expected and adjust the test logic accordingly.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@jmank88 jmank88 force-pushed the go-1.23 branch 5 times, most recently from a344015 to f43d9c7 Compare November 14, 2024 16:57
@jmank88
Copy link
Contributor Author

jmank88 commented Nov 19, 2024

Conflicts resolved

@jmank88 jmank88 disabled auto-merge November 19, 2024 20:29
Copy link
Contributor

Flaky Test Detector for github.com/smartcontractkit/chainlink project has failed ❌

Ran new or updated tests between develop and 6759ab2 (go-1.23).

View Flaky Detector Details | Compare Changes

Flaky Tests

Ran 278 unique tests. Below are the tests identified as flaky, with a pass ratio lower than the 99% threshold:

TestPackage                                        TestName                     PassRatio  RunCount   Skipped
---------                                          ---------                    ---------  ---------  ---------
github.com/smartcontractkit/chainlink/v2/core/cmd  TestShell_ListETHKeys_Error  67%        3          false
github.com/smartcontractkit/chainlink/v2/core/cmd  TestShell_ListETHKeys        67%        3          false

@jmank88 jmank88 enabled auto-merge November 19, 2024 22:21
@jmank88 jmank88 added this pull request to the merge queue Nov 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 20, 2024
Merged via the queue into develop with commit 43f0ff1 Nov 20, 2024
166 of 168 checks passed
@jmank88 jmank88 deleted the go-1.23 branch November 20, 2024 11:33
cedric-cordenier pushed a commit that referenced this pull request Nov 20, 2024
* bump go 1.23; implement one iter.Seq

* fix linter issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants