-
Notifications
You must be signed in to change notification settings - Fork 186
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
ci: Allow upstream git refs to be used for benchmarking #3730
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3730 +/- ##
==========================================
+ Coverage 77.55% 77.58% +0.03%
==========================================
Files 729 729
Lines 91917 92035 +118
==========================================
+ Hits 71284 71409 +125
+ Misses 20633 20626 -7 |
CodSpeed Performance ReportMerging #3730 will improve performances by 46.34%Comparing Summary
Benchmarks breakdown
|
Oh, is this for when you're |
commit_hash = ( | ||
subprocess.check_output(["git", "rev-parse", branch_name], stderr=subprocess.STDOUT).strip().decode("utf-8") | ||
subprocess.check_output(["git", "rev-parse", local_branch_name], stderr=subprocess.STDOUT) |
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.
This should be remote_branch_name
then, no?
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.
I don't think it matters. If I'm not wrong, the commit hash should be the same for local and remote
tools/git_utils.py
Outdated
.decode("utf-8") | ||
) | ||
has_upstream = True | ||
local_branch_name = upstream_branch |
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.
Instead of setting has_upstream = True
here and then performing a check later, can't we just perform the splitting here? I.e.:
local_branch_name = upstream_branch.split("/", 1)[1]
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.
Good catches, I was kind of lazy when coding this up 😅 cleaned up now!
Had trouble running the benchmarking tool when local branch names didn't match remote branch names. Fix it so that we check for upstream branch names and use them.
E.g. if I run the tool on
local-branch-name
, it findsorigin/user/remote-branch-name
then runs the action onuser/remote-branch-name
.