Skip to content

fix(input): cleanup legacy object-format changesets support#855

Open
graham-chainlink wants to merge 1 commit intomainfrom
ggoh/NO-JIRA/remove-object-format-input
Open

fix(input): cleanup legacy object-format changesets support#855
graham-chainlink wants to merge 1 commit intomainfrom
ggoh/NO-JIRA/remove-object-format-input

Conversation

@graham-chainlink
Copy link
Collaborator

@graham-chainlink graham-chainlink commented Mar 13, 2026

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.

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: d1223ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Patch

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.
Copy link
Collaborator Author

@graham-chainlink graham-chainlink Mar 13, 2026

Choose a reason for hiding this comment

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

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.

@graham-chainlink graham-chainlink marked this pull request as ready for review March 13, 2026 05:01
@graham-chainlink graham-chainlink requested a review from a team as a code owner March 13, 2026 05:01
Copilot AI review requested due to automatic review settings March 13, 2026 05:01
@graham-chainlink graham-chainlink changed the title fix(input): remove object-format changesets support fix(input): cleanup legacy object-format changesets support Mar 13, 2026
Enforce array-only durable pipeline input format and stop accepting legacy object-form changesets to avoid ambiguous parsing paths.
@graham-chainlink graham-chainlink force-pushed the ggoh/NO-JIRA/remove-object-format-input branch from fd5745f to d1223ad Compare March 13, 2026 05:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 changesets as 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.

@cl-sonarqube-production
Copy link

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.

2 participants