👷 Add help message when publish fail - #4690
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efb83a65e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| command`yarn workspaces foreach --verbose --all --topological --no-private npm publish --tolerate-republish --access public ${dryRun ? ['--dry-run'] : []}` | ||
| .withEnvironment({ | ||
| YARN_NPM_AUTH_TOKEN: dryRun ? '' : getNpmToken(), |
There was a problem hiding this comment.
Avoid masking token lookup failures as publish failures
When the AWS SSM lookup in getNpmToken() fails before yarn ... npm publish is even started (for example missing AWS credentials or an SSM outage), this try block now rethrows it as "NPM publish failed" and tells operators to renew the npm token. That is misleading for failures that happen while fetching the token rather than during npm publish; keep the token lookup outside this publish-failure wrapper or only wrap the command execution so the new help message is limited to actual publish failures.
Useful? React with 👍 / 👎.
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 6455064 | Docs | Datadog PR Page | Give us feedback! |
Motivation
When scripts/deploy/publish-npm.ts fails during npm publish, print an actionable message so CI operators know what to check next, while preserving the original command diagnostics.
Changes
Test instructions
You can run the following command, make sure to not be logged on aws.
Checklist