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

Incorrect commit id is added for pytest benchmarks #227

Open
jonathan-eq opened this issue Feb 2, 2024 · 3 comments
Open

Incorrect commit id is added for pytest benchmarks #227

jonathan-eq opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jonathan-eq
Copy link

I am benchmarking with pytest in one repository, and running this workflow from another repository. To get output.json over to the repository using this workflow, I am committing directly to the gh-pages branch. The workflow works very well, but I have noticed that it does not take the commit id from the benchmark output file (which points to which commit the benchmark was ran on), but instead takes the commit id of the commit that added the output.json file in the repository.

@jonathan-eq jonathan-eq changed the title Incorrect commit is added for pytest benchmarks Incorrect commit id is added for pytest benchmarks Feb 2, 2024
@ktrz
Copy link
Member

ktrz commented Feb 2, 2024

Thank you @jonathan-eq for creating an issue.
Are you able to provide some kind of reproduction example or point to a workflow that you are running?

@jonathan-eq
Copy link
Author

So I have a closed repository running tests and benchmarks on an onprem github actions runner. Here the output.json file is created by pytest. The final step in that workflow is pushing the file to the gh-pages branch of an open repository. There, this workflow is ran on new commits. We noticed that one of the commits deviated a lot, and when we tried to investigate, we found out that the commit was the one adding the output.json to the open repo, not the one actually being benchmarked. It should be possible to get the commit id from the output.json file.

@ktrz ktrz added the bug Something isn't working label Mar 28, 2024
@ktrz
Copy link
Member

ktrz commented Mar 28, 2024

Ok @jonathan-eq, I see where the problem is
While investigating, I also noticed that pytest output also contains the time the benchmark was run and it's not being used as well. I'll refactor the logic to extract this information from the output if available and only fallback to commit id of the one triggering the workflow and current date if they were not available in the output

@ktrz ktrz self-assigned this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants