Skip to content

Conversation

@tangowithfoxtrot
Copy link
Contributor

@tangowithfoxtrot tangowithfoxtrot commented Nov 15, 2024

Tracking

https://bitwarden.atlassian.net/browse/SM-1561

📔 Objective

Fix #872. Also statically link libc so that we don't have to copy dynamic dependencies anymore.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@tangowithfoxtrot tangowithfoxtrot changed the title fix: cross-compiled bin not working without emulation on host; static… fix: cross-compiled bin not working without emulation on host Nov 15, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2024

Logo
Checkmarx One – Scan Summary & Details1f1922ac-8be8-4e59-8749-e230ec453717

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 7.32%. Comparing base (feb19d9) to head (ac649b1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1176   +/-   ##
=====================================
  Coverage   7.32%   7.32%           
=====================================
  Files         20      20           
  Lines       1378    1378           
=====================================
  Hits         101     101           
  Misses      1277    1277           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@tangowithfoxtrot tangowithfoxtrot marked this pull request as ready for review April 25, 2025 15:42
@trmartin4
Copy link
Member

@tangowithfoxtrot looking to clean up old PRs for Platform. Do you think that this should be reassigned to SM for review, since it's the sdk-sm repo?

@trmartin4 trmartin4 changed the title fix: cross-compiled bin not working without emulation on host [SM-1561] fix: cross-compiled bin not working without emulation on host Aug 27, 2025
WORKDIR /source/crates/bws
RUN <<EOF
# Building for $TARGETPLATFORM
# Add Rust toolchains based on $TARGETPLATFORM
Copy link
Contributor Author

@tangowithfoxtrot tangowithfoxtrot Sep 9, 2025

Choose a reason for hiding this comment

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

Building based on $TARGETPLATFORM means we will be using emulation via the container runtime, which significantly increases build times for the image; the last build took a little over an hour :/

However, I haven't had success cross-compiling in such a way that it doesn't result in the errors described in #872.

Copy link
Contributor Author

@tangowithfoxtrot tangowithfoxtrot Sep 9, 2025

Choose a reason for hiding this comment

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

I limited the linux/arm builds to only merges to main in this commit: 6084731.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, since QA will need the linux/arm64 artifacts produced by this change in order to test it, I reverted this change in 7d5f38e.

@tangowithfoxtrot tangowithfoxtrot requested a review from a team as a code owner September 9, 2025 20:29
@tangowithfoxtrot tangowithfoxtrot force-pushed the fix-cross-compiled-bws-in-docker branch from 952f335 to 6084731 Compare September 9, 2025 20:43
@tangowithfoxtrot tangowithfoxtrot marked this pull request as draft September 10, 2025 11:48
@tangowithfoxtrot tangowithfoxtrot force-pushed the fix-cross-compiled-bws-in-docker branch from 7bdb46a to 02de00e Compare September 10, 2025 13:18
@tangowithfoxtrot tangowithfoxtrot marked this pull request as ready for review September 10, 2025 13:27
…d times on PRs"

This reverts commit 6084731.
QA will need linux/arm64 artifacts to test this
change. We can consider skipping ARM builds in a
follow-up to this if the build times are a problem
justindbaur
justindbaur previously approved these changes Sep 10, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@tangowithfoxtrot tangowithfoxtrot merged commit 6fc4c25 into main Sep 11, 2025
88 of 91 checks passed
@tangowithfoxtrot tangowithfoxtrot deleted the fix-cross-compiled-bws-in-docker branch September 11, 2025 21:48
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.

BWS Docker image for ARM contains x86 binary/libs and doesn't run on ARM natively

4 participants