Skip to content

fix: ensure node-gyp gyp entrypoints are executable in UBI builds - #760

Merged
RomanNikitenko merged 1 commit into
che-incubator:mainfrom
RomanNikitenko:fix-node-gyp-problem
Jul 20, 2026
Merged

RomanNikitenko merged 1 commit into
che-incubator:mainfrom
RomanNikitenko:fix-node-gyp-problem

Conversation

@RomanNikitenko

@RomanNikitenko RomanNikitenko commented Jul 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Problem
On UBI nodejs images, npm’s bundled node-gyp ships gyp/gyp_main.py and gyp/gyp without the execute bit. When make regenerates the Makefile during a native addon build (e.g. @vscode/deviceid), it runs those files via shebang and fails with Permission denied (exit 126). This only shows up when regeneration is triggered (timestamp race), so the failure looks intermittent.

Solution
Before npm install, set +x on those gyp entrypoints in the UBI8 and UBI9 Dockerfiles so make can exec them reliably whenever Makefile regeneration runs.

What issues does this PR fix?

It fixes error like:

#12 24.16 npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
#12 24.16 npm error /bin/sh: /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py: Permission denied
#12 24.16 npm error make: *** [Makefile:343: Makefile] Error 126

How to test this PR?

Jobs should pass successfully

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

Assisted-by: Cursor AI

Summary by CodeRabbit

  • Bug Fixes
    • Improved builds on UBI 8 and UBI 9 environments by ensuring required native build scripts have the correct executable permissions.

@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

UBI npm ships gyp_main.py without +x, so make fails with Permission
denied when regenerating Makefiles during native addon builds.

Signed-off-by: Roman Nikitenko <[email protected]>
Assisted-by: Cursor AI
@tolusha

tolusha commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm che-ai-assistant — I help with your pull requests.

Available commands:

  • /che-ai-assistant generate-che-doc — Generate a documentation PR based on this PR's changes
  • /che-ai-assistant ok-pr-review — Run a comprehensive PR review (summary, code review, deep review, impact analysis)
  • /che-ai-assistant check-pr-test-failures — Analyze failing CI checks, identify root causes, and suggest fixes
  • /che-ai-assistant update-che-e2e-tests — Update Eclipse Che e2e tests
  • /che-ai-assistant help — Show this help message

@github-actions

Copy link
Copy Markdown
Contributor

@RomanNikitenko
RomanNikitenko marked this pull request as ready for review July 17, 2026 14:46
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 981aff9b-dc17-45b8-ae8f-198dcfeafbd7

📥 Commits

Reviewing files that changed from the base of the PR and between 505423c and 585621d.

📒 Files selected for processing (2)
  • build/dockerfiles/linux-libc-ubi8.Dockerfile
  • build/dockerfiles/linux-libc-ubi9.Dockerfile

📝 Walkthrough

Walkthrough

The UBI8 and UBI9 Docker build stages now explicitly mark gyp_main.py and gyp from node-gyp as executable before dependency installation and build commands.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: azatsarynnyy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, imperative, and accurately describes the UBI Dockerfile executable-bit fix.
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 changed; no files under code/ were modified, so no .rebase rules or changelog entry were required.
✨ Finishing Touches
🧪 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.

@rgrunber rgrunber left a comment

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.

Seems reasonable. These don't make their way into the main image so it's just for the sake of the build.

@RomanNikitenko
RomanNikitenko merged commit 4eadc7e into che-incubator:main Jul 20, 2026
14 of 23 checks passed
@RomanNikitenko
RomanNikitenko deleted the fix-node-gyp-problem branch July 20, 2026 14:26
@coderabbitai coderabbitai Bot mentioned this pull request Jul 30, 2026
3 tasks
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