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

Update Bencher CLI usage #4335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

epompeii
Copy link
Contributor

@epompeii epompeii commented Nov 5, 2024

This changeset updates the Bencher CLI to the new recommended usage.

@weiznich weiznich requested a review from a team November 5, 2024 15:00
Copy link
Contributor

@PratikFandade PratikFandade left a comment

Choose a reason for hiding this comment

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

Hi @epompeii , Thanks for the PR!

The changes are good overall just a formatting change I've suggested for you to look into.

core.exportVariable("PR_HEAD", `${githubEvent.pull_request.head.ref}-${githubEvent.pull_request.head.sha.slice(0, 8)}`);
core.exportVariable("PR_ID", `${githubEvent.pull_request.head.ref}/${process.env.BENCHER_TESTBED}/${process.env.BENCHER_ADAPTER}`);
core.exportVariable("PR_NUMBER", githubEvent.number);
core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref);
Copy link
Contributor

Choose a reason for hiding this comment

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

The variable prEvent is not present here, we can use the githubEvent instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! Fixed.

This changeset updates the Bencher CLI to the new recommended usage.

- Update deprecated CLI options: https://bencher.dev/docs/explanation/branch-selection/
- Safer and more succinct tracking from forks: https://bencher.dev/docs/how-to/github-actions/#pull-requests-from-forks
- Threshold creation as a part of `bencher run`: https://bencher.dev/docs/explanation/thresholds/
- Use `percentage` test: https://bencher.dev/docs/explanation/thresholds/#percentage
Copy link
Contributor

@PratikFandade PratikFandade left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, LGTM

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