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

fix(plugins-benchmark-pr): run comparison benchmark against target #120

Merged

Conversation

mweberxyz
Copy link
Contributor

Closes #93

Previously, the second benchmark run ran against the default branch of the (potentially forked) repo, which might not be in sync with the PR target repo.

Checklist

…R base

Closes fastify#93

Previously, the second benchmark ran against the default branch of the (potentially forked) repo, which might not be in sync with the PR target repo.
@Uzlopak
Copy link
Contributor

Uzlopak commented Feb 20, 2024

Did you test it somehow?

@mweberxyz
Copy link
Contributor Author

@Uzlopak Take a look here: mweberxyz/point-of-view#3

The sample PR merges fastify/point-of-view@master into mweber/point-of-view@master, so you would expect the initial benchmark run to be against fastify/pov, and the comparison benchmark run to be against mweberxyz/pov. Note that because all the testing is happening in a fork, everything is "backwards".

The benchmark tag was added, which triggered the workflow at fastify/workflows@main was used.

Then, I updated the workflow configuration, added the tag, and the workflow at mweberxyz:fix/benchmark-runs-against-merge-target was used -- https://github.com/mweberxyz/point-of-view/actions/runs/7979681524/job/21787636566

Initial run: fastify/workflows@main

On the initial run, the first benchmark ran against fastify/point-of-view@master as expected, but then the second benchmark ran against fastify/point-of-view@master again.

CleanShot 2024-02-20 at 16 12 46@2x

Second run: mweberxyz:fastify-workflows@fix/benchmark-runs-against-merge-target

On the second run, the first benchmark ran against fastify/point-of-view@master as expected, and then the second benchmark ran against mweberxyz/point-of-view@master -- which is expected because that is what the PR is trying to merge into.

CleanShot 2024-02-20 at 16 15 32@2x

@mweberxyz
Copy link
Contributor Author

I suppose the PR comments created by the workflow could be more clear as well. If you look at the sample PR, it just says "master" and "master" -- not indicating which master we are talking about. I'll take a peek at fixing that.

@Uzlopak
Copy link
Contributor

Uzlopak commented Feb 20, 2024

thank you for your support

@mweberxyz mweberxyz marked this pull request as draft February 20, 2024 21:58
@mweberxyz mweberxyz force-pushed the fix/benchmark-runs-against-merge-target branch 3 times, most recently from ada03e3 to 9c0cccd Compare February 20, 2024 23:48
@mweberxyz mweberxyz force-pushed the fix/benchmark-runs-against-merge-target branch from 9c0cccd to a9911bc Compare February 20, 2024 23:56
@mweberxyz mweberxyz marked this pull request as ready for review February 21, 2024 00:05
@mweberxyz
Copy link
Contributor Author

@Uzlopak Ready for review!

I accidentally added some functionality. Previously, the workflow always ran the second benchmark against the default branch, but now it runs against the target of the PR. If any user of this workflow wants to keep the current functionality, they can specify target_sha and target_ref inputs to the current master sha.

See here for benchmark output: mweberxyz/point-of-view#3 (comment)

Uzlopak
Uzlopak previously approved these changes Feb 21, 2024
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

RSLGTM
Based on the output linked @mweberxyz

@Uzlopak
Copy link
Contributor

Uzlopak commented Feb 21, 2024

I would recommend to merge and release and see if it works like it should.

@mweberxyz
Copy link
Contributor Author

Benchmark workflow run as of most recent commits: https://github.com/mweberxyz/point-of-view/actions/runs/8006413114/job/21868091703?pr=3

@mweberxyz
Copy link
Contributor Author

Also need to push docs changes.

In my fork, the benchmark label was not removed with a 403 after the benchmark run, because it was trying to remove the label from PR in fastify repo — not the PR in forked repo.
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

Let s go

@Uzlopak Uzlopak merged commit 9cb42e3 into fastify:main Feb 25, 2024
1 check passed
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.

benchmark workflow broken
3 participants