build/devenv: observability component#1141
Conversation
| 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 | ||
| } |
There was a problem hiding this comment.
nit: this PR duplicates some changes from #1140.
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.
|
Code coverage report:
|
There was a problem hiding this comment.
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
observabilityphased component that publishes monitoring + pyroscope settings as Phase 1 outputs. - Move phased observability TOML config under
[observability]and wirecommitteeccv/executorto 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" |
| obs, ok := priorOutputs["observability"].(*observability.Observability) | ||
| if !ok || obs == nil { | ||
| return nil, nil, fmt.Errorf("executor: observability not found in phase outputs") |
| obs, ok := priorOutputs["observability"].(*observability.Observability) | ||
| if !ok || obs == nil { | ||
| return nil, nil, fmt.Errorf("committeeccv: observability not found in phase outputs") |
huangzhen1997
left a comment
There was a problem hiding this comment.
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. |
PR Chain
There are multiple open pull requests that feed into each other:
Description
Testing
Checklist
changelogdirectory)just lint fix- no new lint errorsjust generate- mocks and protobufs are up to date