fix(input): cleanup legacy object-format changesets support#855
fix(input): cleanup legacy object-format changesets support#855graham-chainlink wants to merge 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: d1223ad 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 |
|
|
||
| // Resolve every changeset in the file | ||
| var orderedChangesets []map[string]any // For both formats to preserve order and duplicates | ||
| // Resolve every changeset in the file. |
There was a problem hiding this comment.
This file is a duplication of the other changed file generate.go, is it part of the migration being done by Adrian, eventually this file will be deleted in favour of the other one, but i made the same change in both places anyway to be safe.
Enforce array-only durable pipeline input format and stop accepting legacy object-form changesets to avoid ambiguous parsing paths.
fd5745f to
d1223ad
Compare
There was a problem hiding this comment.
Pull request overview
Removes deprecated “object/mapping” changesets input support so durable pipeline input generation only accepts (and outputs) the array/sequence format, reducing divergent parsing/output paths across the framework and legacy CLI.
Changes:
- Drop support for
changesetsas a YAML mapping; accept only YAML sequences/JSON arrays. - Update/trim tests to focus on array format and adjust error assertions.
- Add a changeset entry documenting the behavior change.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| engine/cld/pipeline/input/generate.go | Removes mapping-format parsing/output; enforces sequence-only changesets and updates error message. |
| engine/cld/pipeline/input/generate_test.go | Removes object-format test and updates array-format / invalid-format assertions. |
| engine/cld/legacy/cli/commands/durable-pipelines.go | Removes mapping-format handling in legacy CLI generator and enforces sequence-only changesets. |
| engine/cld/legacy/cli/commands/durable-pipelines_test.go | Drops object-format case from input-generate CLI tests. |
| .changeset/sunny-donkeys-hang.md | Documents removal of object-format handling in a patch changeset. |
Comments suppressed due to low confidence (1)
engine/cld/legacy/cli/commands/durable-pipelines_test.go:227
- With object format support removed, it would be good to add an explicit negative test case that supplies the legacy mapping-style
changesets:input and asserts the command fails with the new “changesets must be an array (sequence)” error. Right now the test matrix only covers the valid array format, so the deprecation enforcement isn’t exercised.
formatTests := []struct {
name string
formatDescription string
inputsFileName string
mockInputContent string
}{
{
name: "array format",
formatDescription: "new array format",
inputsFileName: "test-inputs-array.yaml",
mockInputContent: `environment: testnet
domain: test
changesets:
- 0001_test_changeset:
payload:
chain: optimism_sepolia
value: 100`,
},
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|




Minor cleanup on something that was suppose to be cleaned up awhile back
Object format is deprecated and should no longer be accepted. Keeping only array format simplifies behavior and avoids divergent parsing/output paths. Ci also enforces array format, so usually object format wont reach this part of the code.