Skip to content

fix #154064 which was running the wrong taskgroups#164983

Merged
meganrogge merged 1 commit intomicrosoft:mainfrom
jasonwilliams:fixBrokenTasks
Nov 1, 2022
Merged

fix #154064 which was running the wrong taskgroups#164983
meganrogge merged 1 commit intomicrosoft:mainfrom
jasonwilliams:fixBrokenTasks

Conversation

@jasonwilliams
Copy link
Contributor

@jasonwilliams jasonwilliams commented Oct 29, 2022

Fixes #154064

This fixes the issue where "Run Test Task" would trigger a build task and vice versa. This is behaviour which shouldn't happen.

The bug was here where we were doing taskGroup._id === taskGroup._id so the group was being tested against itself and would always be true. So this would execute the first task where the file glob matched (even if the task group was not the one you asked for).

Now we properly check the correct task group matches before executing.
I'm surprised TypeScript didn't catch this as we were just comparing the same value with itself.

@alexr00

Copy link
Collaborator

@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.

Thanks!

@meganrogge meganrogge requested a review from alexr00 October 31, 2022 16:32
@meganrogge meganrogge added this to the November 2022 milestone Oct 31, 2022
@meganrogge meganrogge merged commit a46fb19 into microsoft:main Nov 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2022
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.

[Bug] - Test tasks shouldn't be triggered by build command (vice versa)

3 participants