Skip to content

fix(ci): use npm lockfile for stable promotions - #695

Merged
dlabaj merged 1 commit into
mainfrom
fix/promote-npm-lockfile
Oct 16, 2026
Merged

dlabaj merged 1 commit into
mainfrom
fix/promote-npm-lockfile

Conversation

@dlabaj

@dlabaj dlabaj commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Why

The v6.7.0 promotion (run 38829219841, job 116743818614) failed while generating the dynamic-module map, with TypeScript parser errors in @types/node/ffi.d.ts. Publishing was skipped.

Promotion currently installs with Yarn despite only package-lock.json being committed, and configures Node after the build. This produces a different dependency layout from the working npm-based build.

Changes

  • Configure Node 20 and the npm registry before installing/building, matching the existing release workflows.
  • Use npm ci and npm run build so promotion honors the committed dependency lockfile.
  • Add workflow_dispatch with an existing stable v6 tag, validating and checking out refs/tags/ explicitly. This lets us publish v6.7.0 without moving or recreating its existing tag.
  • Keep stable publication on the latest dist-tag with public access.

Validation

  • Clean npm ci succeeded (browser binary downloads skipped locally).
  • Full build passed with Node 22.23.2 and Node 20.20.2; both generated all 60 dynamic-module mappings.
  • Jest: 16 suites, 78 tests, and 21 snapshots passed.
  • YAML structure, install/build ordering, bash syntax, and seven valid/invalid tag cases passed.
  • A temporary copy versioned to 6.7.0 passed npm publish --dry-run --tag=latest --access=public (304 files).
  • No dependency manifests or lockfiles changed, and nothing has been published.

Publish 6.7.0 after merge

Run:

gh workflow run promote.yml --repo patternfly/react-data-view --ref main -f tag=v6.7.0

This executes the corrected workflow from main against the unchanged v6.7.0 source tag. Re-running the original failed run would reuse its old workflow/commit.

@dlabaj

dlabaj commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Additional root-cause confirmation: reproduced the exact failure from f208917 in a separate temporary checkout with Yarn 1.22.22.

  • Root scripts/parse-dynamic-modules.mjs resolves TypeScript 4.9.5.
  • packages/module resolves its own TypeScript 5.9.3.
  • Yarn resolved @types/node 26.6.5.
  • npm run build exits 1 with the identical first error: @types/node/ffi.d.ts(94,21): TS1139: Type parameter declaration expected, followed by the same dynamic-module parser failure.

With npm ci against the committed lockfile, both callers resolve TypeScript 5.9.3 and the full build passes under Node 20.20.2. This confirms a dependency-layout/compiler mismatch, not a source-component failure or an npm authentication failure in the original job.

@patternfly-build

patternfly-build commented Oct 16, 2026 •

Copy link
Copy Markdown

@dlabaj dlabaj left a comment

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.

Approving and merging. The fact it worked before was because someone checked in yarn.lock file. This repo doesn't use yarn and should use the package.lock file and npm ci instead.

@dlabaj
dlabaj merged commit 9cbf515 into main Oct 16, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.7.0-prerelease.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants