feat(cmd/pipeline): Run all changesets support --all#999
feat(cmd/pipeline): Run all changesets support --all#999graham-chainlink wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 2ab4d60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1d68c77 to
2a9d2ce
Compare
2a9d2ce to
3ee6f30
Compare
There was a problem hiding this comment.
Pull request overview
Adds --all support to chainlink-deployments pipeline run to execute every changeset in an inputs YAML sequentially, reusing a single durable-pipelines artifact timestamp for the whole run.
Changes:
- Add
--all/-aflag and flag exclusivity rules forpipeline run. - Refactor execution flow into
runSingleChangeset,runAllChangesets, and sharedapplyChangeset. - Add tests covering
--allsuccess, fail-fast behavior, mutual exclusivity, and invalid input file handling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| engine/cld/commands/pipeline/run.go | Introduces --all flag, refactors execution into helpers, and implements sequential multi-changeset execution. |
| engine/cld/commands/pipeline/run_test.go | Adds test coverage for --all behavior (success, fail-fast, exclusivity, invalid input). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3ee6f30 to
88f1eef
Compare
| data, ok := changesets.([]any) | ||
| if !ok { | ||
| return nil, errors.New("invalid 'changesets' format for index access, expected array format") | ||
| return nil, errors.New("invalid 'changesets' format, expected array format") |
There was a problem hiding this comment.
the "index access" may confuse users when using --all flag, so removing it
88f1eef to
628ce82
Compare
Adding the ability to execute all changesets using the pipeline run command by introduing the --all flag. ``` # Run all changesets sequentially defined in the input file chainlink-deployments pipeline run \ --environment testnet \ --input-file inputs.yaml \ --all ``` JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2430
628ce82 to
129184e
Compare
| for i, cs := range changesets { | ||
| cfg.Logger.Infof("[%d/%d] Applying changeset %s", i+1, len(changesets), cs.Name) | ||
|
|
||
| if err := artdir.SetDurablePipelines(strconv.FormatInt(time.Now().UnixNano(), 10)); err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
i wan this behaviour
There was a problem hiding this comment.
What will happen to datastore updates inside a loop? Currently we update catalog/datastore between each changeset execution and then we use the timestamp to merge the artifacts for the specific run using another cld command.
Here we are executing all changesets which means the env datastore will be out-of-date since it will not have information about what the previous changeset deployed.
Also, how this is going to work in CI? we will need a new merge logic to discover all new artifacts and merge them at the same time 🤔
There was a problem hiding this comment.
yeah good pick up
- this will only be used locally for now
- i will add the logic to perform the merge for datastore and addresbook after each changeset execution
There was a problem hiding this comment.
but lets discuss this on thursday tech sync too!
|




Adding the ability to execute all changesets using the pipeline run command by introduing the --all flag.
Docs: https://github.com/smartcontractkit/chainlink-deployments/pull/14400
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2430