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

Document ambiguous ID and test for mismatch on signal start #612

Merged
merged 5 commits into from
Nov 15, 2021

Conversation

cretz
Copy link
Member

@cretz cretz commented Nov 1, 2021

What was changed

Document different ways to give workflow ID on signal with start, and ensure the unused one doesn't mismatch.

Why?

We ignore workflow IDs coming from options, so we make sure it's not expecting to be used.

Checklist

  1. Closes Document/enforce SignalWithStartWorkflow does not use same workflow ID option as ExecuteWorkflow #603

@cretz cretz changed the title Document ambiguous ID and test for mismatch Document ambiguous ID and test for mismatch on signal start Nov 1, 2021
// Due to the ambiguous way to provide workflow IDs, if options contains an
// ID, it must match the parameter
if options.ID != "" && options.ID != workflowID {
return nil, fmt.Errorf("workflow ID from options not used, must be unset or match workflow ID parameter")
Copy link
Member

Choose a reason for hiding this comment

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

This is technically a breaking change.
I think it's necessary but we should document this in the release notes and mark it as breaking.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only a breaking change if you consider extra validation of (unbeknownst) improper param setting as a breaking change. It went from being an invalid param do the wrong thing to an invalid param error.

Copy link
Member

Choose a reason for hiding this comment

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

I'm aware, but this still could result in a change of behavior in some rare cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 Ok, I will make sure to document in the release notes

@cretz cretz merged commit 00a6c49 into temporalio:master Nov 15, 2021
@cretz cretz deleted the ambiguous-workflow-id branch November 16, 2021 14:49
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.

Document/enforce SignalWithStartWorkflow does not use same workflow ID option as ExecuteWorkflow
2 participants