Skip to content

[Workflows] Add sensitive step output option#6758

Open
pombosilva wants to merge 1 commit into
mainfrom
osilva/workflows-add-sensitive-step-option
Open

[Workflows] Add sensitive step output option#6758
pombosilva wants to merge 1 commit into
mainfrom
osilva/workflows-add-sensitive-step-option

Conversation

@pombosilva
Copy link
Copy Markdown
Contributor

Adds an optional sensitive field to WorkflowStepConfig and WorkflowStepEvent.

This lets workflow users mark a step's output (or an incoming step event payload) as sensitive so the Workflows runtime can redact it from logs and observability surfaces.

 const token = await step.do('get-api-token',
      { sensitive: 'output', timeout: '30 seconds' },
      async () => {
        return await getToken(event.payload.userId);
      }
);

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 12, 2026

The files in generated-snapshot/ are generated files. The AGENTS.md for types/ explicitly says: "Do not edit files in generated-snapshot/ directly — they are overwritten by just generate-types." However, for pure defines/ additions like this, the generated snapshots are produced by concatenating the defines files, so the changes are consistent and correct as long as they pass CI's diff check.

The PR is a straightforward, additive type change:

  1. New WorkflowStepSensitivity = 'output' type alias
  2. Optional sensitive field added to WorkflowStepConfig and WorkflowStepEvent
  3. All fields are optional, so this is backward compatible
  4. No behavioral changes, no compat flag needed (it's just types)
  5. The changes in generated-snapshot/ mirror the defines/rpc.d.ts changes correctly

This is clean and correct. No actionable issues.

LGTM

github run

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing osilva/workflows-add-sensitive-step-option (6cb3fd0) with main (f116855)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@avenceslau avenceslau marked this pull request as ready for review May 17, 2026 19:43
@avenceslau avenceslau requested review from a team as code owners May 17, 2026 19:44
@avenceslau avenceslau requested a review from jamesopstad May 17, 2026 19:44
@pombosilva pombosilva force-pushed the osilva/workflows-add-sensitive-step-option branch from 400c378 to 6cb3fd0 Compare May 18, 2026 08:25
Comment thread types/defines/rpc.d.ts

export type WorkflowBackoff = 'constant' | 'linear' | 'exponential';

export type WorkflowStepSensitivity = 'output';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the idea that there might be alternatives to output in future? How will it work if there are multiple options for sensitive?

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.

2 participants