Skip to content

👷 [RUM-15055] fix release/publish pipeline issues from v0.1.0#77

Merged
bcaudan merged 7 commits into
mainfrom
bcaudan/fix-npm-publish-3
Apr 1, 2026
Merged

👷 [RUM-15055] fix release/publish pipeline issues from v0.1.0#77
bcaudan merged 7 commits into
mainfrom
bcaudan/fix-npm-publish-3

Conversation

@bcaudan

@bcaudan bcaudan commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Several bugs were discovered during and after the v0.1.0 release:

  1. prepare-release inserted the new changelog section at the wrong position and used the changelog as the PR body
  2. tag-release.yml ran as github-actions[bot], which lacks maintain permission to push tags
  3. GitLab notify-release-ready job crashed due to unescaped backticks causing bash command substitution
  4. publish.yml validation compared commit messages against vX.Y.Z exactly, but GitHub squash-merge appends the PR number (v0.1.0 (#63))

Changes

  • Fixed changelog section insertion order and cleared the PR body in prepare-release
  • Tags are now created and pushed by yarn release (maintainer's machine) — removes the broken bot-driven auto-tagging
  • Fixed GitLab Slack notification crash (bash backtick escaping)
  • Publish validation uses the tag name (github.ref_name) instead of the commit message — robust against squash merges and fixup commits
  • Added dry_run mode to publish.yml to validate the full pipeline without publishing
  • Updated releasing docs to reflect the new flow

Test instructions

Trigger publish.yml with dry_run=true from a release tag — validated against a v0.0.0 test tag from this branch (build passed, publish/release steps skipped as expected).

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated related documentation.

@bcaudan bcaudan requested a review from a team as a code owner March 30, 2026 15:34
@bcaudan bcaudan marked this pull request as draft March 30, 2026 15:35
@bcaudan bcaudan changed the title 👷 fix release/publish pipeline issues from v0.1.0 👷 [RUM-15055] fix release/publish pipeline issues from v0.1.0 Mar 30, 2026
@bcaudan bcaudan marked this pull request as ready for review March 30, 2026 16:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c009b9270

ℹ️ 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".

Comment thread .github/workflows/publish.yml

printLog('Creating GitHub PR...');
return command`gh pr create --title v${newVersion} --body ${editedSection} --base main`.run().trim();
return command`gh pr create --title v${newVersion} --body ${''} --base main`.run().trim();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This seems a bit strange: ${''} probably harmless, but should be simply ''

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But then again, why are we putting it to an empty string now ? This will create an empty PR, is that intended now ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

${''} is needed here — the command helper doesn't do shell parsing, so '' in the template string would be passed as a literal two-character argument. ${''} is how you inject an empty string.

Empty body is intentional — the changelog content would be duplicated and a pain to keep in sync with CHANGELOG.md.

Comment thread docs/DEVELOPMENT.md Outdated
Comment on lines +210 to +216
#### 3. Trigger the publish workflow
If you push fixup commits, move the tag to the latest commit:

After the PR is merged:
```sh
git tag -a -f vX.Y.Z -m "vX.Y.Z"
git push -f origin vX.Y.Z
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This seems like a very important step that is easily missed with the current wording. This in my opinion should be a warning highlighting that the release tag is created before the PR is merged, and that it's mandatory that the tag is moved to the latest commit before merging to prevent changes from being missed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added a blockquote warning in the docs and a ⚠️ WARNING block in the script's terminal output right after the PR is created.

Comment thread docs/DEVELOPMENT.md Outdated
Comment on lines +220 to +222
#### 3. Trigger the publish workflow

A Slack message in `#rum-electron-sdk-ops` will include a link to the GitHub Actions publish workflow (sent when the tag is pushed in step 1).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can be problematic no ? The current message states:

    - 'MESSAGE=":rocket: electron-sdk ${CI_COMMIT_TAG} is ready to publish. Run the <${WORKFLOW_URL}|publish workflow> from \`${CI_COMMIT_TAG}\`"'

Ideally this should be sent when the PR is reviewed and merged, not when the tag is created, given that it's now created before anything else. If not possible at least we should change the wording to minimize the mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated the message wording to better reflect the flow — the tag is pushed before the PR is merged. We could revisit the workflow trigger later if needed.

- make tag-before-merge warning prominent in script output and docs
- reword Slack notification to reflect PR-review-first flow
- update docs Slack message description to match new wording
@bcaudan bcaudan merged commit b5f9c86 into main Apr 1, 2026
14 checks passed
@bcaudan bcaudan deleted the bcaudan/fix-npm-publish-3 branch April 1, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants