Skip to content

adding resource manager for workflows#22845

Draft
patrickhuie19 wants to merge 12 commits into
developfrom
feat/shared-2712
Draft

adding resource manager for workflows#22845
patrickhuie19 wants to merge 12 commits into
developfrom
feat/shared-2712

Conversation

@patrickhuie19

@patrickhuie19 patrickhuie19 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@patrickhuie19 patrickhuie19 changed the title adding resource manager for wf size adding resource manager for workflows Jun 15, 2026
@patrickhuie19 patrickhuie19 added build-publish Build and Publish image to SDLC do not merge labels Jun 15, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

CORA - Pending Reviewers

Codeowners Entry Overall Num Files Owners
* 30 @smartcontractkit/foundations, @smartcontractkit/core
/core/services/workflows/ 7 @smartcontractkit/keystone
/core/services/standardcapabilities/ 2 @smartcontractkit/keystone
/core/web/resolver/ 3 @smartcontractkit/foundations, @smartcontractkit/core
go.mod 6 @smartcontractkit/core, @smartcontractkit/foundations
go.sum 6 @smartcontractkit/core, @smartcontractkit/foundations
integration-tests/go.mod 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations
integration-tests/go.sum 1 @smartcontractkit/core, @smartcontractkit/devex-tooling, @smartcontractkit/foundations
/docs/CONFIG.md 1 @smartcontractkit/foundations, @smartcontractkit/core, @smartcontractkit/devrel

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_CCIP_Messaging_Sui2EVM_Success/Message_to_EVM The test is waiting for a commit report event that never arrives, causing it to timeout. Logs ↗︎
Test_CCIP_Messaging_Sui2EVM_Success The test failed due to an unspecified error during execution, with no clear indication of the specific cause. Logs ↗︎

View Full Report ↗︎Docs

…re-anchor

Phase 4 of the delta-based metering redesign, built against the new
chainlink-common resourcemanager API (EmitDelta/EmitUsage, RM-generated
event_id, no UtilizationFields.EventID).

TOML-only gating (kills split-brain):
- Delete env.MeterRecordsEnabled and the CL_METER_RECORDS_ENABLED LOOP
  pass-through (provably shadowed by AsCmdEnv) + its subtests.
- Delete cre.meterRecordsEnabled(); gate the syncer ResourceManager on
  cfg.Metering().MeterRecordsEnabled()/MeterSnapshotsEnabled().
- Default [Metering].Product = "cre" (accessor + core.toml + CONFIG.md).

Dead-plumbing removal:
- Remove standardcapabilities.NodeIdentity struct, delegate field/ctor param,
  and its population in application.go. Identity delivery is loop.EnvConfig.

node_id logical name:
- loop_registry already sources NodeID from [Metering].NodeID; fix fixtures
  (csa-pubkey-1 -> clp-cre-wf-zone-a-1) and drop the CSA-pubkey comment.

Host-side CapDONID (rule 8):
- Delegate already resolves and populates CapabilityDonID on the dependencies
  handed to capability LOOPs at Initialise; add a test asserting a nonzero
  CapDONID round-trips (and zero is preserved for the workflow-DON fallback).

Syncer v2 metering re-anchor (handler.go):
- Emit anchors on artifact persistence: EmitDelta(+1) when a new spec's
  artifacts are first persisted, EmitDelta(-1) when a real delete removes them.
  Pause/activate and status-only updates emit nothing.
- Delete emitGracefulCloseReleases and its call in close (no lifecycle emits).
- GetUtilization enumerates persisted specs (WorkflowSpecsDS.GetWorkflowSpecList)
  at value 1 per workflow; org resolved from the stored owner via the shared
  CachingOrgResolver. Records resolve org from payload owner via ResolveOrEmpty.
- Default ResourceManager to nil (nil-guarded), reuse one emitSpecDelta helper.

Regenerate txtar validate/merge goldens and effective TOMLs for the new
Product default and the Tenant/NumericTenantID dimensions.

Note: local replace directives point chainlink, core/scripts and deployment at
the ../chainlink-common and ../chainlink-protos/metering/go siblings so this
branch builds against the finished upstream API; the maintainer drops these and
bumps the module pins at merge time.
…w syncer

The common EmitDelta now requires a producer-supplied event_id. The syncer is a
workflow-DON service driven by reconciliation against the shared on-chain
WorkflowRegistry, so every workflow-DON node sees the same event and derives the
identical id via resourcemanager.EventID:

- create (+1): EventID("workflow-spec-register", workflowID, CreatedAt) — the
  on-chain CreatedAt is DON-consistent and distinguishes a re-registration from
  the original (re-activate-after-delete does not collide).
- delete (-1): EventID("workflow-spec-delete", workflowID). WorkflowDeletedEvent
  carries only the workflow ID (no on-chain CreatedAt/block), so repeated
  delete cycles of the same workflowID share an event_id; this residual drift is
  bounded by snapshot reconciliation. See the returned blocker note.

Scrubs the "UUIDv4" event_id wording and the UUID-format validation from the
metering test (event_id is an opaque string; the only check is empty-vs-nonempty).
Aligns the metering pin to the merged chainlink-common pin.
@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

build-publish Build and Publish image to SDLC do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant