Skip to content

ci: fix cr-sqlite extension build by pinning Extensions Tests to ubuntu-22.04 - #2336

Closed
sivukhin wants to merge 1 commit into
mainfrom
ci/crr-extensions-pin-ubuntu-2204
Closed

sivukhin wants to merge 1 commit into
mainfrom
ci/crr-extensions-pin-ubuntu-2204

Conversation

@sivukhin

Copy link
Copy Markdown
Contributor

Problem

The Extensions Tests workflow jobs (CR SQLite C Tests, CR SQLite Rust Tests) are failing on main with ~140 Rust compile errors when building the cr-sqlite extension (cd ext/crr && make loadable / cargo test --features=loadable_extension):

error[E0432]: unresolved import `crate::bindings::sqlite3_index_info_sqlite3_index_constraint`
error[E0609]: no field `bind_blob` on type `sqlite3_api_routines`
              note: available fields are: `_address`

Root cause

libsql-sqlite3/ext/crr/rs/sqlite-rs-embedded/sqlite3_capi generates its Rust bindings from the SQLite C headers at build time with bindgen = "0.68.1". bindgen loads the runner's system libclang to parse the headers. On the current ubuntu-latest runner image, that libclang fails to parse the SQLite headers and bindgen falls back to emitting opaque placeholder structs — sqlite3_api_routines comes out with only an _address field and the nested sqlite3_index_info_sqlite3_index_constraint* types are missing entirely, which is exactly what the _address-only error notes show.

This is a runner-environment regression, not a code change: the crr sources are unchanged, and the bindings generate correctly on the previous image (verified locally — bindgen 0.68.1 produces the full sqlite3_api_routines and the correct nested-struct names, and the crate compiles clean).

Fix

Pin the three Extensions Tests jobs from ubuntu-latest to the known-good "ubuntu-22.04" image, so bindgen sees a compatible libclang and parses the SQLite headers correctly. This matches the native-build jobs already pinned to "ubuntu-22.04" in libsql-server-release.yml. The change is scoped strictly to the three runs-on: lines.

Files changed

  • .github/workflows/extensions-test.yml — c-tests, rs-tests, extensions-tests jobs pinned to ubuntu-22.04 (3 lines).

Verification

  • Reproduced the exact CI failure signature (140 errors, available fields are: _address) from the failing run logs and traced it to bindgen emitting opaque structs.
  • Confirmed locally that sqlite3_capi builds clean with bindgen = "0.68.1" and generates the correct bindings (sqlite3_api_routines with all fields, sqlite3_index_info_sqlite3_index_constraint present).
  • The runner-specific libclang failure only reproduces on the affected CI image, so CI on this PR is the gate that confirms ubuntu-22.04 restores a green build.

🤖 Generated with Claude Code

The cr-sqlite extension jobs (CR SQLite C Tests, CR SQLite Rust Tests,
Extensions Tests) build Rust bindings from the SQLite C headers with
bindgen (bindgen = "0.68.1" in sqlite-rs-embedded/sqlite3_capi), which
loads the runner's system libclang at build time to parse the headers.

On the current `ubuntu-latest` runner image, that libclang fails to
parse the SQLite headers and bindgen emits opaque placeholder structs
instead of the real definitions. The generated `sqlite3_api_routines`
ends up with a single `_address` field and the nested
`sqlite3_index_info_sqlite3_index_constraint` types are missing, so the
crr build fails with ~140 errors:

    error[E0432]: unresolved import `crate::bindings::sqlite3_index_info_sqlite3_index_constraint`
    error[E0609]: no field `bind_blob` on type `sqlite3_api_routines`
                  note: available fields are: `_address`

This is a runner-environment regression, not a code change: the crr
sources are unchanged and the bindings generate correctly on the
previous image. Pin these jobs to the known-good `ubuntu-22.04` image,
matching the native-build jobs in libsql-server-release.yml, so bindgen
sees a compatible libclang and parses the headers correctly again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sivukhin

Copy link
Copy Markdown
Contributor Author

Superseded by #2337, which fixes the same cr-sqlite bindgen failure durably: instead of pinning to the soon-to-be-retired ubuntu-22.04 image, #2337 installs libclang-dev on ubuntu-latest so bindgen can parse the SQLite headers (matching rust.yml / nemesis.yml). Closing this stopgap in favor of #2337.

@sivukhin sivukhin closed this Nov 20, 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