Skip to content

build/devenv: introduce configuration profiles#1145

Open
winder wants to merge 4 commits into
will/phased-cl-nodefrom
will/devenv-cli-improvements
Open

build/devenv: introduce configuration profiles#1145
winder wants to merge 4 commits into
will/phased-cl-nodefrom
will/devenv-cli-improvements

Conversation

@winder
Copy link
Copy Markdown
Collaborator

@winder winder commented Jun 1, 2026

PR Chain

There are multiple open pull requests that feed into each other:

Description

Adds *.profile files as a first-class way to describe a complete environment configuration — mode, ordered config files, and optional output path — so users no longer need tribal knowledge to construct a valid ccv up invocation.

CLI changes:

  • up and restart gain --profile/-p and --output/-o flags
  • Positional *.profile args are treated as --profile (shell-completion friendly)
  • No args defaults to standard.profile instead of bare env.toml
  • --profile is mutually exclusive with --env-mode, --output, and positional TOML args (validated at run time)
  • ccv shell accepts --profile/-p and primes the active config so bare up/restart inside the shell reuses the same profile

Shell completion (completion.go) now dynamically scans *.profile files in the working directory instead of the hardcoded TOML combo list.

config.go gains CTF_OUTPUT env var; Store() checks it before deriving the output path from CTF_CONFIGS, enabling --output and profile output overrides to flow through without changing every call site.

Six built-in profiles in build/devenv/:

  • standard.profile legacy + env.toml
  • phased.profile phased + env-phased.toml
  • standard.clnode.profile legacy + env.toml,env-cl.toml
  • standard.clnode.ci.profile legacy + env.toml,env-cl.toml,env-cl-ci.toml
  • phased.clnode.profile phased + env-phased.toml,env-cl-phased.toml
  • phased.clnode.ci.profile phased + env-phased.toml,env-cl-phased.toml,env-cl-ci-phased.toml

Testing

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)
  • just lint fix - no new lint errors
  • just generate - mocks and protobufs are up to date

winder added 4 commits June 2, 2026 15:38
Adds *.profile files as a first-class way to describe a complete
environment configuration — mode, ordered config files, and optional
output path — so users no longer need tribal knowledge to construct a
valid `ccv up` invocation.

CLI changes:
- `up` and `restart` gain --profile/-p and --output/-o flags
- Positional *.profile args are treated as --profile (shell-completion
friendly)
- No args defaults to standard.profile instead of bare env.toml
- --profile is mutually exclusive with --env-mode, --output, and
positional TOML args (validated at run time)
- `ccv shell` accepts --profile/-p and primes the active config so bare
`up`/`restart` inside the shell reuses the same profile

Shell completion (completion.go) now dynamically scans *.profile files
in the working directory instead of the hardcoded TOML combo list.

config.go gains CTF_OUTPUT env var; Store() checks it before deriving
the output path from CTF_CONFIGS, enabling --output and profile output
overrides to flow through without changing every call site.

Six built-in profiles in build/devenv/:
standard.profile           legacy + env.toml
phased.profile             phased + env-phased.toml
standard.clnode.profile    legacy + env.toml,env-cl.toml
standard.clnode.ci.profile legacy + env.toml,env-cl.toml,env-cl-ci.toml
phased.clnode.profile      phased + env-phased.toml,env-cl-phased.toml
phased.clnode.ci.profile   phased + env-phased.toml,env-cl-phased.toml,env-cl-ci-phased.toml
Replaces raw config combos and --env-mode flags in test-smoke.yaml and
test-cl-smoke.yaml with --profile, and passes --output env-out.toml
so every run writes a consistent output path the tests can find without
SMOKE_TEST_CONFIG overrides. Adds four profiles for CI-specific config
combos that had no existing profile: standard.one-exec-per-chain,
standard.src-auto-mine, standard.ha.clnode.ci, and
standard.clnode.ci.one-exec-per-chain.
Adds `ccv run --profile <name> --test <pattern>` to drive the full
integration-test lifecycle (image build, environment startup, go test)
in a single command, writing output to a run-scoped file so parallel
runs do not collide.
Documents the profile system, ccv run command, and breaking changes to
ccv up defaults introduced in this branch. Adds before/after examples
for the --env-mode removal and the new --profile / --output flags.
@winder winder force-pushed the will/devenv-cli-improvements branch from 2d25bcd to a81195f Compare June 2, 2026 19:39
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code coverage report:

Package will/phased-cl-node will/devenv-cli-improvements Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.35% 49.31% -0.04%
github.com/smartcontractkit/chainlink-ccv/bootstrap 54.14% 54.14% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 15.54% 15.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 56.54% 56.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.97% 45.97% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 37.67% 37.68% +0.01%
github.com/smartcontractkit/chainlink-ccv/integration 46.13% 46.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 34.48% 34.48% +0.00%
Total 46.50% 46.50% +0.00%

@winder winder marked this pull request as ready for review June 2, 2026 20:10
@winder winder requested review from a team as code owners June 2, 2026 20:10
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