Mando CI/CD
GitLab CI/CD pipeline and deployment configuration for the Mando workspace.
This pipeline is hand-rolled, unlike the Python repos
mando’s jobs are written out in its own
.gitlab-ci.yml. The Python-side BESS repos (bess-optimization, forecast, algo services) instead consume the shared component library bess-os-ci-components and keep ~40-line pipelines.
Pipeline Stages
graph LR SEC["Security<br/>(Snyk)"] --> CONT["Pipeline<br/>Container"] CONT --> SETUP["Setup"] SETUP --> BUILD["Build &<br/>Test"] BUILD --> PUB["Publish"] PUB --> REL["Release"] REL --> PAGES["Pages"]
- Security — Snyk vulnerability scanning
- Pipeline Container — Build Docker base/build images
- Setup — Environment preparation
- Build & Test — Compilation and test suite
- Publish — Artifact/package publication
- Release — Release tagging
- Pages — Documentation deployment
Branch Strategy
| Branch Pattern | Target | ECR |
|---|---|---|
feature/*, bugfix/*, rc/*, poc/*, develop | Dev | Dev ECR |
release/* | Production | Prod ECR |
poc/*added 2026-08-05A one-line addition to
.branch_rules:devsopoc/e2e-testsgets the full dev pipeline (including the new E2E job below). A throwawayfeature/e2e-testsmirror branch created before this existed was deleted — and deleting a branch mid-pipeline kills its not-yet-started jobs atgit fetch(missing ref). See mando-e2e-ci-green-2026-08-05.
E2E Data Suite Linux Dev (added 2026-08-05)
First green run: pipeline
2735150017, 72sDownloads the released mando-cli binary cross-project via
CI_JOB_TOKEN+ job-token allowlist, brings uppostgres:17+wiremock/wiremock:3xasservices:(shared netns → WireMock onlocalhost:8081), startsmando_bessas a background host process from the build artifact, runs refinery migrations on boot, thenmando e2e run --external-stack. Junit uploaded (currently one case for the wholetest_set_1). Full record incl. the required boot env set: mando-e2e-ci-green-2026-08-05.
Container Images
Production Image (Dockerfile)
FROM debian:13.1-slim
# Installs: ca-certificates, libc6, libssl3
# Copies: certs, assets, libduckdb.so, pre-built target/release/mando_bess
EXPOSE 8080
CMD ["mando_bess"]Updated 2026-07-10
samba-libs/libsmbclient removed from the runtime image by the remotefs-smb to smb migration (pure-Rust
smbcrate). The build images still install them (harmless leftover). Toolchain is now 1.89.0 viarust-toolchain.tomleven though the build image base tag remainsrust:1.88.0-bookworm.
Build Image (container.linux.Dockerfile)
Base: rust:1.88.0-bookworm (toolchain 1.89.0 installed via rust-toolchain.toml)
Tools installed:
- Docker, jq, AWS CLI
- CMake, Go
- Poetry, pipx
- pkg-config, samba dev libs
- Maturin 1.9.2
Windows Variants
container.win.base.Dockerfile— Windows base imagecontainer.win.chef.build.Dockerfile— Chef-based dependency caching
Chef dependency cache cooked the wrong feature set (fixed 2026-08-05)
container.linux.chef.build.Dockerfile cooked deps with a bare --release, while build.sh uses --features flight and test.sh uses --all-features. Cargo keys its cache per feature set, so every job missed the cooked layer and recompiled arrow-flight/tonic. Now cooks both variants.
Benefit only lands after merge to develop
The container rebake trigger is develop-only, so branch pipelines keep the old image. Escalations if still slow: scheduled weekly rebake (against
Cargo.lockdrift) orsccache+S3. GitLabcache:cannot help — it cannot hold/init/chef/cook/target, which is outsideCI_PROJECT_DIR. The real wall-clock whale is PyMando Win Dev at ~2656s, untouched by any of this.
Pipeline Triggers
Container images rebuild when any of these change:
rust-toolchain.tomlcontainer.*.DockerfileCargo.toml/Cargo.lockpy-mando/pyproject.toml/poetry.lock
System Dependencies (Linux Runtime)
| Package | Purpose |
|---|---|
ca-certificates | TLS certificate store |
libc6 | C standard library |
libssl3 | OpenSSL / TLS |
Quality Gates
- Lint gate:
cargo clippy --release --all-featuresmust be clean - Test gate:
cargo test --all-features --release --lib -- --test-threads=1(.gitlab/scripts/test.sh; single-threaded mandatory: shared in-memory DB pools) - No
cargo fmtgate — never run barecargo fmtlocally (reformats ~64 legacy files); scope to touched files - See Mando AGENTS.md Master Guide for the full pre-push checklist
The test gate is
--lib-only (correction 2026-07-22)The
--libin.gitlab/scripts/test.shmeans CI compiles and runs ONLY lib unit tests.*/tests/integration targets are never built by the pipeline and rot silently; the separate “Integration Test Linux Dev” job covers only the mando-lib archiver Postgres suite. Concrete rot:mando-bess/tests/flight_end_to_end.rsis compile-broken on develop (E0603). Local gates must use--libfor CI parity. Full record: mando-ci-lib-only-test-gate-2026-07-22.
Known Flaky Tests
Intermittent CI failures with no underlying code defect are tracked in mando-known-flaky-tests-2026-07-15. Prefer retrying the CI job; real fixes land in dedicated follow-up tickets.
Build Requirements
| Tool | Version | Purpose |
|---|---|---|
| Rust | 1.89.0 toolchain (MSRV 1.88.0) | Compiler |
| Python | 3.12 | py-mando build |
| Maturin | 1.9.2 | PyO3 wheel builder |
| Poetry | 2.1.3 | Python dependency management |
| CMake | — | Native dependency builds |
| Go | — | Tool compilation |
| AWS CLI | — | ECR push, deployment |