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-4110 migration test #15854

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open

Ccip-4110 migration test #15854

wants to merge 28 commits into from

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented Jan 7, 2025

Requires

Supports

@AnieeG AnieeG requested review from a team as code owners January 7, 2025 15:02
@AnieeG AnieeG marked this pull request as draft January 7, 2025 15:02
Copy link
Contributor

github-actions bot commented Jan 7, 2025

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Copy link
Contributor

github-actions bot commented Jan 7, 2025

AER Report: CI Core

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

1. Undefined field DecodedWorkflowName in RequestMetadata struct: [go_core_race_tests]

Source of Error:
core/capabilities/targets/write_target.go:352:49: request.Metadata.DecodedWorkflowName undefined (type capabilities.RequestMetadata has no field or method DecodedWorkflowName)
core/services/workflows/engine.go:443:4: unknown field DecodedWorkflowName in struct literal of type capabilities.RequestMetadata
core/services/workflows/engine.go:968:4: unknown field DecodedWorkflowName in struct literal of type capabilities.RequestMetadata
core/services/workflows/engine.go:994:4: unknown field DecodedWorkflowName in struct literal of type capabilities.RequestMetadata
core/capabilities/compute/compute.go:303:43: req.Metadata.DecodedWorkflowName undefined (type *"github.com/smartcontractkit/chainlink-common/pkg/workflows/wasm/pb".FetchRequestMetadata has no field or method DecodedWorkflowName)

Why: The RequestMetadata struct does not contain a field or method named DecodedWorkflowName. This indicates that the code is trying to access a field that does not exist in the struct definition.

Suggested fix: Ensure that the RequestMetadata struct definition includes the DecodedWorkflowName field or update the code to use the correct field name that exists in the struct.

2. Unused imports and variables: [deployment]

Source of Error:
ccip/changeset/cs_active_candidate_test.go:4:2: "math/big" imported and not used
ccip/changeset/cs_active_candidate_test.go:20:2: "github.com/smartcontractkit/chainlink/v2/core/logger" imported and not used
ccip/changeset/cs_active_candidate_test.go:28:10: assignment mismatch: 1 variable but NewMemoryEnvironment returns 2 values
ccip/changeset/cs_active_candidate_test.go:136:3: declared and not used: block
ccip/changeset/cs_active_candidate_test.go:190:2: declared and not used: tokenConfig (typecheck)

Why: The code contains unused imports and variables, and there is a mismatch in the number of variables assigned from a function that returns multiple values.

Suggested fix: Remove the unused imports and variables. Ensure that the correct number of variables are assigned from functions that return multiple values.

3. No Go files to analyze: [integration-tests]

Source of Error:
level=error msg="Running error: context loading failed: no go files to analyze: running `go mod tidy` may solve the problem"

Why: The Go linter could not find any Go files to analyze in the specified directory. This might be due to missing or misplaced Go files.

Suggested fix: Ensure that the directory contains Go files. Running go mod tidy might help in resolving any module-related issues.

4. No Go files to analyze: [root]

Source of Error:
level=error msg="Running error: context loading failed: no go files to analyze: running `go mod tidy` may solve the problem"

Why: Similar to the previous error, the Go linter could not find any Go files to analyze in the root directory.

Suggested fix: Ensure that the root directory contains Go files. Running go mod tidy might help in resolving any module-related issues.

5. Go module updates needed: [generate]

Source of Error:
go: updates to go.mod needed; to update it:
go mod tidy
error: exit status 1
error: integration-tests error: exit status 1

Why: The Go module dependencies are not up-to-date, and the go.mod file needs to be updated.

Suggested fix: Run go mod tidy to update the go.mod file and ensure all dependencies are correctly listed.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@AnieeG AnieeG marked this pull request as ready for review January 8, 2025 23:51
@AnieeG AnieeG requested review from a team as code owners January 8, 2025 23:51
Copy link
Contributor

@makramkd makramkd left a comment

Choose a reason for hiding this comment

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

💯

@@ -323,7 +323,7 @@ func (params CCIPJobSpecParams) BootstrapJob(contractID string) *OCR2TaskJobSpec
},
}
return &OCR2TaskJobSpec{
Name: fmt.Sprintf("%s-%s", Boostrap, params.DestChainName),
Name: fmt.Sprintf("%s-%s-%s", Boostrap, params.SourceChainName, params.DestChainName),
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're here fixing stuff may as well fix the typo Boostrap

},
})
require.NoError(t, err)
AddLaneWithDefaultPricesAndFeeQuoterConfig(t, &e, state, chain1, chain2, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Haha we removed this and now its back, I actually copy/pasted the above code for my PR but I guess having this helper is fine.

Comment on lines +795 to 803
if cfg.TestRouter {
if err := commoncs.ValidateOwnership(e.GetContext(), cfg.MCMS != nil, e.Chains[chainSel].DeployerKey.From, chainState.Timelock.Address(), chainState.TestRouter); err != nil {
return err
}
} else {
if err := commoncs.ValidateOwnership(e.GetContext(), cfg.MCMS != nil, e.Chains[chainSel].DeployerKey.From, chainState.Timelock.Address(), chainState.Router); err != nil {
return err
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

q: if TestRouter is enabled why not validate ownership of it + the real router? Instead of either/or

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The real router can be owned by MCMS and test router can be owned by deployer key.

RMNStaticConfig: NewTestRMNStaticConfig(),
NodeOperators: NewTestNodeOperator(e.Env.Chains[e.HomeChainSel].DeployerKey.From),
NodeP2PIDsPerNodeOpAdmin: map[string][][32]byte{
"NodeOperator": envNodes.NonBootstraps().PeerIDs(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is "NodeOperator" the name of the nop or something? Would be nice as a constant or determined via some other way?

@@ -233,15 +235,25 @@ func (d *DeployedEnv) SetupJobs(t *testing.T) {

type MemoryEnvironment struct {
DeployedEnv
Chains map[uint64]deployment.Chain
TCConfig *TestConfigs
Copy link
Contributor

Choose a reason for hiding this comment

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

naming nit: just TestConfigs?

Comment on lines +476 to +477
var err error
envNodes, err := deployment.NodeInfo(e.Env.NodeIDs, e.Env.Offchain)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var err error
envNodes, err := deployment.NodeInfo(e.Env.NodeIDs, e.Env.Offchain)
envNodes, err := deployment.NodeInfo(e.Env.NodeIDs, e.Env.Offchain)

Comment on lines +110 to +112
// Adding to src1 and dest chains first, due to the open issue -
// if ccip contracts are added to all chains and only one lane is enabled between src1 and dest, the plugin will not work
// until lanes are added involving the rest of the chains
Copy link
Contributor

Choose a reason for hiding this comment

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

What open issue is this referring to?

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