Skip to content

[CDX-610] fix react-compat ci failing - #57

Merged
niizom merged 1 commit into
mainfrom
cdx-610-components-ui-investigate-and-fix-react-compat-ci-failing-on
Aug 27, 2026
Merged

[CDX-610] fix react-compat ci failing#57
niizom merged 1 commit into
mainfrom
cdx-610-components-ui-investigate-and-fix-react-compat-ci-failing-on

Conversation

@niizom

@niizom niizom commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Before you submit a pull request, please make sure you have to following:

  • I have added or updated TypeScript types for my changes, ensuring they are compatible with the existing codebase.
  • I have added JSDoc comments to my TypeScript definitions for improved documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added any necessary documentation (if appropriate).
  • I have made sure my PR is up-to-date with the main branch.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no API changes)
  • Documentation content changes
  • TypeScript type definitions update
  • Other. Added a fix for failing react-compat test

@niizom
niizom requested a review from a team as a code owner August 27, 2026 17:08
Copilot AI lite review requested due to automatic review settings August 27, 2026 17:08

@constructor-claude-bedrock constructor-claude-bedrock 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.

Code Review

This PR fixes the react-compat CI workflow by switching from npm ci to npm install --package-lock=false, correctly addressing the root cause: npm ci fails when the local tarball dependency is regenerated on each CI run and no longer matches the committed lock file hash.

Inline comments: 1 discussion added

Overall Assessment: ⚠️ Needs Work

- name: Install fixture deps
working-directory: test/react-compat/${{ matrix.react-major }}
run: npm ci --no-audit --no-fund
run: npm install --no-audit --no-fund --package-lock=false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important Issue: Switching to npm install --package-lock=false resolves the immediate npm ci failure, but it fully bypasses lock-file pinning for all transitive dependencies (not just the local tarball). This means every CI run resolves the latest versions of all deps from the registry, which can introduce silent breakages from transitive dependency upgrades.

A more precise fix would be to use npm install --no-audit --no-fund (without --package-lock=false) and ensure the fixture package-lock.json files do not commit a resolved entry for the local tarball path. Alternatively, you can keep --package-lock=false but add a --prefer-offline flag and a caching step so at least the registry packages are stable between runs.

If the intent is specifically to avoid npm ci failing due to the regenerated tarball hash, consider using npm ci --ignore-scripts combined with a separate npm install <local-tarball> step, or patching the lock file before running npm ci (e.g., npm install --package-lock-only to regenerate the lock file before npm ci).

The current change is pragmatic and unblocks CI, but the lack of lock-file enforcement for transitive deps reduces reproducibility for a test matrix that exists specifically to catch subtle compatibility issues.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. But this is not an issue here cause we are using exact versions of a libraries so everything will be fine

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the React compatibility GitHub Actions matrix workflow to avoid fixture dependency installation failures when testing against a locally packed @constructor-io/constructorio-ui-components tarball.

Changes:

  • Switches fixture dependency installation from npm ci to npm install in the react-compat workflow.
  • Adds a flag to disable lockfile usage during fixture installs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- name: Install fixture deps
working-directory: test/react-compat/${{ matrix.react-major }}
run: npm ci --no-audit --no-fund
run: npm install --no-audit --no-fund --package-lock=false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

npm install still reads the lock file and enforces its integrity hashes. So it fails with the same EINTEGRITY error as npm ci when the tarball hash doesn't match.

@Mudaafi Mudaafi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good find!

@niizom
niizom merged commit afe6815 into main Aug 27, 2026
14 checks passed
@niizom
niizom deleted the cdx-610-components-ui-investigate-and-fix-react-compat-ci-failing-on branch August 27, 2026 17:28
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.

3 participants