-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Fixed #33862 -- Added workflow to run the ASV benchmarks for labeled PR. #15866
Conversation
Hello @deepakdinesh1123! Thank you for your contribution 💪 As it's your first contribution be sure to check out the patch review checklist. If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket! If you have any design or process questions then you can ask in the Django forum. Welcome aboard ⛵️! |
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.
Hey @deepakdinesh1123. Thanks for this.
I need to have a proper look next week, but initial thoughts:
- I had imagined that we'd trigger the workflow in the
smithdc1/django-asv
repo (wherever that ends up being housed), which would fetch the latest Django commit, and run the benchmarks, committing the results, rather than checking out here. Likely this is just me needing to turn my head the other way around, but 🤔 - At least on the Wiki CI page, if not in the Contributing Guide (somewhere) we should document "Add the
benchmark
label" to run...", linking to the README there so folks can dig-in.
Since it required the creation of an
Should I edit the Wiki CI page on the website itself and submit the changes? |
Let's wait. The label doesn't exist yet, and it'd be confusing, but you can draft up any notes and post them here, or ..., if you like. |
Yes -- That's how I had it in my head to start with too. However, we ran into access issues and needing to pass tokens about which I'm not sure about. There is this blog post which shows one approach but that seems rather complex.
So we can't commit the results with this approach, but I think that's ok. I think the question we're trying to answer with this patch is "in back to back runs, is a PR +ve or -ve". Storing the result of that run is not important, it'll be picked up in the daily run on the |
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.
Hey @deepakdinesh1123 — I added the label, and it seems to work so... 👍
I think if you rebase the flake8
errors are already fixed.
I'm not sure about that 🤔 in logs, I only see:
|
Ah, yes... actually looking at the run. 😜 (I was looking at That it triggered only) |
42ab14c
to
1f7b44b
Compare
I tried to set up the machine details in ASV using several different methods but all of them displayed the message |
Given that stdout is going to
… and then we can disgard that if we're happy. Beyond that, can we echo enough of the output to verify that the benchmarks ran correctly if we look at the logs, maybe with something like the total time as a sanity check? 🤔 |
The output of
It is required before running asv benchmarks on a machine as it asks the user to enter details in interactive mode if not done. Should I redirect the output of this command to some other file so this is not printed on the screen?
ASV does not have any methods to measure the total time taken to run the benchmarks, Shall I use some other method( |
Yes, please. Let's just capture that. 👍
Hmmm. Not sure: need to play but it would be nice to have something like the target time, and the actual time that led to the faster/slower decision (if that makes sense). 🤔 (Anything really: we get the status check, but nice to look to the logs for more detail if possible...) What do you think? |
@deepakdinesh1123 Also — can you look at why the benchmark workflow isn't triggered for 1f7b44b 🤔 |
OK... If I remove the label and re-add it again, the workflow is triggered. Ideally it would run for pushes to the PR branch if the label is already applied too. I'm sure that's feasible with the right YAML. 🤔 Can you have a look? (Update: since the benchmarks take a while, we might not want them auto-run on push...) Thanks |
@carltongibson I have added the condition to run the benchmarks when pushes are made to pr with a given label, in order to avoid the auto-run of the benchmarks shall I modify the workflow such that it runs when a comment with the content benchmark is made? |
7a3b405
to
d2d3e74
Compare
d788539
to
a7bd09b
Compare
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.
By removing the label we're able to skip the benchmarks again. I think that's a nice enough control. Toggle on for any PR where we want to run it, toggle off to disable that for updates, until ready to toggle on again. We can tweak, but I think that's good enough to go.
Thanks for this @deepakdinesh1123 — let's see how it goes over the next period! 👍
I added a note to the CI Wiki page: https://code.djangoproject.com/wiki/CI#GitHubactions |
I have added a workflow that runs the benchmarks in smithdc1/django-asv against a pull request when it is labeled with the label
benchmark
. If the performance has not changed significantly, a pull request status messageBenchmarking Result - BENCHMARKS NOT CHANGED SIGNIFICANTLY
is added, if the performance has decreased a pull request status messageBenchmarking Result - SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY. PERFORMANCE DECREASED
is added.ticket-33862