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

feat: use new batched queries in task replacement (bug 1840830) #496

Merged
merged 1 commit into from
May 6, 2024

Conversation

Alphare
Copy link
Contributor

@Alphare Alphare commented Apr 29, 2024

Batching queries to get from task index to status reduces the number of (sometimes trans-continental) queries from 2*900+ to ~2. This reduces the time spent replacing tasks from 20% to 75% depending on the use-case.

The 20% improvement in wall time was observed when running mach taskgraph morphed in a CI worker, while the 75% improvement was observed in a developer machine in France running mach taskgraph full.

More information in taskcluster/taskcluster-rfcs#189.

@Alphare Alphare force-pushed the taskcluster.batched-queries branch 5 times, most recently from 6a7f2a0 to a8f5f09 Compare May 1, 2024 08:19
@ahal
Copy link
Collaborator

ahal commented May 1, 2024

I have no idea what's up with those task failures, never seen that before..

@jcristau
Copy link
Contributor

jcristau commented May 2, 2024

Wow this decision task generated quite a messed up graph. Things end up using the index-task docker image instead of whatever docker image they wanted. full-task-graph.json looks sane, but task-graph.json has PebYGdYSQgu0_iTKTCg_fQ as dependency where it shouldn't be.

@Alphare
Copy link
Contributor Author

Alphare commented May 2, 2024

I think I didn't have this problem when I hadn't yet changed the tests (to check if the local failures were the same). Does that give any hints as to what I should do @jcristau ?

@jcristau jcristau force-pushed the taskcluster.batched-queries branch from 3e84498 to 74d994f Compare May 2, 2024 09:41
@Alphare Alphare force-pushed the taskcluster.batched-queries branch from 9b4dce5 to 16c441e Compare May 2, 2024 11:01
@Alphare
Copy link
Contributor Author

Alphare commented May 2, 2024

Tests are fixed, I hadn't fixed a problem in both places it was and the result was confusing to me. Everything seems good now.

@Alphare Alphare marked this pull request as ready for review May 2, 2024 12:37
@Alphare
Copy link
Contributor Author

Alphare commented May 2, 2024

Tests are fixed, I hadn't fixed a problem in both places it was and the result was confusing to me. Everything seems good now.

@ahal ahal self-requested a review May 2, 2024 19:01
Copy link
Collaborator

@ahal ahal left a comment

Choose a reason for hiding this comment

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

Thanks, looking good! This needs a bit of refactoring though

@Alphare Alphare force-pushed the taskcluster.batched-queries branch from 16c441e to b079932 Compare May 3, 2024 09:58
@Alphare
Copy link
Contributor Author

Alphare commented May 3, 2024

Thanks for the quick review and the very pertinent comments.

Copy link
Collaborator

@ahal ahal left a comment

Choose a reason for hiding this comment

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

Thanks, this looks correct. I have one minor refactor request, then I think this can merge. I'll handle the merge + new release after the next iteration.

@Alphare Alphare force-pushed the taskcluster.batched-queries branch from b079932 to 6434015 Compare May 6, 2024 16:43
Batching queries to get from task index to status reduces the number of
(sometimes trans-continental) queries from 2*900+ to ~2. This reduces the
time spent replacing tasks from 20% to 75% depending on the use-case.

The 20% improvement in wall time was observed when running
`mach taskgraph morphed` in a CI worker, while the 75% improvement
was observed in a developer machine in France running `mach taskgraph full`.

More information in taskcluster/taskcluster-rfcs#189.
@Alphare
Copy link
Contributor Author

Alphare commented May 6, 2024

@ahal Thanks, all of your comments should be addressed now.

Copy link
Collaborator

@ahal ahal left a comment

Choose a reason for hiding this comment

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

Awesome, lgtm!

@ahal ahal merged commit 5207917 into taskcluster:main May 6, 2024
8 checks passed
@JohanLorenzo JohanLorenzo changed the title feat: use new batched queries in task replacement feat: use new batched queries in task replacement (bug 1840830) May 23, 2024
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.

3 participants