Skip to content

pass user metric limiters to module config#21868

Open
karen-stepanyan wants to merge 4 commits intodevelopfrom
DF-23781-2
Open

pass user metric limiters to module config#21868
karen-stepanyan wants to merge 4 commits intodevelopfrom
DF-23781-2

Conversation

@karen-stepanyan
Copy link
Copy Markdown
Contributor

@karen-stepanyan karen-stepanyan commented Apr 6, 2026

Wire all user metric limiters from EngineLimiters into host.ModuleConfig
Enables per-workflow metric enablement via CL_CRE_SETTINGS overrides (e.g. "UserMetricEnabled": "true")

Why
The EngineLimiters had UserMetricEnabled and other metric limiters created from cresettings, but they were never passed to ModuleConfig. The WASM host function emit_metric always returned -1 because the gate was never opened. This change passes the limiters through so the settings system actually controls metric emission.

common change - smartcontractkit/chainlink-common#1964

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestCCIPReader_Nonces The test failed due to an unexpected 'replacement transaction underpriced' error during execution. Logs ↗︎

View Full Report ↗︎Docs

@karen-stepanyan karen-stepanyan marked this pull request as ready for review April 7, 2026 16:58
@karen-stepanyan karen-stepanyan requested review from a team as code owners April 7, 2026 16:58
Copilot AI review requested due to automatic review settings April 7, 2026 16:58
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

Risk Rating: MEDIUM — Changes affect workflow WASM host configuration (runtime gating/limits) plus a cross-repo dependency bump.

This PR wires per-workflow “user metric” limiters from EngineLimiters into the WASM host.ModuleConfig, enabling metric emission to be controlled via CL_CRE_SETTINGS overrides (aligning with the referenced chainlink-common change).

Changes:

  • Pass user-metric gate + size/length limiters into host.ModuleConfig in the v2 workflow syncer engine factory.
  • Attempt to pass the same limiters in the CRE standalone engine path (but currently after module instantiation—see stored comment).
  • Bump github.com/smartcontractkit/chainlink-common (and github.com/grafana/pyroscope-go) across modules to pick up the corresponding host config fields.

Reviewed changes

Copilot reviewed 10 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
core/services/workflows/syncer/v2/handler.go Populates host.ModuleConfig with user-metric limiters when creating workflow WASM modules.
core/services/workflows/cmd/cre/utils/standalone_engine.go Adds wiring of user-metric limiters into host.ModuleConfig for standalone engine creation (ordering needs fix).
go.mod / go.sum Bump chainlink-common and pyroscope-go at repo root.
deployment/go.mod / deployment/go.sum Align dependency versions with root module bump(s).
core/scripts/go.mod / core/scripts/go.sum Align dependency versions with root module bump(s).
integration-tests/go.mod / integration-tests/go.sum Align dependency versions with root module bump(s).
integration-tests/load/go.mod / integration-tests/load/go.sum Align dependency versions with root module bump(s).
system-tests/lib/go.mod / system-tests/lib/go.sum Align dependency versions with root module bump(s).
system-tests/tests/go.mod / system-tests/tests/go.sum Align dependency versions with root module bump(s).

@cl-sonarqube-production
Copy link
Copy Markdown

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.

3 participants