-
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
Extract MCMS to deployment/common #15288
Extract MCMS to deployment/common #15288
Conversation
@@ -1,33 +0,0 @@ | |||
package types |
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.
duplicate of common
"github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" | ||
) | ||
|
||
func DeployMCMSWithConfig( |
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.
Intend to follow up with the same pattern here for CCIP dir. Deployment logic can be internal to enforce changeset API usage in higher level tests
AER Report: CI Coreaer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Find New Flaky Tests In Chainlink Project / Get Tests To Run , lint , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , Find New Flaky Tests In Deployment Project / Get Tests To Run , Find New Flaky Tests In Chainlink Project / Run Tests , Find New Flaky Tests In Chainlink Project / Report , Find New Flaky Tests In Deployment Project / Run Tests (github.com/smartcontractkit/chainlink/deployment/ccip, ubuntu-latest) , Find New Flaky Tests In Deployment Project / Run Tests (github.com/smartcontractkit/chainlink/deployment/ccip/changeset, ubuntu-latest) , Find New Flaky Tests In Deployment Project / Run Tests (github.com/smartcontractkit/chainlink/deployment/common/changeset/internal, ubuntu-lat... , Flakey Test Detection , SonarQube Scan , Find New Flaky Tests In Deployment Project / Report 1. No space left on device:[Run tests with flakeguard]Source of Error:
Why: The error indicates that the disk space on the device where the tests are being run is full, preventing the linker from completing its task. Suggested fix: Free up disk space on the device by deleting unnecessary files or increasing the disk space available for the runner. 2. Failed to parse JSON test output:[Run tests with flakeguard]Source of Error:
Why: The JSON output from the test run contains invalid characters, likely due to the previous error causing incomplete or malformed output. Suggested fix: Address the root cause of the disk space issue first. Ensure that the test output is correctly formatted as JSON and does not contain unexpected characters. AER Report: Operator UI CI ran successfully ✅ |
chain1, chain2 := selectors[0], selectors[1] | ||
|
||
feeds := state.Chains[e.FeedChainSel].USDFeeds |
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.
As there is now 3 changesets (prereqs, mcms + ccip contracts) you need to get a full system I just created a helper
e.Chains[destCS], | ||
destCS, | ||
tokenConfig.GetTokenInfo(e.Logger, state.Chains[destCS].LinkToken, state.Chains[destCS].Weth9), | ||
state.Chains[tenv.FeedChainSel].OffRamp, |
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.
Why feedChainSel instead of destCS?
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.
destCS was feedChainSel
return state, err | ||
} | ||
state.CancellerMcm = mcms | ||
case deployment.NewTypeAndVersion(commontypes.RBACTimelock, deployment.Version1_0_0).String(), |
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.
TIL that we can do it with commas like that :). Can we move it to the end of the switch statement for better readability?
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.
yeah we can, maybe via follow up as this PR is merge conflict prone
@@ -32,12 +36,25 @@ func TestInitialDeploy(t *testing.T) { | |||
require.NoError(t, err) | |||
require.NoError(t, tenv.Env.ExistingAddresses.Merge(output.AddressBook)) | |||
|
|||
cfg := make(map[uint64]commontypes.MCMSWithTimelockConfig) |
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.
what's the reason for not using the NewMemoryEnvironmentWithJobsAndContracts
, I see it already does this as well.
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.
in this case we want to actually test the last step in NewMemoryEnvironmentWithJobsAndContracts
TimelockExecutors: e.Env.AllDeployerKeys(), | ||
TimelockMinDelay: big.NewInt(0), | ||
} | ||
out, err := commonchangeset.DeployMCMSWithTimelock(e.Env, map[uint64]commontypes.MCMSWithTimelockConfig{ |
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.
Use DeployMCMSWithTimelockContractsBatch
?
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.
thats the internal impl
20eab5e
* Extract MCMS * Use changeset * Standardize package import names * Fix mcms test imports * Fix add lane * Fix bad merge * Extract common integration helper code * Fix go mod * Similar common helper for memeroy * Comments * Fix tests * Fix new test * Fix RMN test
MCMS is not CCIP specific so extracting to the common deployment directory.