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

1 changeset CCIP deployment logic #16686

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Conversation

stackman27
Copy link
Contributor

Requires

Supports

Copy link
Contributor

github-actions bot commented Mar 6, 2025

AER Report: CI Core

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

1. Error return value is not checked: Golang Lint (deployment)

Source of Error:
deployment/ccip/changeset/v1_6/init_chain_e2e.go:136:11: Error return value is not checked (errcheck)
WriteFile("/Users/stackman/Desktop/chainlink-deployments/domains/ccip/staging-bix/addresses.json", addrs)
 ^
**Why**: The `WriteFile` function call does not check the returned error, which is a common best practice to ensure the operation succeeded.

Suggested fix: Add error handling for the WriteFile function call to check and handle any potential errors.

2. Expect WriteFile permissions to be 0600 or less: Golang Lint (deployment)

Source of Error:
deployment/ccip/changeset/v1_6/init_chain_e2e.go:147:9: G306: Expect WriteFile permissions to be 0600 or less (gosec)
return os.WriteFile(path, b, 0644)
 ^
**Why**: The file permissions set by `os.WriteFile` are too permissive. Security best practices recommend using more restrictive permissions.

Suggested fix: Change the file permissions to 0600 or less to restrict access.

3. File is not properly formatted: Golang Lint (deployment)

Source of Error:
deployment/ccip/changeset/v1_6/init_chain_e2e.go:8:1: File is not properly formatted (goimports)
"github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock"
 ^
**Why**: The file does not adhere to the standard Go formatting rules, which can lead to inconsistencies and readability issues.

Suggested fix: Run goimports on the file to automatically format it according to Go standards.

4. fmt.Errorf call has arguments but no formatting directives: Golang Lint (deployment)

Source of Error:
deployment/ccip/changeset/v1_6/init_chain_e2e.go:79:50: printf: fmt.Errorf call has arguments but no formatting directives (govet)
return deployment.ChangesetOutput{}, fmt.Errorf("Error running DeployPrerequisiteChainContracts: ", err)
 ^
**Why**: The `fmt.Errorf` function is used incorrectly. It has arguments but no formatting directives, which can lead to runtime errors.

Suggested fix: Add appropriate formatting directives to the fmt.Errorf call, such as %v for the error.

5. fmt.Errorf call has arguments but no formatting directives: Golang Lint (deployment)

Source of Error:
deployment/ccip/changeset/v1_6/init_chain_e2e.go:96:50: printf: fmt.Errorf call has arguments but no formatting directives (govet)
return deployment.ChangesetOutput{}, fmt.Errorf("Error running DeployChainContractsChangeset: ", err)
 ^
**Why**: Similar to the previous error, the `fmt.Errorf` function is used incorrectly.

Suggested fix: Add appropriate formatting directives to the fmt.Errorf call, such as %v for the error.

6. fmt.Errorf call has arguments but no formatting directives: Core Tests (go_core_ccip_deployment_tests)

Source of Error:
ccip/changeset/v1_6/init_chain_e2e.go:79:50: fmt.Errorf call has arguments but no formatting directives
**Why**: The `fmt.Errorf` function is used incorrectly. It has arguments but no formatting directives, which can lead to runtime errors.

Suggested fix: Add appropriate formatting directives to the fmt.Errorf call, such as %v for the error.

7. fmt.Errorf call has arguments but no formatting directives: Core Tests (go_core_ccip_deployment_tests)

Source of Error:
ccip/changeset/v1_6/init_chain_e2e.go:96:50: fmt.Errorf call has arguments but no formatting directives
**Why**: Similar to the previous error, the `fmt.Errorf` function is used incorrectly.

Suggested fix: Add appropriate formatting directives to the fmt.Errorf call, such as %v for the error.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@stackman27 stackman27 changed the title setup 1 changeset CCIP deployment logic Mar 8, 2025
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)
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 SonarQube IDE SonarQube IDE

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