Skip to content

[CLD-1396]: feat(cld/runtime): add support to execute registered changesets from YAML input#830

Draft
graham-chainlink wants to merge 2 commits intomainfrom
ggoh/CLD-1396/refactor-durable-pipeline-yaml-runtime
Draft

[CLD-1396]: feat(cld/runtime): add support to execute registered changesets from YAML input#830
graham-chainlink wants to merge 2 commits intomainfrom
ggoh/CLD-1396/refactor-durable-pipeline-yaml-runtime

Conversation

@graham-chainlink
Copy link
Collaborator

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

What changed

  • Added shared durable pipeline YAML utilities in engine/cld/durablepipeline for parsing, changeset lookup, and payload JSON construction.
  • Added ExecRegisteredChangesetsFromYAML to runtime to execute registered changesets in YAML order with per-entry input handling.
  • Refactored legacy CLI durable pipeline YAML handling to reuse shared parsing/building logic instead of duplicating implementation details.
  • Build a bridge so we can pass input down instead of using env var DURABLE_PIPELINE_INPUT

Why

This centralizes durable pipeline YAML behavior in one path used by both CLI and runtime, reducing drift and making integration tests consume the same execution semantics as production tooling.

Usage example

rt := runtime.NewFromEnvironment(env)
// or rt := New(t.Context(), WithEnvOpts(
//	        	testenv.WithEVMSimulatedN(t, 1)
//	     	))

inputYAML := []byte(`environment: testnet
domain: ccip
changesets:
  - 0001_example_changeset:
      payload:
        foo: bar
`)

err := rt.ExecRegisteredChangesetsFromYAML(func() changeset.RegistryProvider {
	return NewDurablePipelinesRegistryProvider()
}, inputYAML)
if err != nil {
	return err
}

// Examine execution results from the runtime instance.
// rt.State().Outputs
// rt.State().DataStore
// rt.Environment()

JIRA: CLD-1396

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 625cb81

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 Minor

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

@graham-chainlink graham-chainlink changed the title feat(cld/runtime): add support to execute registered changesets from YAML input [CLD-1396]: feat(cld/runtime): add support to execute registered changesets from YAML input Mar 5, 2026
…YAML input

Add shared durable pipeline YAML parsing helpers and introduce runtime execution for registered changesets from YAML in order. This unifies CLI/runtime input handling and lets downstream integration tests consume the same YAML-driven execution path.
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-1396/refactor-durable-pipeline-yaml-runtime branch from fd1e332 to ce6f4fd Compare March 5, 2026 06:43
ChainOverrides []uint64 `json:"chainOverrides"` // Optional field for chain overrides
}

func parseTypedInput(inputStr string) (TypedJSON, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nothing changed here, i just refactor these logic out into common methods for reuse.

@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-1396/refactor-durable-pipeline-yaml-runtime branch from fa1b00d to 625cb81 Compare March 6, 2026 02:40
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
52.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

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.

1 participant