Skip to content

ci: Fix build of ubi8-based assembly - #776

Open
RomanNikitenko wants to merge 2 commits into
che-incubator:mainfrom
RomanNikitenko:fix-ubi8-build
Open

ci: Fix build of ubi8-based assembly#776
RomanNikitenko wants to merge 2 commits into
che-incubator:mainfrom
RomanNikitenko:fix-ubi8-build

Conversation

@RomanNikitenko

@RomanNikitenko RomanNikitenko commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

npm install fails during Docker build on linux-libc-ubi8.Dockerfile with:

/bin/sh: /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py: /usr/bin/python3.8: bad interpreter: No such file or directory
make: *** [Makefile:343: Makefile] Error 126

Root cause: Red Hat's ubi8/nodejs-24 (and nodejs-22) images ship node-gyp's gyp_main.py with shebang #!/usr/bin/python3.8 (baked in by brp-mangle-shebangs during RPM build), but the actual Python in the image is 3.12 at /usr/bin/python3.

Fix: Add sed to rewrite the shebang to #!/usr/bin/python3 alongside the existing chmod +x in linux-libc-ubi8.Dockerfile

What issues does this PR fix?

https://redhat.atlassian.net/browse/CRW-12125

How to test this PR?

ubi8-based assembly should be built without errors

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Summary by CodeRabbit

  • Chores
    • Updated Linux build environments to use the appropriate Python configuration.
    • Improved native module build compatibility across supported enterprise Linux versions.
    • Added essential archive, synchronization, and patching utilities to the Linux 9 build environment.

RomanNikitenko and others added 2 commits July 29, 2026 14:42
…nstall

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
Both base images already ship a compatible Python:
- ubi8/nodejs-22 has Python 3.12 (via Node.js RPM dependency)
- ubi9/nodejs-22 has Python 3.9 (RHEL 9 platform python)

node-gyp 11.5.0 supports both versions, so the explicit
python3.9 install is unnecessary.

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@github-actions

Copy link
Copy Markdown
Contributor

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

@RomanNikitenko
RomanNikitenko marked this pull request as ready for review July 30, 2026 10:53
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The UBI8 builder no longer installs python3.9; its node-gyp entrypoints are made executable and updated to invoke /usr/bin/python3. The UBI9 builder also removes python3.9 and adds bash, tar, gzip, rsync, and patch to its installed dependencies.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: azatsarynnyy, vitaliy-guliy, rgrunber

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Rebase Rules For Upstream Changes ✅ Passed Only build/dockerfiles were changed; no files under code/ were modified, so no .rebase rules or changelog entry were required.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, imperative, and accurately summarizes the main UBI8 build fix.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@RomanNikitenko RomanNikitenko changed the title Fix build of ubi8-based assembly ci: Fix build of ubi8-based assembly Jul 30, 2026
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