data icon indicating copy to clipboard operation
data copied to clipboard

maintenance: performance release check needs to account for pnpm version updates

Open runspired opened this issue 1 year ago • 8 comments

Currently it crashes because the release branch almost always has a different pnpm version than the main/pr branch.

We should update this workflow to either re-setup pnpm on a per-branch basis, or to use a github action that allows our volta configuration to do so.

Note: PRs gate this workflow on whether the ci-perf label is applied. To test, open a PR and a maintainer will apply this label.

runspired avatar Sep 03 '23 22:09 runspired

@runspired I would like to work on this issue. Please assign me this and guide me through it

shirsho-roy avatar Sep 15 '23 21:09 shirsho-roy

@shirsho-roy I've updated the ticket above. Roughly speaking this involves updating the workflow such that when the check builds the assets we get the correct pnpm.

There are two approaches.

Approach one: make it such that volta will do the right thing. I believe this means changing this bit to have volta do the setup so that when pnpm install is run on each respective branch volta ensures the right version is used. @NullVoxPopuli may be able to help with an example there.

Approach two: Figure out adding an "install and configure" step for each build and serve command.

With approach two there are also two directions to be taken

(1) make changes in the upstream tracerbench action that runs the benchmark. I have commit to that project and can land any required changes.

(2) use the actions ability to use an existing build. We run both the experiment and control builds ourselves managing the setup individually and supplying the output dist paths to the action.

runspired avatar Sep 16 '23 23:09 runspired

may be able to help with an example there.

I recommend using https://github.com/wyvox/action-setup-pnpm which supports volta config without using volta. The Volta action has been known to be buggy and cause flakiness in C.I.

This replaces:

  • setup-node
  • setup-pnpm

The logic for choosing which pnpm to use is a bit hairy, but correct, afaict

NullVoxPopuli avatar Sep 17 '23 00:09 NullVoxPopuli

@NullVoxPopuli it needs to be able to swap pnpm versions automatically on checkout

runspired avatar Sep 17 '23 03:09 runspired

Ye, that's taken care of., or do i misunderstand which parts of volta are needed?

NullVoxPopuli avatar Sep 17 '23 11:09 NullVoxPopuli

@NullVoxPopuli I think you misunderstand. The rough need is:

  • checkout branch 1 (has its own pnpm version): pnpm install && pnpm build
  • checkout branch 2 (also has its own pnpm version): pnpm install && pnpm build

Ideally we would not re-run something like actions/setup-pnpm in between. Just invoking pnpm would cause the correct pnpm to be utilized (e.g. what volta would normally handle here)

runspired avatar Sep 17 '23 21:09 runspired

checking out two branches in the same job? :upside_down_face: I guess I was confused, because that's not a workflow I'd expect ever 😅 i'd use two different jobs and then have a separate job handle the artifacts from both. No matter tho! But I think understand now.

NullVoxPopuli avatar Sep 17 '23 22:09 NullVoxPopuli

I guess I was confused, because that's not a workflow I'd expect eve

It's typical when you need commit over commit analysis. We can abandon the convenience and perf win of doing so though if its just not great, which is where the other approaches outlined above come in that are more inline with your two jobs approach.

runspired avatar Sep 18 '23 05:09 runspired