Skip to content

Fix builds for Ubuntu 22.04#1582

Merged
TheLastCicada merged 6 commits into
developfrom
v2-rc2
Apr 15, 2026
Merged

Fix builds for Ubuntu 22.04#1582
TheLastCicada merged 6 commits into
developfrom
v2-rc2

Conversation

@TheLastCicada

@TheLastCicada TheLastCicada commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes the release build pipeline to pin Linux runners and rebuild native sqlite3 from source, which directly affects produced artifacts. Also makes mirror-DB setup errors non-fatal, which could hide mirror connectivity issues while improving startup resilience.

Overview
Build workflow now pins Linux GitHub Actions runners to ubuntu-22.04/ubuntu-22.04-arm and upgrades to Node 24, with an added npm rebuild sqlite3 --build-from-source step to ensure the sqlite3 native addon is GLIBC-compatible with Ubuntu 22.04+.

Database initialization now wraps MySQL mirror DB creation/migrations in try/finally to always close the connection, and treats mirror setup failures as non-blocking (logging an error but continuing main DB startup).

Reviewed by Cursor Bugbot for commit 8ce837d. Bugbot is set up for automated code reviews on this repo. Configure here.

V1's prepareDb() crashed with ECONNREFUSED when the MySQL mirror sidecar
wasn't ready, causing the entire CADT process to exit. V2's prepareV2Db()
already handled this gracefully with a try-catch. This aligns V1 with
V2's behavior: log the error and continue with the main SQLite database.
The mirror will reconnect on the next sync cycle via safeMirrorDbHandler.

Also adds the missing connection.end() call in a finally block to
prevent connection leaks on any failure path.
…rash

fix: handle MySQL mirror connection failure gracefully in v1 prepareDb
Ubuntu 24.04 runners (GLIBC 2.39) produce sqlite3 native addons that
require GLIBC_2.38, which is unavailable on Ubuntu 22.04 deployment
targets (GLIBC 2.35). Pinning to 22.04 runners ensures the compiled
node_sqlite3.node is compatible with all non-EOL Ubuntu LTS releases.
npm install downloads prebuilt node_sqlite3.node binaries compiled
against GLIBC 2.38+. Force source compilation on Ubuntu runners so the
native addon links against the runner's GLIBC (2.35 on ubuntu-22.04).
Explain why Linux runners are pinned to ubuntu-22.04, why sqlite3 is
rebuilt from source, and when the runner version can be updated. Also
fix stale "Setup Node 20.x" step name.
fix(CI): use Ubuntu 22.04 runners for Linux builds
@TheLastCicada TheLastCicada merged commit c58fc4a into develop Apr 15, 2026
26 checks passed
@TheLastCicada TheLastCicada deleted the v2-rc2 branch April 15, 2026 17:29

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8ce837d. Configure here.

build-command: npm run create-linux-x64-dist
sqlite-path: ./node_modules/sqlite3/build/Release/
- runs-on: ubuntu-24.04-arm
- runs-on: ubuntu-22.04-arm

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ARM runner may not provide expected GLIBC version

Medium Severity

The ubuntu-22.04-arm GitHub Actions runner has a known, unresolved issue (actions/partner-runner-images#134) where it actually runs an Ubuntu 24.04 image with GLIBC 2.39 instead of the expected 22.04 image with GLIBC 2.35. If still present, the ARM build would still produce binaries incompatible with Ubuntu 22.04, defeating the purpose of this change. The x64 ubuntu-22.04 runner is unaffected. It's worth verifying the actual GLIBC version on the ARM runner (e.g., via ldd --version) before relying on this for compatibility.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8ce837d. Configure here.

@TheLastCicada TheLastCicada restored the v2-rc2 branch April 15, 2026 18:19
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