Skip to content

[CLD-1504]: feat(changeset): update registry apply calls to accept explicit input#860

Merged
graham-chainlink merged 1 commit intomainfrom
ggoh/CLD-1504/apply-with-input-registry
Mar 17, 2026
Merged

[CLD-1504]: feat(changeset): update registry apply calls to accept explicit input#860
graham-chainlink merged 1 commit intomainfrom
ggoh/CLD-1504/apply-with-input-registry

Conversation

@graham-chainlink
Copy link
Collaborator

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

Instead of always relying on environment variable DURABLE_PIPELINE_INPUT at the lower level, we need a way to explicitly pass the actual input via method params so we can decouple the dependency on the env var. This allows us build a test runtime which accepts input instead of relying on env var and also decoupling of DURABLE_PIPELINE_INPUT on the changeset level in the future

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1504

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2026

⚠️ No Changeset found

Latest commit: 142253f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

a refactor of common logic below

@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-1504/apply-with-input-registry branch from dd77bf7 to 3ba33e9 Compare March 16, 2026 05:10
@graham-chainlink graham-chainlink marked this pull request as ready for review March 16, 2026 05:12
@graham-chainlink graham-chainlink requested a review from a team as a code owner March 16, 2026 05:12
Copilot AI review requested due to automatic review settings March 16, 2026 05:12
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

This PR decouples changeset application from the DURABLE_PIPELINE_INPUT environment variable by introducing an explicit input parameter path. It refactors duplicated JSON parsing logic into shared helpers and adds a configProviderWithInput function field to support both env-var-based and explicit-input-based changeset application.

Changes:

  • Added ApplyWithInput method to ChangesetsRegistry and corresponding applyWithInput on the internal changeset interface, allowing explicit input strings to override env var input.
  • Extracted parseTypedInput and decodePayload helper functions from duplicated inline parsing logic.
  • Added configProviderWithInput field to ChangeSetImpl and wired it in WithEnvInput and WithConfigResolver.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
engine/cld/changeset/registry.go Adds ApplyWithInput public method; refactors Apply to delegate to private applyWithInput
engine/cld/changeset/common.go Extracts shared parsing helpers; adds configProviderWithInput field and applyWithInput method to ChangeSetImpl
engine/cld/changeset/postprocess.go Implements applyWithInput for PostProcessingChangeSetImpl
engine/cld/changeset/registry_test.go Adds tests for ApplyWithInput with both env-configured and resolver-configured changesets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Instead of always relying on environment variable `DURABLE_PIPELINE_INPUT` at the lower level, we need a way to explicitly pass the actual input via method params so we can decouple the dependency on the env var. This allows us build a test runtime which accepts input instead of relying on env var and also decoupling of `DURABLE_PIPELINE_INPUT` on the changeset level.

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1504
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-1504/apply-with-input-registry branch from 3ba33e9 to 142253f Compare March 16, 2026 05:21
@cl-sonarqube-production
Copy link

@graham-chainlink graham-chainlink added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit e2a632d Mar 17, 2026
21 checks passed
@graham-chainlink graham-chainlink deleted the ggoh/CLD-1504/apply-with-input-registry branch March 17, 2026 07:28
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.

3 participants