Skip to content

build/devenv: observability component#1141

Merged
winder merged 2 commits into
mainfrom
will/devenv-misc
Jun 2, 2026
Merged

build/devenv: observability component#1141
winder merged 2 commits into
mainfrom
will/devenv-misc

Conversation

@winder
Copy link
Copy Markdown
Collaborator

@winder winder commented May 29, 2026

PR Chain

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

Description

  • Small change to re-enable an error if there are unclaimed config keys.
  • New observability component to hold beholder configs.

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

makramkd
makramkd previously approved these changes Jun 2, 2026
Comment thread build/devenv/cli/ccv.go Outdated
Comment on lines +63 to +68
newEnvFn = ccv.NewEnvironment
// Both env constructors return a value that the up/restart commands
// discard, so adapt them to the error-only fn.
newEnvFn = func() error {
_, err := ccv.NewEnvironment()
return err
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: this PR duplicates some changes from #1140.

@winder winder force-pushed the will/devenv-toml branch from 6459776 to e81dc44 Compare June 2, 2026 14:32
Base automatically changed from will/devenv-toml to main June 2, 2026 15:50
@winder winder dismissed makramkd’s stale review June 2, 2026 15:50

The base branch was changed.

winder added 2 commits June 2, 2026 13:56
Add a Phase-1 observability component that owns the [observability]
config key and publishes beholder monitoring plus the pyroscope URL as
a phase output; committeeccv and executor now consume it from that
output instead of reading off the topology. Scoped to the phased path
only -- the monolith, EnvironmentTopology, and the legacy configs are
left unchanged, and just env-phased.toml moves the keys.
@winder winder force-pushed the will/devenv-misc branch from 86e2611 to d4e5a9d Compare June 2, 2026 17:57
@winder winder marked this pull request as ready for review June 2, 2026 17:58
@winder winder requested a review from a team as a code owner June 2, 2026 17:58
Copilot AI review requested due to automatic review settings June 2, 2026 17:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code coverage report:

Package main will/devenv-misc Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.30% 49.31% +0.01%
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.73% 37.73% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 46.23% 46.23% +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.60% 46.60% +0.00%

Copy link
Copy Markdown
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 tightens phased devenv configuration validation by failing fast on unrecognized top-level config keys, and introduces a new phased-runtime observability component to own cross-cutting beholder/pyroscope configuration that is consumed by committeeccv and executor.

Changes:

  • Convert “unclaimed config keys” from a warning to a hard error (with deterministic ordering) and add coverage for the behavior.
  • Add a new observability phased component that publishes monitoring + pyroscope settings as Phase 1 outputs.
  • Move phased observability TOML config under [observability] and wire committeeccv/executor to consume the new output instead of topology fields.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
build/devenv/runtime/environment.go Fail fast on unclaimed top-level config keys (sorted) instead of warning.
build/devenv/runtime/environment_test.go Add test asserting unclaimed keys produce an error and name the key.
build/devenv/environment.go Ensure the new observability component registers via blank import.
build/devenv/env-phased.toml Relocate pyroscope/monitoring config under [observability] for phased runtime.
build/devenv/components/observability/component.go New Phase 1 component that validates/decodes and publishes observability settings.
build/devenv/components/observability/component_test.go Unit tests for config validation and Phase 1 output publication.
build/devenv/components/executor/component.go Consume observability output for job-spec generation.
build/devenv/components/committeeccv/component.go Consume observability output for verifier job-spec generation.

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

ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
)

const configKey = "observability"
Comment on lines +148 to +150
obs, ok := priorOutputs["observability"].(*observability.Observability)
if !ok || obs == nil {
return nil, nil, fmt.Errorf("executor: observability not found in phase outputs")
Comment on lines +100 to +102
obs, ok := priorOutputs["observability"].(*observability.Observability)
if !ok || obs == nil {
return nil, nil, fmt.Errorf("committeeccv: observability not found in phase outputs")
Copy link
Copy Markdown
Contributor

@huangzhen1997 huangzhen1997 left a comment

Choose a reason for hiding this comment

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

One nit about https://github.com/smartcontractkit/chainlink-ccv/pull/1141/changes#r3343379497, but I think raw string is used in many places, so can be done in the future

@winder winder added this pull request to the merge queue Jun 2, 2026
@winder
Copy link
Copy Markdown
Collaborator Author

winder commented Jun 2, 2026

One nit about https://github.com/smartcontractkit/chainlink-ccv/pull/1141/changes#r3343379497, but I think raw string is used in many places, so can be done in the future

Thanks @huangzhen1997, Makram gave some similar feedback. Worth addressing in a followup.

Merged via the queue into main with commit 990851d Jun 2, 2026
37 of 38 checks passed
@winder winder deleted the will/devenv-misc branch June 2, 2026 19:21
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.

4 participants