-
Notifications
You must be signed in to change notification settings - Fork 1
feat: introduce template-input command for generating YAML input #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: a7f1907 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 |
aaf0717
to
ca0c01c
Compare
04ba341
to
225364d
Compare
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
03d5d51
to
49ed323
Compare
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
jkongie
reviewed
Sep 19, 2025
giogam
reviewed
Sep 19, 2025
This commit introduces a new template-input command that generates YAML input templates from Go struct types for durable pipeline changesets. The command uses reflection to analyze changeset input types and produces well-formatted YAML templates with type comments to guide users in creating valid input files. ``` go run main.go durable-pipeline template-input \ --environment testnet \ --changeset 0001_my_changeset go run main.go durable-pipeline template-input \ --environment testnet \ --changeset changeset1,changeset2,changeset3 go run main.go durable-pipeline template-input \ --environment testnet \ --changeset 0001_my_changeset \ --depth 3 ``` Example ``` # Save to file go run main.go durable-pipeline template-input --environment testnet --changeset 0001_my_changeset > inputs.yaml ``` Input.yaml ``` # Generated via template-input command environment: testnet domain: myproject changesets: # Input type: myproject.DeploymentConfig - 0001_deploy_contracts: # Optional: Chain overrides (uncomment if needed) # chainOverrides: # - 1 # Chain selector 1 # - 2 # Chain selector 2 payload: contract_name: # string initial_supply: # uint64 owner_address: # common.Address feature_flags: - # string metadata: example_key: # int advanced_config: timeout: # time.Duration retry_count: # uint8 ```
49ed323
to
a7f1907
Compare
|
jkongie
approved these changes
Sep 19, 2025
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 19, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#437](#437) [`2224427`](2224427) Thanks [@jkongie](https://github.com/jkongie)! - **[BREAKING]** Refactored `LoadOffchainClient` to use functional options ## Function Signature Changed **Before:** ```go func LoadOffchainClient(ctx, domain, env, config, logger, useRealBackends) ``` **After:** ```go func LoadOffchainClient(ctx, domain, cfg, ...opts) ``` ## Migration Required - `logger` → `WithLogger(logger)` option (optional, has default) - `useRealBackends` → `WithDryRun(!useRealBackends)`⚠️ **inverted logic** - `env` → `WithCredentials(creds)` option (optional, defaults to TLS) - `config` → `config.Offchain.JobDistributor` **Example:** ```go // Old LoadOffchainClient(ctx, domain, "testnet", config, logger, false) // New LoadOffchainClient(ctx, domain, config.Offchain.JobDistributor, WithLogger(logger), WithDryRun(true), // Note: inverted! ) ``` - [#428](#428) [`e172683`](e172683) Thanks [@jkongie](https://github.com/jkongie)! - Adds a test engine runtime for executing changesets in unit/integration tests - [#443](#443) [`9e6bc1d`](9e6bc1d) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - feat: introduce template-input command for generating YAML input This commit introduces a new template-input command that generates YAML input templates from Go struct types for durable pipeline changesets. The command uses reflection to analyze changeset input types and produces well-formatted YAML templates with type comments to guide users in creating valid input files. - [#440](#440) [`7f1af5d`](7f1af5d) Thanks [@RodrigoAD](https://github.com/RodrigoAD)! - add support for sui in mcms commands --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
Currently for pipelines, when user wants to run a pipeline, they have to create an input yaml file and manually enter the field names and values, if the config required for the changeset is complicated, user have to do some typing and mistakes can happen (eg wrong type, incorrect field name etc) and it gets trickier if config resolver is being used too, this mundane and error prone task can be automated and give our users a better experience.
Description
This commit introduces a new
template-input
command that generates YAML input templates from Go struct types for durable pipeline changesets. The command uses reflection to analyze changeset input types and produces well-formatted YAML templates with type comments to guide users in creating valid input files.Example
Registry
Input.yaml
More Complex Example:
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-655