Skip to content

build(Felt): migrate tasks and prereleases to Nx - #12687

Draft
gabipodolnikova wants to merge 2 commits into
patternfly:felt-v1from
gabipodolnikova:FELT-144-nx-release-spike
Draft

gabipodolnikova wants to merge 2 commits into
patternfly:felt-v1from
gabipodolnikova:FELT-144-nx-release-spike

Conversation

@gabipodolnikova

@gabipodolnikova gabipodolnikova commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What: Migrates Felt React task execution and the prerelease CI workflow from Lerna to Nx for FELT-144.

Draft: commit-type policy is still being aligned with the Core migration. The settings below describe the current implementation, not a final team agreement.

Implementation

  • Pin Nx and @nx/js to 24.0.0 and replace root Lerna task commands with Nx.
  • Configure independent releases for the ten public Felt packages. Native Nx change/dependent discovery is followed by explicit native prerelease bumps, preserving each selected package’s existing counter (for example, .3 → .4).
  • Preserve Lerna’s package-specific {projectName}@{version} Git tags and release commit subject, chore(release): releasing packages [ci skip].
  • Use Nx to stage version changes, generate changelogs, create the combined release commit and per-package tags, and push before publication. Yarn then packs the selected packages with resolved workspace references.
  • Upload the complete .release/ bundle, including hidden files, before publishing through Nx using the existing npm trusted-publishing/OIDC setup. A missing expected artifact fails the upload step.
  • Post PR release comments as a separate notification step. Notification failures emit warnings without marking successful publication as failed.

Behavior changes and discussion points

  • Commit types: fix and feat use the native Nx defaults. This branch also explicitly enables chore, docs, refactor, perf, test, style, build, and ci to trigger release discovery and appear in changelogs. Should React adopt the Core policy for chores and other maintenance types? These overrides remain unchanged pending agreement. Once selected, packages receive a prerelease counter increment rather than a stable patch/minor release.
  • Non-conventional messages: ordinary unrecognized/non-conventional commits currently do not trigger a release or appear in changelogs. Discuss whether __INVALID__ should appear under “Uncategorized changes” without triggering a bump. Valid but unconfigured types such as misc: are separate from __INVALID__.
  • Selection differs from Lerna: Nx uses its affected graph and conventional commits. Root build/configuration changes can select all ten packages, including the first cutover release. The historical Styles case matched the seven public packages selected by Lerna, but this does not establish universal selection parity.
  • Independent versions: each package keeps its own counter; different package counters are normal. Private demo-app-ts is intentionally excluded from release version bumps.
  • Changelogs: retain Nx’s default headings/icons and dependency-update entries. Actions uses the canonical origin; local fork rehearsals can pass --git-remote=upstream.
  • Concurrency: normal and recovery releases share one felt-v1 concurrency group. New merges no longer automatically cancel an active publication. GitHub may replace pending runs; this does not promise a separate release for every merge. Manual cancellation during publishing can still leave a partial release.

Publishing-only recovery

A manual run of the same release.yml workflow on felt-v1 takes the failed workflow run ID, downloads its nx-release-packages artifact, and checks out the recorded release commit. It installs dependencies without rebuilding packages, then publishes the prepared versions.

  • Recovery requires the complete original bundle and a matching checkout. It never recalculates versions, regenerates changelogs, or repacks/rebuilds packages.
  • It fetches current release history and accepts only the latest recorded release commit on felt-v1. Older releases are rejected before publication to prevent moving the npm prerelease tag backward.
  • Nx handles already-published versions; failed or missing publish results fail the job.
  • Artifacts are retained for 30 days. Missing, expired, or incomplete bundles fail clearly rather than being silently regenerated.
  • Dispatch must target felt-v1, for example: gh workflow run release.yml --repo patternfly/patternfly-react --ref felt-v1 -f publish-only-run-id=RUN_ID. The Actions UI dispatch button depends on the default-branch workflow definition; GitHub-hosted invocation still needs verification.

Testing

  • Immutable install and full package/UMD builds passed in an isolated worktree.
  • All 24 release tests passed, covering orchestration, counter-only increments, stale/incomplete bundles, missing metadata, and partial-publication failures.
  • Prettier, ESLint, Actionlint, shell syntax, and diff checks passed.
  • Historical Styles PR rehearsal selected the same seven public packages as the recorded Lerna release and advanced their versions from .2 to .3.
  • Native Nx publish dry run passed for those seven prepared packages. Checksums confirmed the archives, package manifests, and changelogs remained byte-identical during the recovery rehearsal.
  • Stale rejection was exercised against fetched release history. Successful recovery used an injected latest-release identity, with the native publisher forced to dry-run. No real release commits, tags, pushes, or npm publications were performed during the rehearsal.

Before merging / follow-up:

  • Agree on commit types and changelog visibility with the Core migration.
  • Complete review of the CI cutover and recovery policy.
  • Verify actual Nx OIDC publication, release commit/tag/push behavior, artifact upload/download, and manual recovery in GitHub Actions.
  • Define the prerelease → stable promotion lifecycle, migrate Promote (which still uses Lerna), then remove the remaining Lerna dependency/configuration. Stable promotion is not implemented by this PR.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gabipodolnikova gabipodolnikova changed the title build(Felt): migrate task execution to Nx build(Felt): migrate tasks and prereleases to Nx Oct 26, 2026

This branch has not been deployed

No deployments
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.

1 participant