Skip to content

Conversation

@rodrigok
Copy link
Member

@rodrigok rodrigok commented Dec 16, 2025

Closes #37705

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Optimized Docker image build by removing additional platform-specific binaries from production images.
    • Enhanced build caching mechanism with updated versioning and architecture configuration support.
    • Simplified Alpine Docker build process for more efficient deployment workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 16, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

⚠️ No Changeset found

Latest commit: 76f1db9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Walkthrough

The PR removes problematic sharp dependency re-installation from the Alpine Dockerfile and extends platform-specific binary cleanup during Docker builds. Additionally, yarn configuration is updated with a new cache key version and architecture-aware settings to improve multi-platform dependency resolution.

Changes

Cohort / File(s) Summary
CI Setup & Build Actions
.github/actions/setup-node/action.yml, .github/actions/build-docker/action.yml
Updated node setup cache key (v3→v5, added .yarnrc.yml hash); added yarn config step for multi-platform architecture support. Extended Docker build cleanup to remove arch-specific binaries for sharp (@img), pinyin (@napi-rs), and esbuild packages.
Alpine Dockerfile
apps/meteor/.docker/Dockerfile.alpine
Removed sharp dependency re-installation and @img folder relocation steps from builder stage; retained single npm install --omit=dev.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Attention areas:
    • Verify platform-specific binary cleanup patterns correctly match intended architecture filters for sharp, pinyin, and esbuild
    • Confirm removal of sharp re-installation steps resolves the reported sharp module loading error without introducing regressions
    • Review yarn config payload structure and multi-platform architecture specifications for correctness

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 A sharp fix from the binary heap,
Platform-specific cleanups we reap,
Yarn now knows which arch to embrace,
No more failed starts in Docker's space!

Pre-merge checks and finishing touches

✅ 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 'fix: no amd64 binaries on manual installation' directly describes the main objective of the PR, which addresses the missing amd64 binaries causing sharp module errors during manual installation.
Linked Issues check ✅ Passed The PR changes (updating build Docker cleanup commands, modifying yarn config for architecture support, and removing duplicate sharp reinstallation) directly address issue #37705 by ensuring proper handling of platform-specific binaries during manual installation.
Out of Scope Changes check ✅ Passed All changes in the PR are focused on fixing the sharp module amd64 binary issue: Docker cleanup optimization, yarn architecture configuration, and Dockerfile simplification are all in scope for resolving the manual installation problem.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/src-install-amd64

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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 and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -499B
queue-worker-service 132MiB 132MiB -387B
ddp-streamer-service 126MiB 126MiB -1.6KiB
account-service 113MiB 113MiB -243B
authorization-service 111MiB 111MiB -214B
stream-hub-service 110MiB 110MiB +717B
presence-service 110MiB 110MiB -1.2KiB

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 17:41", "12/18 18:26 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 24 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37841
  • Baseline: develop
  • Timestamp: 2025-12-18 18:26:44 UTC
  • Historical data points: 24

Updated: Thu, 18 Dec 2025 18:26:44 GMT

@rodrigok rodrigok force-pushed the fix/src-install-amd64 branch 3 times, most recently from 853c422 to 375479b Compare December 17, 2025 00:36
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.72%. Comparing base (3e42805) to head (76f1db9).
⚠️ Report is 36 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37841      +/-   ##
===========================================
+ Coverage    67.62%   67.72%   +0.10%     
===========================================
  Files         3463     3463              
  Lines       113694   113712      +18     
  Branches     20902    20910       +8     
