Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove skip_generate_workflow_task from signal APIs #476

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Nov 14, 2024

What changed?
Remove skip_generate_workflow_task flag from signal APIs and events.

Why?
See temporalio/temporal#6810 for details.

Breaking changes
Yes, but shouldn't be used.

Server PR
temporalio/temporal#6810 will be merged before this PR.

// Indicates the signal did not generate a new workflow task when received.
bool skip_generate_workflow_task = 5;
reserved 5;
Copy link
Member

Choose a reason for hiding this comment

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

I do not believe this is a safe/compatible change. We have an obligation to have JSON/field-name compatibility, not just proto binary compatibility, especially for history but also for RPC requests since we have an HTTP API. Can we just document that it's deprecated/ignored?

@alexshtin alexshtin changed the title Remove SkipGenerateWorkflowTask from signal APIs Remove skip_generate_workflow_task from signal APIs Nov 14, 2024
alexshtin added a commit to temporalio/temporal that referenced this pull request Nov 15, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Remove `SkipGenerateWorkflowTask` flag from signal APIs request. Some
sort of revert of #4091.

## Why?
<!-- Tell your future self why have you made these changes -->
This flag breaks important system invariant: Workflow history must end
with Workflow Task event OR event that is no-op for SDK (such as
`ActivityScheduled` or `TimerStarted`). This invariant will be leverage
at #6709 where server must guarantee that it won't ship actual (non
command) events to the worker twice.

PR to remove flag from APIs: temporalio/api#476.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Existing tests.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
Although this flag is not exposed by any SDK and not documented, there
is a chance that someone use it in production scenarios. For them it
will be a breaking change.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
Not documented.

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No.
@alexshtin alexshtin force-pushed the feature/remove-skip-wft-flag branch 2 times, most recently from 2ce642d to 1abaed7 Compare November 15, 2024 00:23
@alexshtin alexshtin force-pushed the feature/remove-skip-wft-flag branch from 1abaed7 to d6d0a99 Compare November 15, 2024 00:27
// Indicates that a new workflow task should not be generated when this signal is received.
bool skip_generate_workflow_task = 9;
reserved 9;
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to do the same thing here as we did with the history, we need to deprecate/document but not remove the field. These things are part of the HTTP API and need to be JSON compatible.

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Approving because this is probably safe, but overall we should be deprecating fields, not removing them. And we shouldn't have inconsistent deprecation approaches based on how we think users may be using our public, stable, released API models.

@alexshtin alexshtin merged commit 554e8e0 into temporalio:master Nov 18, 2024
3 checks passed
@alexshtin alexshtin deleted the feature/remove-skip-wft-flag branch November 18, 2024 18:29
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