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

Ccip-4675 promote candidate digest by plugin type #15763

Merged
merged 12 commits into from
Dec 19, 2024

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented Dec 19, 2024

Requires

Supports

@AnieeG AnieeG requested review from a team as code owners December 19, 2024 00:17
@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 , Flakeguard Root Project / Get Tests To Run , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , GolangCI Lint (deployment) , test-scripts , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , Flakeguard Deployment Project / Get Tests To Run , Flakeguard Root Project / Run Tests , Flakeguard Root Project / Report , Flakeguard Deployment Project / Run Tests (github.com/smartcontractkit/chainlink/deployment/ccip/changeset, ubuntu-latest) , lint , SonarQube Scan , Flakey Test Detection , Flakeguard Deployment Project / Report

1. fmt.Errorf can be replaced with errors.New:[Golang Lint (deployment)]

Source of Error:
deployment/ccip/changeset/cs_ccip_home.go:142:15: fmt.Errorf can be replaced with errors.New (perfsprint)
		return nil, fmt.Errorf("PluginType must be set to either CCIPCommit or CCIPExec")
		 ^
deployment/ccip/changeset/cs_ccip_home.go:794:28: fmt.Errorf can be replaced with errors.New (perfsprint)
		return mcms.Operation{}, fmt.Errorf("donID is zero")
		 ^
**Why**: The `fmt.Errorf` function is used where a simpler `errors.New` function would suffice. This is flagged by the linter as a performance improvement suggestion.

Suggested fix: Replace fmt.Errorf with errors.New for the given error messages. For example, change fmt.Errorf("PluginType must be set to either CCIPCommit or CCIPExec") to errors.New("PluginType must be set to either CCIPCommit or CCIPExec").

2. issues found:[Golang Lint (deployment)]

Source of Error:
##[error]issues found
**Why**: The linter found issues in the code that need to be addressed. These issues are detailed in the linter's output.

Suggested fix: Review the linter's output and address each issue as recommended. In this case, replace fmt.Errorf with errors.New as suggested by the linter.

Copy link
Contributor

@connorwstein connorwstein left a comment

Choose a reason for hiding this comment

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

As a follow up we could add a test which promotes only one and ensures the other was not promoted

@AnieeG AnieeG added this pull request to the merge queue Dec 19, 2024
Merged via the queue into develop with commit a891421 Dec 19, 2024
187 of 189 checks passed
@AnieeG AnieeG deleted the ccip-4675-promote-candidate branch December 19, 2024 15:11
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