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

split upgrade command #16421

Closed
wants to merge 1 commit into from
Closed

split upgrade command #16421

wants to merge 1 commit into from

Conversation

tt-cll
Copy link
Contributor

@tt-cll tt-cll commented Feb 14, 2025

Requires

Supports

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

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

See analysis details on SonarQube

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

Copy link
Contributor

AER Report: CI Core

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

1. Subprocess launched with potential tainted input: Golang Lint (deployment)

Source of Error:
deployment/solana_chain.go:275:9: G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
cmd := exec.Command("solana", "program", "extend", "--keypair", upgradeAuthorityKey, programID, strconv.Itoa(additionalSpace))
^
**Why**: The `exec.Command` function is being used with potentially tainted inputs, which can lead to security vulnerabilities.

Suggested fix: Validate and sanitize all inputs before using them in the exec.Command function to ensure they are safe.

2. Non-wrapping format verb for fmt.Errorf: Golang Lint (deployment)

Source of Error:
deployment/solana_chain.go:248:61: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
return 0, fmt.Errorf("failed to parse data length: %v", err)
^
**Why**: The `fmt.Errorf` function is used without the `%w` verb, which is necessary for wrapping errors in Go.

Suggested fix: Replace %v with %w in the fmt.Errorf function to properly wrap the error.

3. Non-wrapping format verb for fmt.Errorf: Golang Lint (deployment)

Source of Error:
deployment/solana_chain.go:268:57: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
return 0, fmt.Errorf("failed to parse file size: %v", err)
^
**Why**: The `fmt.Errorf` function is used without the `%w` verb, which is necessary for wrapping errors in Go.

Suggested fix: Replace %v with %w in the fmt.Errorf function to properly wrap the error.

4. fmt.Errorf can be replaced with errors.New: Golang Lint (deployment)

Source of Error:
deployment/solana_chain.go:253:12: fmt.Errorf can be replaced with errors.New (perfsprint)
return 0, fmt.Errorf("data length not found in program account info")
^
**Why**: The `fmt.Errorf` function is used where `errors.New` would be more appropriate and efficient.

Suggested fix: Replace fmt.Errorf with errors.New for this specific error message.

5. fmt.Errorf can be replaced with errors.New: Golang Lint (deployment)

Source of Error:
deployment/solana_chain.go:302:13: fmt.Errorf can be replaced with errors.New (perfsprint)
return "", fmt.Errorf("buffer address not found in output")
^
**Why**: The `fmt.Errorf` function is used where `errors.New` would be more appropriate and efficient.

Suggested fix: Replace fmt.Errorf with errors.New for this specific error message.

6. Port is already allocated: Core Tests (go_core_ccip_deployment_tests)

Source of Error:
chain.go:132: Error creating solana network: start container: container start: Error response from daemon: driver failed programming external connectivity on endpoint blockchain-node-52d13 (d0d0d753bf615cea756ec03438b7b8351b4d90246e653b228eb55d4b31222bca): Bind for 0.0.0.0:25003 failed: port is already allocated
**Why**: The specified port `25003` is already in use, causing the container to fail to start.

Suggested fix: Ensure that the port 25003 is free before starting the container, or configure the container to use a different port.

7. Failed to upgrade program: Core Tests (go_core_ccip_deployment_tests)

Source of Error:
solana/cs_deploy_chain.go:71: Failed to deploy CCIP contracts: failed to upgrade program: error getting current program account size: exit status 1
**Why**: The deployment process failed due to an error in upgrading the program, specifically related to getting the current program account size.

Suggested fix: Investigate the cause of the failure in getting the current program account size and ensure that the program account is accessible and correctly configured.

8. At least one 'GolangCI Lint' matrix job failed: lint

Source of Error:
Check Golangci-lint Matrix Results	2025-02-14T20:58:35.4010696Z ##[group]Run echo "At least one 'GolangCI Lint' matrix job failed. Check the failed lint jobs."
Check Golangci-lint Matrix Results	2025-02-14T20:58:35.4011893Z echo "At least one 'GolangCI Lint' matrix job failed. Check the failed lint jobs."
Check Golangci-lint Matrix Results	2025-02-14T20:58:35.4012691Z exit 1
Check Golangci-lint Matrix Results	2025-02-14T20:58:35.4761261Z At least one 'GolangCI Lint' matrix job failed. Check the failed lint jobs.
Check Golangci-lint Matrix Results	2025-02-14T20:58:35.4782489Z ##[error]Process completed with exit code 1.
**Why**: One or more GolangCI Lint jobs failed, causing the overall lint check to fail.

Suggested fix: Review the specific lint errors reported in the failed jobs and address them accordingly to ensure all lint checks pass.

@tt-cll tt-cll closed this Feb 15, 2025
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.

1 participant