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-4506 log improvements in deployment code #15535

Merged
merged 21 commits into from
Dec 6, 2024

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented Dec 5, 2024

Requires

Supports

@AnieeG AnieeG requested review from a team as code owners December 5, 2024 21:09
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Flakeguard Summary

Setting Value
Project github.com/smartcontractkit/chainlink/deployment/deployment
Max Pass Ratio 100.00%
Test Run Count 3
Race Detection false
Excluded Tests TestAddLane

Found Flaky Tests ❌

Category Total
Tests 4
Panicked Tests 0
Raced Tests 0
Flaky Tests 2
Flaky Test Ratio 50.00%
Runs 12
Passes 6
Failures 6
Skips 0
Pass Ratio 50.00%
Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestDeploy 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/deployment/keystone false 50ms Unknown
TestDeployCLO 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/deployment/keystone false 90ms Unknown

Copy link
Contributor

github-actions bot commented Dec 5, 2024

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

rstout
rstout previously approved these changes Dec 5, 2024
@@ -286,16 +284,15 @@ func deployChainContracts(
}
})
if err != nil {
e.Logger.Errorw("Failed to deploy RMNProxyNew", "err", err)
e.Logger.Errorw("Failed to deploy RMNProxyNew", "chain", chain.Selector, "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

name?

return err
}
e.Logger.Infow("Added nonce manager authorized callers", "chain", chain.Name, "callers", offRampContract.Address(), onRampContract.Address())
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't the Infow one have to have the form "string", "key", value, "key", value...?

return nil, err
}
lggr.Infow("deployed CCIPHome", "addr", ccipHome.Address)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want all the positive logs too

Copy link
Contributor

Choose a reason for hiding this comment

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

According to @AnieeG they were moved to DeployContract func

@@ -267,7 +269,7 @@ func addChainConfig(
if _, err := deployment.ConfirmIfNoError(h, tx, err); err != nil {
return ccip_home.CCIPHomeChainConfigArgs{}, err
}
lggr.Infow("Applied chain config updates", "chainConfig", chainConfig)
lggr.Infow("Applied chain config updates", "homeChain", h.Name, "addedChain", chainSelector, "chainConfig", chainConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

added chain name?

return err
}
lggr.Infow("deployed weth9", "addr", weth.Address)
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I like the positive logs, let add em everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -50,6 +50,7 @@ type OffchainClient interface {
type Chain struct {
// Selectors used as canonical chain identifier.
Selector uint64
Name string
Copy link
Contributor

Choose a reason for hiding this comment

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

I worry this could be populated wrong, can we leave it as is and derive from selector?

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 can move the name population to deployment.environment ow for every function we will have to call the chaininfo function,

Copy link
Contributor

Choose a reason for hiding this comment

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

could we just have a method on Chain called Name() which does the derivation?

Client OnchainClient
// Note the Sign function can be abstract supporting a variety of key storage mechanisms (e.g. KMS etc).
DeployerKey *bind.TransactOpts
Confirm func(tx *types.Transaction) (uint64, error)
}

func (c Chain) Name() string {
return c.name
Copy link
Contributor

Choose a reason for hiding this comment

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

oh I was thinking of just inlining

func (c Chain) Name() string {
	chainInfo, err := ChainInfo(c.Selector)
	if err != nil {
		// we should never get here, if the selector is invalid it should not be in the environment
		panic(err)
	}
	return chainInfo.Name
}

its just a map lookup inside there anyways

connorwstein
connorwstein previously approved these changes Dec 6, 2024
mateusz-sekara
mateusz-sekara previously approved these changes Dec 6, 2024
@AnieeG AnieeG enabled auto-merge December 6, 2024 14:35
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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.

@AnieeG AnieeG added this pull request to the merge queue Dec 6, 2024
Merged via the queue into develop with commit f8a221f Dec 6, 2024
186 checks passed
@AnieeG AnieeG deleted the CCIP-4506-log-improvements branch December 6, 2024 17:17
@connorwstein connorwstein mentioned this pull request Dec 6, 2024
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.

5 participants