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

make setup test deterministic #16182

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

krehermann
Copy link
Contributor

@krehermann krehermann commented Jan 31, 2025

CRE-233

flaky test fix; introduced yesterday in test setup refactoring

repo'd local within 15 executions consistently

fix was run 50x with no errors

Requires

Supports

@krehermann krehermann requested review from a team as code owners January 31, 2025 22:57
@krehermann krehermann requested review from AnieeG and jmank88 January 31, 2025 23:03
@krehermann krehermann enabled auto-merge January 31, 2025 23:06
for _, p2pSignerEncs := range nop2Nodes {
// deterministic order
// get the keys of the map and sort them
var keys []capabilities_registry.CapabilitiesRegistryNodeOperator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to this pr - is this lint check useful? if not, can we exclude that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was surprised by the linter warning. it seems noisy imo

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Copy link
Contributor

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , GolangCI Lint (deployment) , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , test-scripts , lint , SonarQube Scan

1. Consider pre-allocating keys:[Golang Lint (deployment)]

Source of Error:
Golang Lint (deployment)	2025-01-31T23:00:50.6558740Z ##[error]deployment/keystone/changeset/test/registry.go:101:2: Consider pre-allocating `keys` (prealloc)
Golang Lint (deployment)	2025-01-31T23:00:50.6559775Z 	var keys []capabilities_registry.CapabilitiesRegistryNodeOperator
Golang Lint (deployment)	2025-01-31T23:00:50.6560240Z 	^

Why: The linter suggests pre-allocating the keys slice to improve performance by reducing the number of allocations.

Suggested fix: Pre-allocate the keys slice by specifying its length or capacity if it is known beforehand. For example, keys := make([]capabilities_registry.CapabilitiesRegistryNodeOperator, 0, expectedLength).

@krehermann krehermann added this pull request to the merge queue Jan 31, 2025
Merged via the queue into develop with commit f791bf9 Jan 31, 2025
183 of 186 checks passed
@krehermann krehermann deleted the cre-233/flaky-update-nodes-test branch January 31, 2025 23:42
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.

3 participants