-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[code-infra] Run react-17
and react-next
workflows on the next branch
#42690
[code-infra] Run react-17
and react-next
workflows on the next branch
#42690
Conversation
Netlify deploy previewhttps://deploy-preview-42690--material-ui.netlify.app/ Bundle size report |
01f61a2
to
fd8994c
Compare
.circleci/config.yml
Outdated
pnpm install | ||
else | ||
echo "pnpm install --no-frozen-lockfile" | ||
pnpm install --no-frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useReactVersion
script modifies resolutions
in package.json
, and it can't install dependencies without this flag.
If there were no changes done to package.json (git --no-pager diff HEAD) == ""
), the flag is not being passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense for the useReactVersion
script to run pnpm install
after it sets the resolutions? That would make the lockfile consistent with what's installed and this branching becomes unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, running useReactVersion
without installing the dependencies does not make much sense anyway 👍🏻
react-17: | ||
when: | ||
equal: [react-17, << pipeline.parameters.workflow >>] | ||
jobs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to duplicate the jobs here, I couldn't find a way to reuse them in CircleCI (the experience of configuring Circle CI is not great TBH 😅).
The whole point is that:
react-17
workflow can be triggered manually on any branch (e.g. in a PR) on demand through Circle CI.
react-17-cron
workflow is triggered by a cron job (same as before this PR).
Same for react-next
workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's not great. Perhaps an orb could fix duplication here, but I don't really mind it so much.
@@ -937,6 +988,7 @@ workflows: | |||
branches: | |||
only: | |||
- master | |||
- next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added next
branch here for the typescript-next
workflow as well.
- test_unit: | ||
<<: *default-context | ||
react-version: next | ||
name: test_unit-react@next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it got in a bad state after renaming those jobs? Maybe try opening a different PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried in #42991 and the result is the same...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe circleci reuses some existing state when opening a PR for the same commit. At least I think I've observed that before. Trying out that hypothesis in mui/mui-x#13942
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that seems to work!
I'll trigger the react-next
workflow to make sure everything works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good now!
Any objections to merging current PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, go for it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, I'd consider running pnpm install
inside the script to keep the lockfile consistent, and to avoid leaking the change into other parts of the CI. But I'm not quite sure if that will have any undesirable side-effects or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving though as my comment is non-blocking. Feel free to look into it as part of this PR, or later, or not at all 🙂 .
Currently, the
react-17
andreact-next
workflows are scheduled to run every day on themaster
branch.Since
next
is now an active development branch, they should also be run on thenext
branch.The
react-next
workflow on themaster
branch fails: https://app.circleci.com/pipelines/github/mui/material-ui/131952It cannot install dependencies, so I added the
--frozen-lockfile
flag to thepnpm install
command.Finally, both
react-17
andreact-next
workflows can be run on demand using the CircleCI "Trigger pipeline".