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

DEVPROD-11189 Resolve execution and display tasks correctly for API Patches #8389

Merged
merged 6 commits into from
Dec 4, 2024

Conversation

ZackarySantana
Copy link
Contributor

@ZackarySantana ZackarySantana commented Oct 10, 2024

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.

@ZackarySantana ZackarySantana changed the title DEVPROD-11189 Add display tasks to models for configure page DEVPROD-11189 Resolve execution and display tasks correctly for API Patches Dec 2, 2024
@ZackarySantana ZackarySantana requested a review from a team December 2, 2024 19:43
@ZackarySantana ZackarySantana marked this pull request as ready for review December 2, 2024 19:43
@ZackarySantana ZackarySantana removed the request for review from a team December 2, 2024 19:44
@ZackarySantana ZackarySantana requested a review from a team December 2, 2024 19:45
@@ -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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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)

@ZackarySantana ZackarySantana merged commit f5e7430 into evergreen-ci:main Dec 4, 2024
10 checks passed
@ZackarySantana ZackarySantana deleted the DEVPROD-11189 branch December 4, 2024 15:34
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.

2 participants