Repository navigation
Conversation
|
👋 wentzeld, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
✅ No conflicts with other open PRs targeting |
|
I see you updated files related to
|
|
Re this Eth Smoke test and Intgration test failure Neither failure is PR code. Both trace to a single root cause. From the job log: chainlink-ccip/chains/solana/gobindings@v0.0.0-...: read "https://proxy.golang.org/...zip": stream error: stream ID 4049; INTERNAL_ERROR; received from peer apache/arrow-go/v18@v18.6.0: ... stream error: stream ID 4821; INTERNAL_ERROR; received from peer ##[error]Failed to read input file: open /tmp/junit-report-regression.xml: no such file or directory Total: 0 = no tests ran; the JUnit enhancer then failed on the missing report, which is what flipped the job red. Those deps (Solana CCIP gobindings, arrow, pprof) are unrelated to a workflow-engine event change, and nothing in the diff touches them. Conclusion: transient proxy.golang.org flakiness (I hit the same class of stream error ... received from peer when fetching logs). No code change needed |
| // call so it surfaces in the CRE UI like any other capability call (see | ||
| // callCapability). One pair is emitted per batch call; a failed call finishes as | ||
| // errored with the returned error. | ||
| func emitVaultGetSecrets[T any]( |
There was a problem hiding this comment.
nit: should probably be called "runWithGetSecretsEvents" or something along those lines. It doesn't just emit, it actually runs the provided function.
There was a problem hiding this comment.
Making this change
| run func() (T, error), | ||
| ) (T, error) { | ||
| stepRef := strconv.FormatInt(int64(callbackID), 10) | ||
| _ = events.EmitCapabilityStartedEvent( |
There was a problem hiding this comment.
Any risks during rollout? What happens if a subset of nodes are upgraded and we fail to aggregate those events? Will the user see some broken state or nothing at all?
There was a problem hiding this comment.
If there isn't quorum, then they just won't see this particular message. I'll confirm
|
|
||
| v, err := run() | ||
|
|
||
| status := store.StatusCompleted |
There was a problem hiding this comment.
Flagged by Claude: Missing or unauthorized secrets were already reported inside the SecretResponse entries with a nil err. Before the PR nobody reported a status for them. The PR now reports succeeded for those calls, which is a new inaccuracy, not a changed behavior.
Probably not a big deal but potentially confusing to users.
There was a problem hiding this comment.
@bolekk this one has two options for fixing, and I'm leaning toward the cheaper option.
Option 1: Add partial success to Capability proto. I don't want to do this now as it is a much bigger piece of work across repos as we don't have partial success on capability calls.
The one I'm implementing: Option 2: Show workflow status in the UI as completed with errors. The capability will show success with an error message saying 2 of 5 fetches failed, while the workflow execution status will be completed with errors (if it succeeded) or failed (if it failed)
Wrap ExecutionHelper.GetSecrets so each vault.secrets.get batch call emits a workflows.v2 CapabilityExecutionStarted/Finished pair, matching the events the engine already emits for other capability calls. The event uses the real workflow execution ID and finishes errored on failure. No new protos or consumer changes.
Emit the capability execution Started/Finished pair from executionHelperWithRawSecrets.GetRawSecretsResponse as well as ExecutionHelper.GetSecrets, via a shared emitVaultGetSecrets helper, so confidential (TEE) workflows surface in the CRE UI like normal ones. GetRawSecrets delegates to GetRawSecretsResponse, so it emits once.
These tests can't call t.Parallel(): they assert on events emitted via beholder.GetEmitter(), the process-global client, so they must swap the global client with beholdertest.NewObserver, which is not parallel-safe. Matches the existing convention (e.g. engine_drop_paths_test.go).
Classify each get-secrets batch by per-secret outcome: all succeed -> completed, some fail -> completed with an error summary (so the CRE UI derives completed_with_errors), all fail -> errored. The call still returns its responses; only the emitted event status/error changes.
632a92e to
f392a90
Compare
|




Wrap the Vault get-secrets host entry points so each
vault.secrets.getbatch call emits aworkflows.v2CapabilityExecutionStarted/Finishedpair, matching the events the enginealready emits for other capability calls (see
callCapability). The event uses the realworkflow execution ID and finishes errored on failure. No new protos or consumer changes.
Previously Vault
getSecretsbypassed the generic capability-executor emit path (the SDKroutes secrets to the host-side
secretsFetcher, which calls the vault capabilitydirectly), so Vault reads never appeared in the CRE UI. This change emits the same event
type/fields as every other capability call, so it shows up as a first-class execution step
with no consumer changes.
Covers both host entry points:
ExecutionHelper.GetSecrets— normal workflows.executionHelperWithRawSecrets.GetRawSecretsResponse— confidential (TEE) workflows.(
GetRawSecretsdelegates toGetRawSecretsResponse, so it emits once.)Both delegate to a shared
emitVaultGetSecretshelper.Design
capability_id = vault@1.0.0,method = vault.secrets.get,step_ref = CallbackId.workflow_execution_id= the real engine execution ID; labels frombase.eventLabels().erroredand the error string.design doc
Test plan
go test ./core/services/workflows/v2/ -run 'TestExecutionHelper_GetSecrets|TestExecutionHelper_GetRawSecretsResponse' -vGetSecretssuccess + errored-on-failure (normal path).GetRawSecretsResponsesuccess + errored-on-failure (confidential/TEE path).capability_id = vault@1.0.0,method = vault.secrets.get, real execution ID,step_ref = CallbackId, and status/error on both paths.Requires
None.
Supports
None.
Deployment Validation Steps
Low blast radius: additive observability only, no change to request/response behavior,
no proto or consumer changes.
runtime.GetSecretsagainst a populated secret.shows a
vault@1.0.0/vault.secrets.getstep for it too.status = succeeded, tied to the correct execution ID.shows
status = erroredwith the error surfaced.