-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Improvement in naming changesets #15943
Conversation
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
8f2aa3f
to
5f0f701
Compare
}, | ||
}) | ||
require.NoError(t, err) | ||
|
||
assertTimelockOwnership(t, e, allChains, state) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these to test_assertions
@@ -102,7 +102,7 @@ func (d *DeployerGroup) getDeployer(chain uint64) (*bind.TransactOpts, error) { | |||
return sim, nil | |||
} | |||
|
|||
func (d *DeployerGroup) enact(deploymentDescription string) (deployment.ChangesetOutput, error) { | |||
func (d *DeployerGroup) Enact(deploymentDescription string) (deployment.ChangesetOutput, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to export these for _test package import
PriceFeedChainSelector: ccipocr3.ChainSelector(feedChainSel), | ||
NewMsgScanBatchSize: merklemulti.MaxNumberTreeLeaves, | ||
MaxReportTransmissionCheckAttempts: 5, | ||
RMNEnabled: os.Getenv("ENABLE_RMN") == "true", // only enabled in manual test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty strange, we shouldn't be accessing os.Getenv
in these funcs IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually done for test.let me handle it in a better way in subsequent ticket
func buildTimelockPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]*proposalutils.TimelockExecutionContracts { | ||
func BuildTimelockPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]*proposalutils.TimelockExecutionContracts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to be exported? Don't see it being used outside the changeset
pkg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's used in test -
timelocksPerChain := changeset.BuildTimelockPerChain(e.Env, state) |
func buildTimelockAddressPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]common.Address { | ||
timelocksPerChain := buildTimelockPerChain(e, state) | ||
func BuildTimelockAddressPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]common.Address { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here
func buildProposerPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]*gethwrappers.ManyChainMultiSig { | ||
func BuildProposerPerChain(e deployment.Environment, state CCIPOnChainState) map[uint64]*gethwrappers.ManyChainMultiSig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these are used under _test package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional delete right?
@@ -19,6 +19,8 @@ import ( | |||
commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" | |||
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests" | |||
|
|||
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset" | |||
changeset2 "github.com/smartcontractkit/chainlink/deployment/common/changeset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename import to changesetcommon or cscommon or whatever
changeset2 "github.com/smartcontractkit/chainlink/deployment/common/changeset" | |
cscommon "github.com/smartcontractkit/chainlink/deployment/common/changeset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm seems transferred here
@@ -20,9 +25,26 @@ const ( | |||
LinkDecimals = 18 | |||
WethDecimals = 18 | |||
UsdcDecimals = 6 | |||
// MockLinkAggregatorDescription This is the description of the MockV3Aggregator.sol contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// MockLinkAggregatorDescription This is the description of the MockV3Aggregator.sol contract | |
// MockLinkAggregatorDescription is the description of the MockV3Aggregator.sol contract |
// MockLinkAggregatorDescription This is the description of the MockV3Aggregator.sol contract | ||
// https://github.com/smartcontractkit/chainlink/blob/a348b98e90527520049c580000a86fb8ceff7fa7/contracts/src/v0.8/tests/MockV3Aggregator.sol#L76-L76 | ||
MockLinkAggregatorDescription = "v0.8/tests/MockV3Aggregator.sol" | ||
// MockWETHAggregatorDescription WETH use description from MockETHUSDAggregator.sol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is unintelligible, maybe
// MockWETHAggregatorDescription WETH use description from MockETHUSDAggregator.sol | |
// MockWETHAggregatorDescription is the description from MockETHUSDAggregator.sol |
tenv, _ := NewMemoryEnvironment(t, WithChains(3)) | ||
_, err := ViewCCIP(tenv.Env) | ||
tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(3)) | ||
_, err := changeset.ViewCCIP(tenv.Env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a ticket for better test coverage on the views?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All views have individual tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually no some were missing, created a ticket
Quality Gate passedIssues Measures |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
..Changeset
TestConfig
in name to denote those are explicitly for Test.