-
Notifications
You must be signed in to change notification settings - Fork 127
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
DEVPROD-11189 Resolve execution and display tasks correctly for API Patches #8389
DEVPROD-11189 Resolve execution and display tasks correctly for API Patches #8389
Conversation
12fc1aa
to
6ba7303
Compare
@@ -224,3 +224,46 @@ func TestDownstreamTasks(t *testing.T) { | |||
assert.Len(a.DownstreamTasks[0].Tasks, 2) | |||
assert.Len(a.DownstreamTasks[0].VariantTasks, 1) | |||
} | |||
|
|||
func TestPreselectedDisplayTasks(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth testing how it behaves where the user only selects a subset of execution tasks in the display task? I'm not sure if anyone really selects just a subset of a display task to run, but I don't think it's disallowed either, and may count as surprising/unexpected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The execution tasks shouldn't be allowed to select on the UI (though I think the configure route could get behind that).
This test I think tests that though, it selects an execution tasks and makes sure the corresponding display task and other execution tasks are also paired (which propagates up to the variant tasks)
DEVPROD-11189
Description
When running
evergreen patch -t all -v all
you see display tasks + their execution tasks. This is because our APIPatch's were resolved without the display tasks being linked to their execution tasks and our new UI simply displaying whatever tasks are inside the variant tasks (which would be the execution tasks as well).This PR adds the execution tasks to display tasks when we create the patch, and it also removes the execution tasks from the variant tasks in favor of just adding the display tasks.
Testing
Old patch
New patch
The "execution-task" tasks are not in the new patch. I tried scheduling both and a variety of selecting and unselecting, and the new patch appropriately schedules the execution tasks if the display task is selected.
Note that the old UI always works, because it does specific logic on its end to remove the execution tasks that are associated with the display tasks from the array before display it. This could work for the new ui, but the graphql mutations and adjustments to its data models are complicated since it reaches a lot of different places. It's simpler to do it this way because we resolve display tasks to its execution tasks anyways.