Skip to content

test: add Hoglake deployment E2E and rollout tooling (#1202) #3333

test: add Hoglake deployment E2E and rollout tooling (#1202)

test: add Hoglake deployment E2E and rollout tooling (#1202) #3333

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v2.11.4
controlplane-no-libduckdb:
name: Verify cmd/duckgres-controlplane does not link libduckdb
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Build cmd/duckgres-controlplane (default tags)
run: go build ./cmd/duckgres-controlplane/...
- name: Build cmd/duckgres-controlplane (-tags kubernetes)
run: go build -tags kubernetes ./cmd/duckgres-controlplane/...
# Lock in the binary-split goal: cmd/duckgres-controlplane must remain
# free of github.com/duckdb/duckdb-go in its transitive import graph,
# both with and without the kubernetes build tag. If this guard breaks,
# someone added an import that pulls libduckdb into the CP build —
# likely via a server/* leaf that grew a duckdb-go dependency. Find
# the offending package with `go list -deps -json ./cmd/duckgres-controlplane`
# and route around it (subpackage extraction, registration hook, or
# interface boundary) rather than relaxing this check.
- name: go list -deps controlplane is duckdb-free (default tags)
run: |
set -euo pipefail
if go list -deps ./cmd/duckgres-controlplane | grep -F "github.com/duckdb/duckdb-go"; then
echo "::error::cmd/duckgres-controlplane transitively imports duckdb-go (default tags)" >&2
exit 1
fi
if go list -deps ./controlplane | grep -F "github.com/duckdb/duckdb-go"; then
echo "::error::controlplane package transitively imports duckdb-go (default tags)" >&2
exit 1
fi
- name: go list -deps controlplane is duckdb-free (-tags kubernetes)
run: |
set -euo pipefail
if go list -tags kubernetes -deps ./cmd/duckgres-controlplane | grep -F "github.com/duckdb/duckdb-go"; then
echo "::error::cmd/duckgres-controlplane transitively imports duckdb-go (-tags kubernetes)" >&2
exit 1
fi
if go list -tags kubernetes -deps ./controlplane | grep -F "github.com/duckdb/duckdb-go"; then
echo "::error::controlplane package transitively imports duckdb-go (-tags kubernetes)" >&2
exit 1
fi
unit-tests:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Run unit tests
run: just test-unit
cache-proxy-tests:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Run cache-proxy tests
run: just test-cache-proxy
ui-tests:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "20"
cache: npm
cache-dependency-path: controlplane/admin/ui/package-lock.json
- name: Run admin UI typecheck + unit tests
run: just ui-test
integration-tests:
needs: unit-tests
runs-on: ubuntu-24.04-arm
services:
# PostgreSQL for comparison tests
postgres:
image: public.ecr.aws/docker/library/postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
ports:
- 127.0.0.1:35432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# DuckLake metadata store
ducklake-metadata:
image: public.ecr.aws/docker/library/postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
env:
POSTGRES_USER: ducklake
POSTGRES_PASSWORD: ducklake
POSTGRES_DB: ducklake
ports:
- 127.0.0.1:35433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Build
run: go build -o duckgres .
- name: Start PGSTY Silo
run: |
docker compose -f tests/integration/docker-compose.yml up -d --wait minio
- name: Create Silo bucket
run: |
docker compose -f tests/integration/docker-compose.yml run --rm --no-deps minio-init
- name: Verify Silo storage and credential revocation
run: just test-silo
- name: Run integration tests
run: just test-integration
controlplane-tests:
needs: unit-tests
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Run control plane tests
run: just test-controlplane
configstore-integration-tests:
needs: unit-tests
runs-on: ubuntu-24.04-arm
services:
postgres:
image: public.ecr.aws/docker/library/postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
ports:
- 127.0.0.1:35432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Run config store integration tests
run: just test-configstore-integration
controlplane-k8s-tests:
needs: unit-tests
runs-on: ubuntu-24.04-arm
services:
postgres:
image: public.ecr.aws/docker/library/postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
ports:
- 127.0.0.1:35432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up just
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: go.mod
- name: Run Kubernetes-tagged control plane package tests
run: just test-controlplane-k8s