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

asynchronously create PRs #9485

Merged
merged 7 commits into from
Apr 12, 2024
Merged

Conversation

jakecoffman
Copy link
Member

The PR creation process requires gathering a significant amount of metadata which is IO heavy. Rather than wait for that to finish, we can pop that in a thread and continue on with the next updates.

Testing locally against dependabot-core this lead to a 30% reduction in the job runtime, but it's very dependent on if there's a lot of PRs to create.

The major downside of this is that the logs become more difficult to read because the metadata gathering overlaps with the output for the next dependency, so I've put this behind an experiment and we can enable it on customers that are hitting the timeout.

@jakecoffman jakecoffman requested a review from a team as a code owner April 12, 2024 12:50
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Neat idea.

For the difficulty in following the logs, would it help to add a thread ID as a prefix on the relevant logs?

@jakecoffman
Copy link
Member Author

@jeffwidman that might work, or maybe it's not as big of a deal as I think. If we could make the logs clear to read while doing this is would be great to roll out to all updates.

@jakecoffman jakecoffman merged commit 37d86e4 into main Apr 12, 2024
121 checks passed
@jakecoffman jakecoffman deleted the jakecoffman/thread-service-calls branch April 12, 2024 16:17
@jeffwidman
Copy link
Member

jeffwidman commented Apr 12, 2024

Yeah, I've leveraged the thread prefix idea before in both Python and Go very effectively for debugging async bugs in other projects, and every time it was so helpful, especially since I could just grep through the logfile to jump past all the noise when following one specific thread...

But as you say, try it and see how bad it is first. 🕺

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