===========================================
+ Hits         76881    77012     +131     
+ Misses       34681    34530     -151     
- Partials      2132     2170      +38     
Flag Coverage Δ
e2e 57.14% <ø> (-0.06%) ⬇️
e2e-api 44.01% <ø> (+1.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rodrigok rodrigok force-pushed the fix/src-install-amd64 branch 4 times, most recently from 447550d to 279a7a4 Compare December 17, 2025 13:43
@rodrigok rodrigok force-pushed the fix/src-install-amd64 branch 6 times, most recently from 63bec15 to 42b3412 Compare December 18, 2025 17:29
@rodrigok rodrigok force-pushed the fix/src-install-amd64 branch from 42b3412 to 76f1db9 Compare December 18, 2025 17:31
@rodrigok rodrigok marked this pull request as ready for review December 19, 2025 17:56
@rodrigok rodrigok requested a review from a team as a code owner December 19, 2025 17:56
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/actions/setup-node/action.yml (1)

54-55: Cache key update looks appropriate.

Adding .yarnrc.yml hash and bumping the version suffix to v5 ensures the cache is invalidated when yarn configuration changes, which aligns with the new supportedArchitectures config being added.

The version jump from v3 to v5 is notable—please verify this doesn't conflict with any in-flight branches that might be using v4. If coordinating cache invalidation across multiple branches, consider documenting the version progression.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 65214b6 and 76f1db9.

📒 Files selected for processing (3)
  • .github/actions/build-docker/action.yml (1 hunks)
  • .github/actions/setup-node/action.yml (2 hunks)
  • apps/meteor/.docker/Dockerfile.alpine (1 hunks)
🔇 Additional comments (5)
.github/actions/build-docker/action.yml (3)

78-78: LGTM on comment update.

The updated comment accurately reflects the expanded cleanup operations.


89-93: [Rewritten review comment]
[Exactly ONE classification tag]


87-87: I was unable to complete verification of this review comment due to inability to access the repository. While I confirmed through external sources that linuxmusl-x64 binaries cannot be used on the linux-x64 platform, I could not:

  1. Examine the actual file and surrounding context to verify the claims about line 87
  2. Locate issue #37705 to confirm the reported problem
  3. Determine the intended output of this build action (Docker image, distribution tarball, etc.)

The critical distinction needed: since this file is named build-docker/action.yml, it likely creates Docker images. Alpine Linux requires rebuilding sharp with --libc=musl, which would make keeping only musl binaries correct for Alpine-based Docker images. However, if this action also produces artifacts for manual installation on glibc systems, that would be a different concern.

Without access to the repository context and issue #37705, I cannot definitively determine whether this is a critical issue or appropriate for the action's intended purpose.

.github/actions/setup-node/action.yml (1)

78-82: The yarn config command does not fetch multi-platform binaries.

The supportedArchitectures setting only controls which packages are acceptable for the current platform, not cross-platform fetching. Yarn still installs binaries only for the current platform during yarn install. This means lines 78-82 don't actually fetch both glibc and musl binaries as stated in the original comment.

The issue with missing glibc binaries for manual installation is not a consequence of fetching and deleting them—those binaries were never fetched in the first place. The build-docker action (line 87) removes non-musl binaries only if they were somehow included in the distribution tarball.

To address the glibc binary issue: either ensure glibc binaries are built and included in the distribution tarball, or document that manual installations require Alpine Linux compatibility.

apps/meteor/.docker/Dockerfile.alpine (1)

11-12: The Alpine Dockerfile is a runtime environment, not the source of distribution tarballs—this concern is incorrect.

The Dockerfile.alpine downloads and extends a pre-built tarball rather than creating one. The sharp incompatibility issue specific to Alpine is that when meteor build pre-compiles sharp, it is not compatible with Alpine's libc libraries, which is why the reinstall approach was originally needed. Removing the unnecessary reinstall step is appropriate for Alpine's runtime environment.

This change does not affect the distribution tarballs available for manual Linux installations, so it does not address or interfere with the glibc binary issue described in #37705. The tarball source would need to be verified in the release/CI process, not in the Alpine Dockerfile.

Likely an incorrect or invalid review comment.

@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Dec 19, 2025
@sampaiodiego sampaiodiego added this to the 7.14.0 milestone Dec 19, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 19, 2025
@ggazzo ggazzo merged commit cc3a99f into develop Dec 19, 2025
53 checks passed
@ggazzo ggazzo deleted the fix/src-install-amd64 branch December 19, 2025 19:03
@scuciatto
Copy link
Member

/patch

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

    Sorry, I couldn't do that backport because of conflicts. Could you please solve them?
    
    you can do so by running the following commands:
git fetch
git checkout backport-7.13.2-37841
git cherry-pick cc3a99fa3449dd215f41d363c338618c5977c5b2
// solve the conflict
git push

after that just run /patch again

@rodrigok
Copy link
Member Author

/patch

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Pull request #37900 added to Project: "Patch 7.13.2"

gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to start Rocket.Chat 7.13.0 due to sharp module error

6 participants