[CLD-1504]: feat(changeset): update registry apply calls to accept explicit input#860
Conversation
|
| ChainOverrides []uint64 `json:"chainOverrides"` // Optional field for chain overrides | ||
| } | ||
|
|
||
| func parseTypedInput(inputStr string) (TypedJSON, error) { |
There was a problem hiding this comment.
a refactor of common logic below
dd77bf7 to
3ba33e9
Compare
There was a problem hiding this comment.
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
ApplyWithInputmethod toChangesetsRegistryand correspondingapplyWithInputon the internal changeset interface, allowing explicit input strings to override env var input. - Extracted
parseTypedInputanddecodePayloadhelper functions from duplicated inline parsing logic. - Added
configProviderWithInputfield toChangeSetImpland wired it inWithEnvInputandWithConfigResolver.
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
3ba33e9 to
142253f
Compare
|




Instead of always relying on environment variable
DURABLE_PIPELINE_INPUTat 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 ofDURABLE_PIPELINE_INPUTon the changeset level in the futureJIRA: https://smartcontract-it.atlassian.net/browse/CLD-1504