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

Reassign runningWorkflows workflow ID in test environment #1163

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

Update the runningWorkflows map with the specified ID if set

closes: #1160

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review July 16, 2023 01:34
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner July 16, 2023 01:34
// Reassign the ID in running Workflows so SignalWorkflowByID can find the workflow
originalID := wf.WorkflowExecution.ID
env.runningWorkflows[options.ID] = env.runningWorkflows[wf.WorkflowExecution.ID]
delete(env.runningWorkflows, originalID)
Copy link
Member

Choose a reason for hiding this comment

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

I was originally thinking maybe we wanted to also leave it in the map under the original ID, but if someone is referring to it by original ID in their tests even after setting w/ a new ID, I think they can be asked to fix their tests. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I think it is a reasonable to ask they fix their test

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 930cc2b into temporalio:master Jul 17, 2023
5 checks passed
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.

TestWorkflowEnvironment.XByID does not work with primary ID after primary ID updated
2 participants