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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix npm release #737

Closed
wants to merge 5 commits into from
Closed

Fix npm release #737

wants to merge 5 commits into from

Conversation

rezrah
Copy link
Contributor

@rezrah rezrah commented Sep 22, 2023

Summary

馃毀 WIP

Fixing the library release to npm by using our Primer org workflow instead of a custom, local one.

What approach did you choose and why?

  • Last two releases have failed
  • I suspect they failed because the custom access token doesn't have the correct permission scopes for this repo, as described here.
  • Using the proposed token should work because it works for other Primer libraries

What should reviewers focus on?

  • We'll need to test in prod after merging by manually triggering the release. Added a command to do this via GitHub UI.

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change
  • Verify the design tokens changed in this PR are expected using the diffing results in this PR

@rezrah rezrah requested a review from a team as a code owner September 22, 2023 16:38
@rezrah rezrah requested review from a team, jonrohan and broccolinisoup September 22, 2023 16:38
@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2023

鈿狅笍 No Changeset found

Latest commit: 35bf695

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2023

Variables changed
No variables changed

Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Thank you 馃檶

@rezrah rezrah temporarily deployed to github-pages September 22, 2023 16:41 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview September 22, 2023 16:42 Inactive
@rezrah rezrah added the skip changeset Apply to PRs that should not result in a version bump. label Sep 22, 2023
@rezrah rezrah temporarily deployed to github-pages September 22, 2023 16:44 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview September 22, 2023 16:45 Inactive
@rezrah rezrah temporarily deployed to github-pages September 22, 2023 16:48 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview September 22, 2023 16:49 Inactive
@rezrah rezrah temporarily deployed to github-pages September 22, 2023 16:57 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview September 22, 2023 16:58 Inactive
Copy link
Contributor

@camertron camertron 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 looking into this @rezrah, but I'm hesitant to merge these changes. I just finished a bunch of work to move away from GPR_AUTH_TOKEN_SHARED in favor of a GitHub App. The trouble with GPR_AUTH_TOKEN_SHARED is that it will expire over time, whereas the tokens issued by an App are sort-lived and issued on an as-needed basis. I believe the problem @langermank ran into yesterday is due to data missing from a GitHub API response, not an issue with the access token or the permissions attached to it. I'm currently looking into a fix.

@rezrah
Copy link
Contributor Author

rezrah commented Sep 22, 2023

Thanks for looking into this @rezrah, but I'm hesitant to merge these changes. I just finished a bunch of work to move away from GPR_AUTH_TOKEN_SHARED in favor of a GitHub App. The trouble with GPR_AUTH_TOKEN_SHARED is that it will expire over time, whereas the tokens issued by an App are sort-lived and issued on an as-needed basis. I believe the problem @langermank ran into yesterday is due to data missing from a GitHub API response, not an issue with the access token or the permissions attached to it. I'm currently looking into a fix.

Absolutely fine 馃憤. Will close this and allow you to investigate, as i'll be unable to look into it further until Monday now.

ran into yesterday is due to data missing from a GitHub API response

Inclined to agree with this, as it could be related to the commit history thing raised in the changeset support issue. Have you tried backing out this commit and seeing if that fixes anything?

@rezrah rezrah closed this Sep 22, 2023
@camertron
Copy link
Contributor

@rezrah I see the same failure for both our release.yml and release_canary.yml workflows. The canary one doesn't even get an auth token 馃 I haven't tried backing out the commit, but that's a good idea. Thanks!

@camertron
Copy link
Contributor

Turns out this was caused by a git hash collision. I was able to fix things in the short term by reverting the offending commit, then reverting the revert. I've also submitted a PR to the changesets project to get this fixed long-term.

@lukasoppermann lukasoppermann deleted the rezrah/fix-lib-release-workflow branch April 18, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset Apply to PRs that should not result in a version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants