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

benchmarks.yml: Fix PR branch checkout when triggered by comment #1998

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

EwoutH
Copy link
Contributor

@EwoutH EwoutH commented Jan 24, 2024

This PR resolves an issue in our GitHub Actions workflow where the correct PR branch was not being checked out when the workflow was triggered by an 'issue_comment' event. Previously, the workflow was set up to handle the 'pull_request_target' event correctly, but it did not account for the different context provided by 'issue_comment'.

The fix involves adding conditional steps in the workflow to handle the 'issue_comment' event. When the workflow is triggered by an 'issue_comment', it now uses the GitHub API to extract the PR number from the comment context. This information is then used to retrieve the PR details, including the head branch and the repository name. With these details, the workflow can now correctly check out the PR branch associated with the issue comment. This ensures that our benchmarks and other PR-related checks run against the appropriate branch, regardless of the triggering event.

See #1994 (comment) and #1983 (comment).

Due to the issue arising with pull request from another fork and the workflow only being updated when merged into main, there is not convenient way to test this except for merging. So I propose we do that.

This commit resolves an issue in our GitHub Actions workflow where the correct PR branch was not being checked out when the workflow was triggered by an 'issue_comment' event. Previously, the workflow was set up to handle the 'pull_request_target' event correctly, but it did not account for the different context provided by 'issue_comment'.

The fix involves adding conditional steps in the workflow to handle the 'issue_comment' event. When the workflow is triggered by an 'issue_comment', it now uses the GitHub API to extract the PR number from the comment context. This information is then used to retrieve the PR details, including the head branch and the repository name. With these details, the workflow can now correctly check out the PR branch associated with the issue comment. This ensures that our benchmarks and other PR-related checks run against the appropriate branch, regardless of the triggering event.
@EwoutH EwoutH added the ci Release notes label label Jan 24, 2024
@EwoutH EwoutH requested review from rht and Corvince January 24, 2024 12:44
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 +1.1% [+0.9%, +1.2%] 🔵 +0.1% [-0.0%, +0.3%]
Schelling large 🔵 +0.9% [+0.3%, +1.4%] 🔵 +3.7% [+2.1%, +5.3%]
WolfSheep small 🔵 +0.8% [+0.6%, +1.1%] 🔵 +0.2% [+0.0%, +0.3%]
WolfSheep large 🔵 +2.6% [+1.4%, +3.7%] 🔵 +2.2% [+1.5%, +2.9%]
BoidFlockers small 🔵 +1.5% [+0.9%, +2.2%] 🔵 -0.4% [-1.2%, +0.4%]
BoidFlockers large 🔵 +1.3% [+0.7%, +1.8%] 🔵 -0.7% [-1.2%, -0.2%]

@EwoutH EwoutH merged commit 243e78e into projectmesa:main Jan 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants