Skip to content

feat(multi-version): foundation for DuckDB v1.4.4 LTS + v1.5.x support (selector script + Makefile target + doc)#166

Open
estebanzimanyi wants to merge 2 commits into
MobilityDB:fix/bump-meos-pinfrom
estebanzimanyi:feat/multi-duckdb-version-foundation
Open

feat(multi-version): foundation for DuckDB v1.4.4 LTS + v1.5.x support (selector script + Makefile target + doc)#166
estebanzimanyi wants to merge 2 commits into
MobilityDB:fix/bump-meos-pinfrom
estebanzimanyi:feat/multi-duckdb-version-foundation

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Summary

Step 1 of the multi-DuckDB-version effort — same pattern as MobilityDB-on-Postgres compiling against PG 13-18 from one source tree, applied to DuckDB extension ABIs.

DuckDB extension ABI is version-specific: a binary built against v1.4.4 cannot load into v1.5.2 and vice versa. MobilityDuck therefore needs to produce a separate binary per (duckdb_version, platform). Selection is driven by the SHAs that the three submodules — duckdb, duckdb-spatial, extension-ci-tools — point at when the build runs.

This PR adds the foundation that the rest of the multi-version story builds on. No behaviour change: existing builds work identically; the v1.5.x track is one make set-duckdb-version DUCKDB_VERSION=v1.5.2 away from being buildable; the CI matrix PR (step 2) turns it on across the build matrix in one place.

Files

File Role
scripts/select-duckdb-version.sh Per-version manifest mapping a DuckDB version to matching duckdb-spatial and extension-ci-tools refs. Switches the three submodules in lockstep when invoked.
Makefile New variable DUCKDB_VERSION (default v1.4.4, the ecosystem alignment target) and a make set-duckdb-version target that delegates to the script.
doc/multi-duckdb-version.md Full design: per-version manifest, build-flow diagram, how to add a new supported version, relationship to the (future) CI matrix, adopter install path.
README.md Single-sentence pointer telling adopters which versions are supported and where the multi-version doc lives.

Supported versions (manifest)

DuckDB Track duckdb-spatial branch extension-ci-tools branch
v1.4.4 LTS (default) v1.4-andium v1.4.4
v1.5.2 Latest 1.5.x (opt-in) v1.5-variegata v1.5-variegata

Usage

# Switch the working tree to v1.5.2 (downloads + checks out the matching submodule SHAs)
make set-duckdb-version DUCKDB_VERSION=v1.5.2

# Then the normal build flow targets that version
make release

# Return to the committed default (v1.4.4)
git submodule update --recursive

What this PR explicitly does NOT change

  • The committed submodule SHAs (still v1.4.4 — the default build is identical).
  • MainDistributionPipeline.yml (CI still builds for one version; the matrix expansion is the next PR, stacked on this one).
  • Any C++ source (preprocessor conditionals for API divergences land alongside the CI matrix once a second version's build surfaces them).

Next steps (separate PRs, stacked on this one)

Step Scope
2 CI matrix expansion: MainDistributionPipeline.yml duckdb_version: [v1.4.4, v1.5.2] matrix dimension; each row calls make set-duckdb-version before make release.
3 Source preprocessor conditionals for any DuckDB API divergence the matrix surfaces (ExtensionUtilExtensionLoader, the bundled spatial-extension surface, etc.).
4 Per-version expected-output variants in test/sql/*.test for any case where DuckDB's own behaviour changed between versions.
5 README + community-extension config: enumerate the supported versions and the install path per version.
6 MVB benchmark cross-version reporting.

Adds the SIZEOF_LONG_LONG emission to the rendered pg_config.h so the
DuckDB-Wasm (wasm32-emscripten / ILP32) build of MEOS no longer fails the
pg_bitutils integer-width check.
…get + doc)

Step 1 of N — same pattern as MobilityDB-on-Postgres compiling against
PG 13-18 from one source tree, applied to DuckDB extension ABIs.

DuckDB extension ABI is version-specific: a binary built against v1.4.4
cannot load into v1.5.2 and vice versa.  MobilityDuck therefore needs
to produce a separate binary per (duckdb_version, platform).  The
selection is driven by the SHAs that the three submodules — duckdb,
duckdb-spatial, extension-ci-tools — point at when the build runs.

This PR adds the *foundation* that the rest of the multi-version story
builds on:

- scripts/select-duckdb-version.sh
    Per-version manifest mapping a DuckDB version to matching
    duckdb-spatial and extension-ci-tools refs.  Switches the three
    submodules in lockstep when invoked.

- Makefile
    New variable DUCKDB_VERSION (default v1.4.4, the ecosystem
    alignment target) and a 'make set-duckdb-version' target that
    delegates to the script.

- doc/multi-duckdb-version.md
    Full design: per-version manifest, build-flow diagram, how to add
    a new supported version, relationship to the (future) CI matrix,
    adopter install path.

- README.md
    Single-sentence pointer telling adopters which versions are
    supported and where the multi-version doc lives.

What this PR does NOT change:

- the committed submodule SHAs (still v1.4.4 — the default build is
  identical to before)
- MainDistributionPipeline.yml (CI still builds for one version; the
  matrix expansion is the next PR, stacked on this one)
- any C++ source (preprocessor conditionals for API divergences land
  alongside the CI matrix once a second version's build surfaces them)

The result is a no-behaviour-change foundation: existing builds work
identically; the v1.5.x track is one 'make set-duckdb-version' away
from being buildable; the CI matrix PR turns it on in one place.
@estebanzimanyi estebanzimanyi changed the base branch from main to fix/bump-meos-pin May 30, 2026 08:00
@estebanzimanyi estebanzimanyi force-pushed the feat/multi-duckdb-version-foundation branch from c9a4824 to 5c47f6f Compare May 30, 2026 08:00
estebanzimanyi added a commit to estebanzimanyi/MobilityDuck that referenced this pull request May 30, 2026
Step 2 of N, stacks on the foundation in MobilityDB#166.

Adds duckdb-build-v1-5 alongside duckdb-build-v1-4 (renamed from
duckdb-latest-build, postfixed -v1-4 to disambiguate artefacts).
Each row calls a different extension-ci-tools workflow tag because
`uses:` in GitHub Actions cannot be a matrix expression.

The v1.5.2 job is expected red until step 3 lands:
- The reusable workflow's `make set_duckdb_version` handles the
  `duckdb/` submodule on its own, but `duckdb-spatial` and
  `extension-ci-tools` stay at the parent's committed SHAs (v1.4
  line on `main`).  No hook inside the reusable workflow lets us
  interleave the foundation script's swap between checkout and
  build.
- Source-side, any DuckDB v1.5 ABI divergences (ExtensionUtil ->
  ExtensionLoader rename, bundled-spatial-extension surface
  reshuffle, etc.) will surface as compile errors during this job.
  Those are the signals step 3 (preprocessor conditionals) is
  authored against.

Adding the matrix row now is the explicit visibility step: the
divergences become observable in CI rather than discovered later.
The deploy step for v1.5 is held until duckdb-build-v1-5 is
reliably green — pushing broken binaries to the community-extension
repository would be worse than no v1.5 binary.

Also widens the PR-trigger branch globs to include `ci/**`,
`cleanup/**`, `chore/**` (alongside the existing `feat/**` and
`fix/**`) so this PR and similar follow-ups trigger CI without
manual workflow_dispatch.
@estebanzimanyi estebanzimanyi force-pushed the fix/bump-meos-pin branch 4 times, most recently from fa2de57 to 17588c0 Compare June 2, 2026 09:47
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