Contributing to Igloo
Thanks for helping. This page covers how to build and test Igloo, how the repository is laid out, the conventions we follow, and what a pull request needs before it can be merged.
For anything larger than a small fix, open an issue first so we can agree on the approach before you write the code. Igloo is designed by the product principles; say which ones a larger change serves and which it costs. Report security problems privately as described in SECURITY.md, not in an issue.
Building and testing
Section titled “Building and testing”Only Docker is required (with Compose v2.20 or later). Every make target runs
its tools in containers.
| Command | What it does |
|---|---|
make test |
Run the Go tests in a golang container, with a throwaway PostgreSQL for the user-store tests |
make lint |
Check gofmt and run go vet |
make migrate-test |
Run the migration report’s unit tests in a Python container |
make bench-test |
Run the benchmark’s unit tests in a Python container |
make build |
Build the igloo:dev image |
make up |
Start the single-machine stack on the released image this checkout is at: Igloo, the Lakekeeper catalog, PostgreSQL and local object storage. It does not run your changes |
make dev |
Build Igloo from this checkout and start the stack on it. make psql and the other commands then use that build, until the next make up |
make psql |
Open a SQL shell on the running stack |
make helm-e2e |
Install the Helm chart on a throwaway kind cluster and test it end to end |
make e2e |
Start an isolated copy of the stack and run scripts/ against it, including the JDBC, psycopg, PyIceberg, notebook (SQLAlchemy, pandas, polars) and dbt checks in scripts/ |
make bi-e2e |
Run scripts/: Metabase, Apache Superset and Npgsql (Power BI) against an isolated stack. Pulls about 3 GB of images |
make engines-e2e |
Run Spark and Trino against an isolated copy of the stack’s Iceberg REST catalog (scripts/; pulls about 3 GB, not part of CI) |
make sharing-e2e |
Test Delta Sharing with the official Python client and the reference sharing server (scripts/); slower, and not part of CI |
make down, make reset |
Stop the stack; reset also deletes its data |
make site |
Build the website and documentation into site/ and check its links (details) |
make site-dev |
Serve the website at http://, updating as you edit the docs |
make help lists every target.
With a local Go toolchain
Section titled “With a local Go toolchain”For faster iteration, install Go 1.27 and a C compiler (gcc or clang). Igloo
embeds DuckDB through cgo, so CGO_ENABLED must be 1 (the default when a C
compiler is installed). The duckdb_arrow build tag builds DuckDB’s Arrow
results, which the Arrow Flight SQL endpoint streams; every build needs it
(set GOFLAGS=-tags=duckdb_arrow for your editor).
Igloo also links XGBoost’s library, which IGLOO.ML.XGBOOST trains with.
Build it once, with CMake, Ninja, git and a C++ compiler (about a minute
on 18 cores), and point pkg-config at it: cgo finds it there for every
build, go vet included. On macOS it is built with OpenMP when Homebrew’s
libomp is installed, and otherwise without, training on one thread. Go’s
build cache does not notice the library’s link flags changing: after
building it with other ones, run go clean -cache.
third_party/xgboost/build.sh ~/.cache/igloo/xgboost-libexport PKG_CONFIG_PATH=~/.cache/igloo/xgboost-lib/lib/pkgconfiggo test -tags duckdb_arrow ./...go vet -tags duckdb_arrow ./...gofmt -l cmd internal # must print nothingThe first build links DuckDB and is slow; later builds are cached.
Tests that load Igloo’s own DuckDB extensions, rb, iceberg and postgres, or
the extensions Igloo installs from DuckDB, skip without them, and CI runs
them all. The three build on Linux and macOS. Build them and install
DuckDB’s extensions once, then point the tests at them. Set TZ=UTC, as CI’s
runners have it: a few tests expect it.
dir=~/.cache/igloo/testextensions/rb/build.sh $dir/rb # secondsextensions/iceberg/build.sh $dir/iceberg # 6 to 15 minutes the first time, by coresextensions/postgres/build.sh $dir/postgres # a few minutes the first timego run -tags duckdb_arrow ./cmd/igloo install-extensions $dir/duckdb-extensionsexport IGLOO_TEST_RB_EXTENSION=$dir/rb/rb.duckdb_extensionexport IGLOO_TEST_ICEBERG_EXTENSION=$dir/iceberg/iceberg.duckdb_extensionexport IGLOO_TEST_POSTGRES_EXTENSION=$dir/postgres/postgres_scanner.duckdb_extensionexport IGLOO_TEST_EXTENSION_DIR=$dir/duckdb-extensionsTZ=UTC go test -tags duckdb_arrow ./internal/pgwire/The iceberg and postgres builds also need CMake, Ninja and pkg-config (on
macOS, brew install cmake ninja pkg-config), and the postgres build the
autotools, which build libpq (brew install autoconf automake libtool autoconf-archive). The iceberg build keeps its sources, libraries and
compiler cache, about 4 GB, in ~/.cache/igloo/iceberg, the postgres build
about 1.5 GB in ~/.cache/igloo/postgres, and XGBoost’s about 100 MB in
~/.cache/igloo/xgboost.
What CI checks
Section titled “What CI checks”.github/workflows/ci.yml runs on every pull
request, before every release, which publishes nothing unless it passes, and
by hand on any branch (Actions, CI, Run workflow; or gh workflow run ci.yml --ref BRANCH). It does not run on pushes to main: run the checks your
change touches locally (above, and make e2e for what crosses the stack).
It checks:
- gofmt,
go vetandgo test make migrate-testandmake bench-test- the container image, built natively for linux/amd64 and linux/arm64
make e2ehelm lintandhelm templatefordeploy/helm/iglootofu fmt,tofu validateandtofu testfordeploy/aws,deploy/gcpanddeploy/azure- ShellCheck on shell scripts and actionlint on the workflows
make site: the website builds and has no broken links
.github/workflows/bi-tools.yml runs
make bi-e2e weekly and on demand.
The Helm and OpenTofu versions CI uses are set at the top of ci.yml; use the
same ones to check chart or module changes locally.
Repository layout
Section titled “Repository layout”cmd/igloo/ server entry point and subcommandsinternal/ server packages: configuration, DuckDB engine, Postgres wire protocolextensions/rb/ Igloo's DuckDB extension (C++): exact distinct counts in roaring bitmapsextensions/iceberg/ DuckDB's Iceberg extension, built from source with Igloo's patchesextensions/postgres/ DuckDB's postgres extension, built from source with Igloo's patchesthird_party/ patched or vendored dependencies (duckdb-go, iceberg-go, psql-wire, CRoaring), and XGBoost's builddeploy/single-vm/ Docker Compose stack for one machinedeploy/helm/igloo/ Helm chartdeploy/aws, gcp, azure/ OpenTofu modules for each clouddocs/ user documentation; configuration.md is the settings referencescripts/ helper scripts, including the end-to-end testbench/ the price-performance benchmark (Python)migrate/ the migration report, python -m migrate (Python)site/ the website: landing page, and the docs built from the markdown above.github/ CI and release workflows, issue and pull request templatesWebsite
Section titled “Website”site/ is the website: a landing page and the documentation, built with
Astro and Starlight
into a static site in site/dist. The documentation pages are the
repository’s markdown, so there is nothing to keep in sync by hand: edit
docs/sql.md and the site’s SQL page changes with it.
make site builds it in a pinned Node container and fails on a broken link;
make site-dev serves it at http://localhost:4321 and reloads as you edit
the docs. With Node 22.12 or later installed, npm ci and then
npm run build or npm run dev in site/ do the same without Docker
(npm ci again when switching between the two, since node_modules holds
platform-specific binaries).
Which files are pages. site/src/docs-manifest.mjs lists them, with
their URL and sidebar group: the README (as the overview), docs/*.md,
docs/design/, the Helm chart’s and cloud modules’ READMEs, the benchmark,
and SECURITY.md, CONTRIBUTING.md and CHANGELOG.md. A new document
needs an entry there to appear on the site. docs/upstream/ (drafts of issues
for upstream projects) is left out.
How the sync works. site/scripts/sync-docs.mjs runs before every build.
It copies each page into site/src/content/docs/, taking the page title from
the first # Heading, and rewrites links: a link to another page
(flight-sql.md, ../docs/sso.md#tokens) becomes the page’s URL on the site
with its anchor, an image is copied into the site (as WebP), and a link to
any other file or directory (Go code, scripts, compose files) goes to the
file on GitHub at main. GitHub’s <picture> with a dark-mode <source>
becomes two images that follow the site’s theme switch. A relative link to a
file that does not exist fails the sync. Write links as you would for GitHub;
they work in both places. The landing page (site/src/pages/index.astro and
site/src/components/landing/) quotes the README; its quick start and “How
it works” text are taken from the README at build time, the rest is written
out, so update it when the README’s features or benchmark summary change.
Link check. After the build, site/scripts/check-links.mjs checks every
link, image and #anchor in site/dist, and that links to this repository
on GitHub name files that exist. External links are not fetched.
Not indexed until launch. By default every page carries
<meta name="robots" content="noindex, nofollow">, robots.txt disallows
everything, and site/dist/_headers makes Cloudflare send
X-Robots-Tag: noindex, nofollow. Build with make site SITE_PUBLIC=1 to
drop all three when the site goes public; add
SITE_URL=https://<domain> for canonical URLs and a sitemap.
Deploying. The site is static. It is deployed as a Cloudflare Worker
that serves site/dist (what Cloudflare Pages became), configured in
site/wrangler.jsonc, to the workers.dev address of the Cloudflare account
wrangler is signed in to:
make sitecd site && npx wrangler@4.147.0 deploymake site replaces site/node_modules with Linux builds, so run
npx wrangler through npx as above rather than from site/node_modules.
Conventions
Section titled “Conventions”- Formatting. Code is formatted with gofmt and
go vet -tags duckdb_arrow ./...is clean. - Comments explain why. Say what constraint, trade-off or past bug the code is shaped by, not what the next line does. Exported identifiers get doc comments.
- Errors carry context. Wrap with
fmt.Errorf("load TLS certificate: %w", err). An error a user will see should tell them what to change. - Tests use real Postgres clients. Test protocol and SQL behavior by starting
the server in-process and connecting with pgx,
under both the simple and the extended query protocol, as
internal/pgwire/server_test.godoes. Real clients catch protocol details that hand-built messages miss. - Tests need no cloud account. Unit tests run offline from cloud services
and need no credentials. Behavior that needs the catalog and object storage
belongs in
scripts/e2e.sh. - Configuration is environment variables. A new setting is an
IGLOO_*variable with a safe default, documented in docs/configuration.md. - Dependencies stay permissively licensed. New dependencies must use a license compatible with Apache 2.0 (for example Apache 2.0, MIT, BSD or the PostgreSQL License). Say in the pull request why the dependency is worth it.
Commits and pull requests
Section titled “Commits and pull requests”- Keep each pull request to one logical change, and keep refactoring separate from behavior changes.
- Write commit messages as a short imperative summary line (“Reject COPY to locations outside the allowlist”), a blank line, then why the change is needed.
- Add a line to CHANGELOG.md under Unreleased for anything users will notice.
- CI must pass, and a maintainer reviews every pull request before it merges.
- A change to erasure, or to what it relies on (the catalog, files, history, caches, sharing), keeps what erasure guarantees: one that can let a request report itself completed while the person’s data is still readable or recoverable within that guarantee does not merge.
Releasing
Section titled “Releasing”For maintainers:
- In
CHANGELOG.md, move the Unreleased entries under a new heading## [X.Y.Z] - YYYY-MM-DDand merge that change. - Tag the merge commit and push the tag:
git tag -a vX.Y.Z -m vX.Y.Z && git push origin vX.Y.Z. .github/workflows/release.ymlruns CI, then publishesghcr.io/akkio-inc/igloo:X.Y.Z(andX.Yandlatestfor stable releases) for linux/amd64 and linux/arm64, signs it, pushes the Helm chart tooci://ghcr.io/akkio-inc/charts/igloo, and creates a GitHub Release whose notes are that version’s changelog section.
A tag with a suffix, such as v1.2.0-rc.1, is a prerelease: it gets only the
1.2.0-rc.1 image tag.