Skip to content

Add context.Context to callback.Validator interface#10140

Open
fretz12 wants to merge 1 commit intotemporalio:mainfrom
fretz12:fredtzeng/cb-validator-withctx
Open

Add context.Context to callback.Validator interface#10140
fretz12 wants to merge 1 commit intotemporalio:mainfrom
fretz12:fredtzeng/cb-validator-withctx

Conversation

@fretz12
Copy link
Copy Markdown
Contributor

@fretz12 fretz12 commented May 1, 2026

What changed?

Added context.Context as the first parameter to the callback.Validator interface and threaded it through all call
sites (WorkflowHandler, activity.FrontendHandler, and their internal validation/preparation methods). The base validator ignores the context. No behavioral change.

Why?

Deployments that decorate the validator (via fx.Decorate) need access to the gRPC context to check caller identity — e.g. to allow internal callers (scheduler) to attach temporal://internal callbacks while rejecting them from external users.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@fretz12 fretz12 marked this pull request as ready for review May 1, 2026 15:47
@fretz12 fretz12 requested review from a team as code owners May 1, 2026 15:47
@fretz12 fretz12 requested a review from bergundy May 1, 2026 15:54
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