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

Fix a task startup race #180546

Merged
merged 3 commits into from
May 4, 2023
Merged

Conversation

markw65
Copy link
Contributor

@markw65 markw65 commented Apr 21, 2023

Fixes #180541

The fix is to enforce instanceLimit even when there is no entry in _activeTasks. Once that's done, #165560 is no longer needed - and is in fact harmful, since it can incorrectly prevent re-launching a task whose instanceLimit is greater than one.

@markw65
Copy link
Contributor Author

markw65 commented Apr 21, 2023

@meganrogge I found this issue while trying to debug #180243.

Fixes microsoft#180541

The fix is to enforce `instanceLimit` even when there is no entry in
`_activeTasks`. Once that's done, microsoft#165560 is no longer needed - and is in fact
harmful, since it can incorrectly prevent re-launching a task whose
`instanceLimit` is greater than one.
@markw65 markw65 force-pushed the in-progress-tasks-fix branch from d3a1f08 to acbd63f Compare May 4, 2023 15:14
Copy link
Contributor

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

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

Nice work 👏🏼

@meganrogge meganrogge requested a review from Tyriar May 4, 2023 16:29
@meganrogge meganrogge merged commit 79a7b5c into microsoft:main May 4, 2023
@markw65 markw65 deleted the in-progress-tasks-fix branch May 10, 2023 21:41
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is a race in task startup in terminalTaskService.ts
5 participants