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

replace @changesets/cli with primer-changesets-cli #3352

Merged
merged 8 commits into from
Jun 28, 2023
Merged

replace @changesets/cli with primer-changesets-cli #3352

merged 8 commits into from
Jun 28, 2023

Conversation

gr2m
Copy link
Contributor

@gr2m gr2m commented May 31, 2023

This is part of an effort to provide a notification system to users of Primer releases.

To test the new changeset CLI

  • Checkout this pull request
  • npm install
  • npx changeset

Before this will work, we will need to update https://github.com/primer/.github/blob/main/.github/workflows/release.yml. Turns out the changesets/action requires @changesets/cli to be installed ... so we will need to install it explicitly like it's done in https://github.com/primer/view_components/pull/2038/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34

Screenshots

primer-changeset-cli.mov

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@gr2m gr2m requested review from a team and langermank May 31, 2023 21:01
@changeset-bot
Copy link

changeset-bot bot commented May 31, 2023

⚠️ No Changeset found

Latest commit: 045bc44

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gr2m gr2m temporarily deployed to github-pages May 31, 2023 21:07 — with GitHub Actions Inactive
@gr2m gr2m temporarily deployed to github-pages May 31, 2023 22:04 — with GitHub Actions Inactive
@gr2m gr2m temporarily deployed to github-pages May 31, 2023 22:26 — with GitHub Actions Inactive
@joshblack
Copy link
Member

One quick question, how will this impact the generated changelogs that show up under the tags for releases? For example: https://github.com/primer/react/releases/tag/v35.25.1

Will each change end up including the "Changed components" section that is being added to the changeset?

@gr2m
Copy link
Contributor Author

gr2m commented Jun 1, 2023

Will each change end up including the "Changed components" section that is being added to the changeset?

Yes, that's the idea. Then consumers can use https://github.com/gr2m/primer-release-filter-action to filter out the changelogs to only the parts they are interested in.

@joshblack
Copy link
Member

@gr2m would it be possible for the components changed to be metadata that is hidden from things like the release changelog? This would be so that it could still be present and used in tooling but wouldn't impact the existing format that the changesets action generates. Just wanted to ask and see how do-able that seemed to you 👀

@gr2m
Copy link
Contributor Author

gr2m commented Jun 5, 2023

@gr2m would it be possible for the components changed to be metadata that is hidden from things like the release changelog? This would be so that it could still be present and used in tooling but wouldn't impact the existing format that the changesets action generates. Just wanted to ask and see how do-able that seemed to you 👀

I don't know how. Do you think the changelogs might become to noisy?

Maybe there could be a way to add hidden information to release notes using HTML comments, similar like what is commonly done with issue bodies and comments. But that would require even more changes to the existing flow.

I would suggest we go with the changes as they are and iterate if necessary? Worst case we can roll back the changes and try again.

Probably the proper way to solve this would be to have separate releases for each component, either with a monorepo setup or with separate repositories (like we do in @octokit), but that would be a bigger undergoing and has its own trade offs.

@joshblack
Copy link
Member

I don't know how. Do you think the changelogs might become to noisy?

@gr2m that was my first thought with the update. I'm not sure how folk would ready it but let me bring this up to the other maintainers to get their take on it! It'd be great if we could make these changes hidden/transparent while we're trying things out in order to avoid changes to existing processes.

@gr2m
Copy link
Contributor Author

gr2m commented Jun 6, 2023

It'd be great if we could make these changes hidden/transparent while we're trying things out in order to avoid changes to existing processes.

We cannot hide it, it's either we go ahead with it or we don't at this point.

@gr2m
Copy link
Contributor Author

gr2m commented Jun 8, 2023

I have green light for primer/view_components#2038. Can you let me know what you need to make the decision? Or if someone else needs to approve it?

@lesliecdubs
Copy link
Member

@gr2m I'd like to check in with the PRC maintainers one more time on this. We'll aim to get back to you by Monday at the latest.

@gr2m
Copy link
Contributor Author

gr2m commented Jun 9, 2023

I'm happy to join that discussion and answer all questions that might be left @lesliecdubs

@lesliecdubs
Copy link
Member

@gr2m thanks for joining the PRC maintainers sync on Monday to discuss! Following that and a subsequent discussion I had with @joshblack, we are good to continue forward 👍🏻

As discussed live, expectations for next steps would be:

  • Let's "trial" the release notification setup with one team (e.g. Memex) to start to get feedback on usefulness. If there is desire to expand further, let's discuss before encouraging broader subscription.
  • Let's treat this trial as an experiment by documenting the hypothesis (potentially pulled from the pitch), defining success, gathering feedback from the subscribing team, and setting a deadline to determine experiment outcome. This will help us ensure the trade-offs for maintainers serve a real user need and are worth investing in long-term.

Let me know if you have any questions or thoughts on any of the above!


@primer/react-reviewers could someone in the reviewers group please give this PR a review, with the understanding that we'll treat this as an experiment as described above?

@colebemis
Copy link
Contributor

Have we tried adding the metadata as a comment in the changesets markdown file as a way to hide it from the rendered release notes?

<!-- ... -->

@gr2m
Copy link
Contributor Author

gr2m commented Jun 21, 2023

Have we tried adding the metadata as a comment in the changesets markdown file as a way to hide it from the rendered release notes?

<!-- ... -->

No but I can try that out

@gr2m gr2m added the skip changeset This change does not need a changelog label Jun 22, 2023
@gr2m
Copy link
Contributor Author

gr2m commented Jun 22, 2023

@gr2m

This comment was marked as outdated.

@gr2m gr2m temporarily deployed to github-pages June 22, 2023 02:50 — with GitHub Actions Inactive
@lesliecdubs lesliecdubs requested review from joshblack and removed request for langermank June 22, 2023 22:44
@gr2m
Copy link
Contributor Author

gr2m commented Jun 23, 2023

I resolved the remaining failing test. Btw Node 17 is no longer maintained since June 1st. You might want to test in 19 and 20 instead: https://nodejs.dev/en/about/releases/

@gr2m
Copy link
Contributor Author

gr2m commented Jun 23, 2023

Hmm I'm getting all kind of errors now that are unrelated to this pull request, I'll see if I can get around it, but you should do a manual pull request and re-create the lock file, I think you'll have to update snapshots

@gr2m gr2m temporarily deployed to github-pages June 23, 2023 00:49 — with GitHub Actions Inactive
@gr2m
Copy link
Contributor Author

gr2m commented Jun 23, 2023

This should be ready to be merged, for real this time 🙏🏼

@gr2m gr2m mentioned this pull request Jun 23, 2023
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

🥳

@gr2m gr2m added this pull request to the merge queue Jun 28, 2023
Merged via the queue into primer:main with commit baf2f14 Jun 28, 2023
26 of 27 checks passed
@gr2m gr2m deleted the primer-changesets-cli branch June 28, 2023 16:41
gr2m added a commit that referenced this pull request Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants