Skip to content

[WIP] ci: PoC migrate to self-managed CI - #5104

Draft
maxknv wants to merge 16 commits into
mainfrom
praktika-rust-lint-pilot
Draft

maxknv wants to merge 16 commits into
mainfrom
praktika-rust-lint-pilot

Conversation

@maxknv

@maxknv maxknv commented Nov 20, 2026 •

Copy link
Copy Markdown

PeerDB CI → Praktika migration (showcase). PR CI now runs on Praktika
(ci/workflows/pull_request.py); the GHA lint/test/flow/docker workflows have
their pull_request triggers commented out (files kept, non-PR triggers intact).

✅ Done (parity)

Lint (rust clippy + golangci + ui eslint/prettier), UI build, unit tests,
test-selection, catalog-migrate (pg 14–18), the 15-perm flow e2e matrix, and
a merge-ready gate — plus flow-images + go build/module caches and S3 repo snapshot.

⏳ TODO (parity)

  • Cloud e2e + nexus cargo test — needs keyless cloud auth (re-enables the 6 cloud perms + RDS/S3/CloudSQL).
  • Port deprecated-connector, flow-api-client; decide Depot docker builds; post-merge CI; flaky-test retry.
  • Manual: make Ready For Merge [PR] a required check. Stays on GHA: CodeQL, renovate, release-drafter, @claude, cleanup.

➕ Added on top (Praktika features, to demonstrate)

  • Cross-model AI review — OpenAI-on-Bedrock Code Review job (reviews Claude-written diffs).
  • CI cache / skip — digest change-filters skip unaffected jobs and reuse artifacts across runs.
  • Dynamic matrix — a flow perm is skipped when a PR touches only other setups.
  • Next: docker pull-through proxy, one-host flow run, CIDB ingestion.

See ci/TODO.md for detail.

@maxknv
maxknv requested a review from a team as a code owner November 20, 2026 17:40
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@maxknv
maxknv marked this pull request as draft November 20, 2026 17:41
@maxknv maxknv changed the title ci: add Praktika Rust lint pilot job + bake toolchain into runner image ci: PoC migrate to self-managed CI Nov 20, 2026
@maxknv maxknv changed the title ci: PoC migrate to self-managed CI [WIP] ci: PoC migrate to self-managed CI Nov 20, 2026
@peerdb-ci

peerdb-ci Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [5d55c68]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: TestApiMy/TestCancelTableAdditionRemoveAddRemove hit a 3-minute timeout waiting for the CDC flow to reach PAUSED on one of 14 matrix legs of a CI-infrastructure-only PR, while the same source-agnostic test code passed on the postgres/mongo legs — a timing/signal-delivery flake rather than a real bug.
Confidence: 0.85

✅ Automatically retrying the workflow

View workflow run

@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch from a2782de to 695da70 Compare November 21, 2026 11:08
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: Transient Google Cloud 500 internalError while deleting from the BigQuery staging bucket during source-connector validation failed Test_BigQuery_CDC_Ingestion_Methods in the bigquery_ch-lts shard only, while the identical suite passed in the ch-latest and ch-stable shards of the same run on an unrelated Rust-lint PR.
Confidence: 0.95

✅ Automatically retrying the workflow

View workflow run

@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch 13 times, most recently from 72c6e14 to d5a6976 Compare November 23, 2026 17:35
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
@PeerDB-io PeerDB-io deleted a comment from github-actions Bot Nov 23, 2026
schedule:
- cron: '15 17 * * 2'

jobs:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting jobs.analyze means the retained push and schedule triggers no longer run CodeQL at all. The same pattern removes the non-PR jobs from ci.yml, flow.yml, dev-docker.yml, customer-docker.yml, mysql-debug-docker.yml, and the UI workflows. This contradicts the stated intent to keep non-PR triggers intact (and specifically to keep CodeQL and push-only Docker builds on GHA). Please retain the job bodies and disable only the PR events, or provide replacement push/schedule workflows before merging.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this an intentional removal or to trigger a code review comment then clean up? There are several workflows here that aren't migrated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional, but only in the context of this PoC. I touched a lot here to explore PeerDB's CI, learn how it's put together, and surface the migration risks — and to show off more of Praktika's features and UI. The disabled GHA workflows were just me keeping the checks list clean while experimenting; this isn't the shape a real migration would take. A real migration would be smaller and more focused: only the jobs you actually want to move, and nothing you depend on would be dropped. For what it's worth, I don't see any blocker to eventually moving every job onto the Praktika engine, so all the GHA checks will be replaced by PeerDB signs.

Workflow.Config(
name="PR",
event=Workflow.Event.PULL_REQUEST,
base_branches=["main"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replacement only handles PRs targeting main, but the disabled GHA triggers also covered release/* in ci.yml and customer-* in customer-docker.yml. After this change, PRs into those branches have neither the old checks nor a Praktika workflow. Add the corresponding base branches/workflows, or leave those GHA PR triggers enabled.

Comment on lines +126 to +127
_FLOW_TEST_DIGEST = Job.CacheDigestConfig(
include_paths=[

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With change-based filtering enabled, these paths are exhaustive after the required producer digests are included. However, the flow stack directly executes local_provision_scripts/** and scripts/generate-test-environment.sh, reads .env.example, and mounts files under volumes/**. A PR changing only one of those inputs matches no flow-test or producer digest, so the entire e2e matrix is skipped even though its setup changed. Include all Tilt/compose runtime inputs here (and in _FLOW_RELEVANT where appropriate).

schedule:
- cron: '15 17 * * 2'

jobs:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this an intentional removal or to trigger a code review comment then clean up? There are several workflows here that aren't migrated

Comment thread ci/scripts/flow_filter.py
# Paths whose change affects a flow_test run. The union of the flow-test job
# digest and its producers' digests (ci/workflows/pull_request.py); a changed
# file outside all of these is not flow-relevant to the matrix.
_FLOW_RELEVANT = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it'd require us to remember to update this file separately by hand, and right now it'd miss changes to .env.example, local_provision_scripts/postgres.sh, and volumes/postgresql.conf. Any suggestions on how to track it in a manageable way?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. If we can't keep this list reasonably stable with a handful of prefixes, then you're right — the upkeep outweighs the benefit and the dynamic filtering becomes more pain than it's worth. My main goal here was to demonstrate something that's genuinely hard to express in plain GH Actions YAML: applying logic at runtime (at workflow start) to decide what runs. Here it skips the heavy jobs for unaffected connectors, but the same mechanism goes much broader — skip a subset of jobs on draft PRs, enable a specific job only when a PR carries a given label, run only the Mongo tests while a test-mongo label is set, and so on. On a large CI with many jobs this becomes really useful and handy for development.

Comment thread ci/scripts/tilt_env.py
).stdout.split()
if ids:
print(f"resetting stale state: removing {len(ids)} leftover container(s)", flush=True)
subprocess.run(["docker", "rm", "-f", *ids], check=False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would persist container volumes across runs, including across PG versions. AI is suggesting replacing blanket container removal with tilt down --delete-volumes at CI start (would also remove the footgun with local runs wiping unrelated containers)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — good catch. Fixed: reset_stale_state() now removes leftover Docker volumes after the containers, so a prior job's Postgres data (possibly from a different PG version) can't carry over into the next run.

Comment thread ci/TODO.md
Comment on lines +25 to +26
- [ ] **Flaky-test retry** — GHA leans on `auto-retry-flaky-tests`; our matrix
blocks with no retry. Add a retry pass (job-level or port the bot).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How hard would it be to have the auto-retry functionality work? Losing this one would be a significant downgrade to dev experience for us

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad I ran into this feature of yours — I don't want to lose it either. It's doable, and I think we can make it even better. Where failures have clear patterns we can automate reruns without needing a retry heuristic at all; where they don't, an LLM can make the call. Praktika already has an AI-assist hook that triggers on CI failure and can route to actions like "cancel the whole run", "make a patch", or "just continue" — and now I can see that adding a "rerun" action there makes a lot of sense.

# Use the last version of a source in the matrix as its local default.
default_version() {
yq -r ".jobs.flow_test.strategy.matrix.target | map(select(.job == \"$1\")) | .[-1].version" "$FLOW_WORKFLOW"
printf '%s' "$FLOW_MATRIX" | jq -r --arg j "$1" '[.targets[] | select(.job == $j)] | last | .version'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: tilt.sh will need checks for jq and python3, along with readme prereqs update

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted — will add the jq and python3 prerequisite checks and update the README prereqs.


**PR run:**
```
https://peerdb-artifacts-eu-west-1.s3.amazonaws.com/PRs/{PR}/{sha}/pr/result_pr.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this PR's runs, wait times are a lot longer vs GHA:

image

Am I understanding it correctly that PeerDB CI get its own EC2 pool, and the choice is to either wait for EC2 provisioning or to keep our own warm pool?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately, it takes 20-25 seconds from push to workflow start, when it was 1-3s with GHA.
On the bright side, the test job runtimes are better by 30-60s, although build times are a bit slower.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharp observation — and yes, your understanding is right: PeerDB CI gets its own EC2 pool, so the trade-off is waiting for provisioning vs. keeping a warm pool. This is genuinely an area where Praktika is currently behind. A few caveats, though:

  1. Please don't read too much into this PR's numbers — I was tuning the infra as I went. Cold-runner wait is ~1 min
  2. Part of the gap is that Praktika only marks a job as started once the code is fetched and checked out, so some of that "wait" is work GHA counts elsewhere. Worth confirming on both sides.
  3. For small jobs it's cheap to keep warm instances so pickup is near-instant. For larger machines under low overall load, warm pools cost more (as you noticed). All the initial/small jobs in your CI can go into warm pools; for the big flow runners that may not be the best trade-off.
  4. Praktika optimizes heavily elsewhere — cached submodules, cached code, a general CI cache — which on a big repo/CI more than offsets the extra startup time.
  5. There's also an initial "Config Workflow" job that enables a lot of CI features; it's service overhead. On ClickHouse it takes some time but pays back many times over — on a smaller project the ratio looks different.
  6. Bottom line: I'd compare total CI runtime across all jobs, not per-job startup. I believe a Praktika run can be at least comparable on total runtime, and some runs noticeably faster thanks to the CI cache, maybe even all runs faster with prebaked setup, docker cache, etc

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20-25s shouldn't be the norm with warm runners — we can make that much faster, and it ties into the points above. It's a good challenge, actually: I can take the jobs on the critical path in GHA, migrate them to Praktika, and compare the numbers that actually matter end-to-end. Good to hear the test job runtimes are already 30-60s better; I'll dig into the slower build times.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can see the e2e runtimes on a typical change go down, that would be more than enough to close this item, yeah.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circling back on this with numbers. I pushed on the two things that were actually hurting us here:

  1. Autoscaling — we were adding runners slower than the queue needed, so jobs sat waiting longer than they should. Fixed that, and trimmed a few of the preliminary jobs on the critical path.

  2. An experimental feature (treat it as a PoC-inside-the-PoC). It pins the critical-path jobs onto one runner and runs them back-to-back, dropping the per-job overhead between them — repo fetch, checkout, artifact download. It needs a carefully tuned workflow to lay the chain out, but together with the prebaked tools it buys both faster individual jobs and a faster total runtime — even on this small subset (e2e, no cloud tests).

Latest run, same commit, same 825 tests per perm with coverage on both sides (so it's apples-to-apples — not a smaller test set):

perm (e2e job) GHA Praktika Δ
mongo-7_ch-stable 481s 184s −297s
mongo-8_ch-latest 476s 191s −285s
postgres-17_ch-stable 426s 204s −222s
postgres-18_ch-latest 415s 192s −223s
postgres-16_ch-lts 378s 186s −192s
mongo-6_ch-lts 377s 188s −189s
maria-13_ch-latest 351s 135s −216s
maria-11_ch-lts 340s 140s −200s
cockroachdb-v26_ch-latest 335s 174s −161s
mysql-gtid_ch-latest 325s 145s −180s
mysql-pos_ch-stable 325s 153s −172s
cockroachdb-v24_ch-lts 299s 175s −124s
cockroachdb-v25_ch-stable 296s 200s −96s
maria-12_ch-stable 281s 140s −141s
mysql-gtid_ch-lts 270s 146s −124s

Full pipeline, end to end: GHA ~10.2 min → Praktika ~5.6 min (same push, within 1s of each other).

One thing to be upfront about: this config is tuned for minimum total runtime, not cost — it keeps 3 big warm runners. But even discounting that (a cost-optimized setup without the big warm pool), the margin I'm seeing is ~1–1.5 min of faster feedback, so I'm fairly confident we can stay on par — or ahead — without the expensive warm pool.

I also improved the CI timeline widget: hover any job to see its dependencies and its start time relative to CI start. Worth a look: https://peerdb-artifacts-eu-west-1.s3.amazonaws.com/report.html?PR=5104&sha=5d55c682095b6f50827c4a247de9bd91ac566fe8&name_0=PR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Comment on lines +166 to +167
"--model global.openai.gpt-5.6-sol --reasoning-effort high "
"--prompt ./ci/prompts/code_review.md --fail-for-draft-pr"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drops our .claude/REVIEW.md prompt outlining tricky areas and things to focus on. Also 5.6 Sol is an old model, significantly weaker than Fable/Opus we're using now. The idea of getting different provider reviews sounds great.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just to show how the review feature works — everything here is configurable, including niceties like skipping review on drafts and only running it on rerun. Nothing that works well for you today needs to go: we'd keep the .claude/REVIEW.md prompt and use whatever model you prefer (Fable/Opus). And I'm glad the multi-provider review idea lands — that's one I'd like to pursue too.

volume_size_gb=30,
capacity_reserve=1,
image_builder=_IMAGE_BUILDERS_BY_NAME["ci-arm64-image"],
ext={"allowed_push_branches": ['main'], "allowed_pr_base_branches": ['main'], "system_logs": False, "host_metrics": False, "allowed_users": ["maxknv"]},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would allowed_users setup normally look? Would we have to list users, or be able to refer to a team, or allow everyone once this is in (assuming it becomes safe as secrets start coming through workload identity)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally you don't set this at all — everyone is allowed by default. I added it here only so that my ongoing work on this PoC wouldn't affect other people's PRs.

One thing worth calling out while we're on access control, since this repo is open source and external contributions need extra care: in Praktika this is handled by splitting the CI infrastructure into trusted and untrusted zones. I didn't set that up as part of this PoC, but the idea is simple — anything that may run untrusted code can never write to the trusted side. Untrusted artifacts, caches, etc. can't be consumed by trusted runs, and untrusted runs may read trusted S3 prefixes but never write to them.

Comment thread ci/infrastructure/projects.py Outdated
# Pins for the flow e2e host toolchain (baked into the x86_64 image used by the
# heavy Tilt pool). Go matches .github/workflows/flow.yml; Tilt matches the pin
# in .github/workflows/tilt-flow.yml.
_GO_VERSION = "1.27.3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd need to teach Renovate to bump those, correct? Does a change here automatically trigger an image rebuild?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes — those would need to be bumped by whatever handles your dependency updates (Renovate, in this repo), and wiring that up should be straightforward. Deploying the change (praktika infra --deploy) triggers a rebuild, since images are keyed by a content hash of their inputs. Beyond that there are a couple of options: rebuild images on a schedule to pick up unpinned deps, or simply don't pre-bake the things that change often and install them at runtime instead.

@maxknv maxknv Nov 24, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding: you don't have to pre-bake a dedicated image at all. There's also the option to run a job inside a Docker container (including docker-in-docker if the job needs it) — that's what we do in ClickHouse's CI. Praktika rebuilds and uses the current image automatically, so you never have to care about bumping version tags in the workflow.

And the Dockerfiles themselves stay up-to-date via the dependency bot (Dependabot, in ClickHouse's case) — people only step in for the bigger changes.

Comment thread ci/scripts/flow_filter.py Resolved
@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch 5 times, most recently from d66b093 to 50c4f8d Compare November 30, 2026 07:32
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: All three failures are environmental: two jobs (maria-13, mongo-6) died before testing because Docker could not bind host port 40002 for flow-snapshot-worker ("address already in use"), and postgres-17 hit the fixed 120s STATUS_SNAPSHOT wait in Test_Fuzz_Table_Names while the same test passed on the postgres-16 and postgres-18 shards at the same commit.
Confidence: 0.9

✅ Automatically retrying the workflow

View workflow run

@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch 4 times, most recently from 38d5be4 to 4ad40d0 Compare November 30, 2026 16:58
maxknv and others added 15 commits November 30, 2026 18:01
First real job in the GitHub Actions -> Praktika migration (see
PRAKTIKA_MIGRATION_ASSESSMENT.md). Ports .github/workflows/rust-lint.yml:
"buf generate protos" in a pre-hook, then "cargo clippy -- -D warnings"
over nexus, on the arm-small runner pool.

The runner image now bakes the toolchain (new build-phase Image Builder
component) so jobs don't reinstall it per run:
- pkg-config + libssl-dev (nexus build deps, per peerdb-server.Dockerfile)
- protoc 23.4 (matches scripts/install-protobuf.sh)
- buf (latest, matching bufbuild/buf-action)
- Rust 1.99.1 + clippy (matches the prod build pin), real toolchain
  binaries symlinked onto PATH so jobs need no RUSTUP_HOME/CARGO_HOME
Image recipe bumped 1.0.0 -> 1.1.0; image-test asserts the tools are runnable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Second increment of the GitHub Actions -> Praktika migration (follows the
rust-lint pilot). Ports flow.yml's self-contained jobs plus the first Tilt
e2e permutation.

Infra (ci/infrastructure/projects.py, ci/settings/settings.py):
- New heavy x86_64 runner pool amd_64cpu_128g (c7i.16xlarge, 200 GB) for the
  Tilt e2e stack; runner labels renamed to the <arch>_<Ncpu>_<Mg> convention.
- New x86_64-only image component peerdb-flow-host-toolchain: Go 1.27.3,
  gotestsum, Tilt 0.37.0, libgeos-dev, postgresql-client-18, retry, zstd, yq
  (HOME/GOCACHE set for the go install so Image Builder's root-no-HOME env
  doesn't break the build). Recipe bumped to 1.1.2.

Workflow jobs (ci/workflows/pull_request.py):
- Unit tests (no services) and Test selection coverage (self-contained).
- Flow test (postgres-16_ch-lts): first real Tilt e2e permutation,
  allow_failure while cloud suites are skipped (secret re-homing is Phase B).

Drivers (ci/scripts/):
- junit_result.py: JUnit XML -> structured praktika Result (per-test table).
- unit_tests.py / test_selection_coverage.py / flow_test.py: emit structured
  Results instead of bare exit codes.
- tilt_env.py: Tilt control-API orchestration (start, enable/wait ancillary,
  core-service recovery, docker diagnostics), port of tilt-flow.yml's bash.

Cloud-coupled suites (AWS/RDS-IAM/CloudSQL/destinations) are skipped this
increment; the 21-way matrix, build caches, secret re-homing and fork-PR gate
are Phase B.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Port flow.yml's 21-permutation flow_test matrix into flow_matrix.py as the
single source of truth. flow_test.py resolves the per-run env from the job
label; pull_request.py generates one parametrized job per target.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Black PeerDB logo on transparent background, 128x128. Uploaded to the
report bucket root by ReportPage.deploy and loaded by the report page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…C proposal

- flow_images (A1): ci/scripts/flow_images.py builds flow-api/worker/
  snapshot-worker once and publishes the `flow-images` S3 artifact; the matrix
  requires it and flow_test.py docker-loads it + sets
  PEERDB_CI_PREBUILT_FLOW_IMAGES=1 so Tilt skips the per-job image builds.
- Disable the cloud-destination-only permutations in flow_matrix.py
  (postgres_other x3, bigquery_ch-* x3) — they only fail with
  "TEST_BQ_CREDS env var not set" until cloud auth lands.
- MIGRATION_TODO B4: keyless cloud auth via OIDC / workload-identity
  federation (AWS instance role; GCP WIF — already supported by the flow
  code; Azure WIF), storing zero sensitive creds and enabling safe fork-PR
  cloud tests. Preferred over re-homing key secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diagnostics (docker container logs incl. mongod, tilt resource state, tilt
startup log) + coverage were attached to the `flow` sub-result, but praktika
only uploads files on the job's top-level Result — so test-failure runs shipped
only job.log. Move them to the top-level Result so the mongod server log is
available to diagnose the mongo connection-reset failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nce)

The catalog Postgres backs Temporal; its fsync latency on network-attached CI
storage bottlenecks commit-heavy snapshots (the 50-table fuzzer blows the 120s
snapshot wait). The CI DBs are disposable, so durability is unneeded: run
catalog with fsync/synchronous_commit/full_page_writes off.

Env-gated via CATALOG_EXTRA_PG_FLAGS so local dev is unchanged (durability
preserved); flow_test.py sets it in .env, docker-compose-dev.yml interpolates
it into the catalog command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match GitHub runner sizes and modernize instances; fixes jobs stuck pending
after the pool rename (the deployed infra deleted the old amd_64cpu_128g queue
while the workflow still routed to it).

- amd_32cpu_64g (c8i.8xlarge, 32 vCPU / 64 GiB, 1:2): Tilt e2e matrix + unit
  tests. Matches ubuntu-latest-32-cores on CPU; RAM isn't the CI constraint.
- amd_8cpu_16g (c8i.2xlarge): flow_images build + test-selection (can't
  saturate the big pool).
- arm_2cpu_4g -> c8g.large (Graviton4).
- Image builders -> c8g.large / c8i.large (latest-gen, small).
- Keeps gp3 IOPS/throughput bump on the e2e pool; modest bump on the build pool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Consolidated linters into one "Lint" job (per-step sub-results):
golangci-lint on flow/flow/pkg/e2e_cleanup + ui eslint + prettier
(ci/scripts/lint.py). Separate "UI build" job runs `next build`.

Image (x86): bake golangci-lint v2.15.0 (matches golang-lint.yml) and
Node 22 LTS; recipe 1.1.4 -> 1.1.5, flow component 1.0.3 -> 1.0.4.
Protos generated per-run in the pre-hook.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- flow_filter._norm used lstrip("./") which strips a char *set*, so
  ".github/..." lost its leading dot and never matched the
  ".github/scripts/select-flow-tests.sh" digest prefix. Use
  os.path.normpath, which collapses a leading "./" without touching
  the dot in ".github".
- tilt_env.reset_stale_state removed leftover containers but not their
  named volumes, so a prior job's Postgres data (possibly a different
  PG version) carried into the next run. Remove leftover volumes too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add a `Renovate config` job that validates renovate.json5 and runs
  renovate-simulation.sh, digest-gated on those inputs (its old GHA
  `paths:` filter) and allow_failure since the sim is network-heavy.
- Comment out check-renovate-config.yml's PR / pull_request_target
  triggers (workflow_dispatch only); file kept.
- ci/TODO.md: note the check is migrated, the GHA PR-comment report is
  not ported yet, and the Renovate bot itself stays on GHA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…unner

Coverage instrumentation (-cover/-coverpkg) roughly doubles the flow test
compile and inflates the shared GOCACHE artifact, yet nothing gates on
coverage.out (it is a reporting artifact only). Gate it behind a single
FLOW_COVERAGE toggle (default off) honored in lockstep by all three compile
sites so they share one uninstrumented cache:

  - select-flow-tests.sh drops -coverpkg from the -list compile unless
    FLOW_COVERAGE=1 (defaults on there for GHA parity)
  - flow_test.py (consumer) omits -cover/-coverpkg/-test.gocoverdir and the
    covdata step, and re-exports the value to the selection subprocess
  - go_build_cache.py (producer) exports the same value so the cache it ships
    matches what the matrix restores

Re-enable in lockstep via FLOW_COVERAGE=1, ideally from a future non-blocking
coverage job so the merge-gating matrix stays fast.

Also run the CPU-bound Go build cache job on the 32-cpu pool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ild-cache/longest-flow)

Enable praktika's cortage feature (0.1.32) to colocate the critical-path
jobs onto one runner/checkout/ci-tmp each, paying queue+boot+checkout+
artifact overhead once per chain instead of per job:

- Config Workflow -> Go modules -> Flow images, promoted onto amd_8cpu_16g
- Go build cache -> Flow test (postgres-16_ch-lts, the long pole), on
  amd_32cpu_64g; the test reads GOCACHE from the shared ci/tmp

Producers still upload to S3, so the other matrix perms and external Go
consumers read artifacts normally. Bump praktika pin + min version to
0.1.32 for the feature.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ortages

Pull the three long-pole flow perms out of the matrix and run each back-to-back after a critical-path producer on one warm amd_32cpu_64g runner (shared checkout/ci-tmp), reading its predecessor artifacts from ci/tmp instead of S3:

- Cortage 1: Flow images -> Flow test postgres-17_ch-stable (flow-images tarball from ci/tmp; no module cache needed, images build in clean Docker).

- Cortage 2: Go build cache -> Flow test postgres-16_ch-lts (GOCACHE from ci/tmp).

- Cortage 3: Config Workflow -> Go modules -> Unit tests -> Flow test postgres-18_ch-latest. The module-cache producers sit in front of Unit tests, which actually restores the cache (from ci/tmp, no S3 round-trip); Unit tests promotes the chain onto amd_32cpu_64g.

No flow test gates on Lint (dropped from _FLOW_TEST_BASE.run_after): Lint runs on a separate, slower pool and gates nothing the e2e needs. All flow tests keep the Unit tests gate. Reserve 3 amd_32cpu_64g runners (one per cortage head), drop amd_8cpu_16g reserve to 1; bump Go to 1.27.4 (match main) and image recipe to 1.1.12. Trim workflow comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch 2 times, most recently from d58e60c to 2c920f2 Compare November 30, 2026 19:17
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: TestQRepPause and TestXminPause failed on transient Temporal gRPC query errors ("context deadline exceeded" / "RST_STREAM CANCEL") seconds apart during their "unpausing" waits, which call t.Fatal on any query error instead of retrying — unrelated to the Rust-lint PR, and every other test in the job and matrix passed.
Confidence: 0.92

✅ Automatically retrying the workflow

View workflow run

Replace the dedicated "Go modules" producer job + go-mod-cache artifact with
a self-healing, content-addressed S3 cache (the GHA setup-go model): every Go
job's `restore mod` pre-hook downloads the go.sum-keyed GOMODCACHE bundle if
present, else runs `go mod download` cold, and its `save mod` post-hook publishes
the bundle when it built cold and no sibling has yet. So the module cache is
never a DAG node the critical path waits on: a hit just unpacks the tarball (as
before), a miss folds the download into runtime a job was already spending, and
the bundle is shared across all PRs with the same go.sum.

- go_cache.py: content-addressed key under CACHE_S3_PATH/go-mod/<sha>.tar.zst;
  multipart up/download; publish gated on head_object miss + successful download
  (never publishes a partial cache); keeps the per-runner sentinel fast-path.
- pull_request.py: delete the Go modules job, GO_MOD_CACHE_ARTIFACT, and all
  requires edges; add save post-hooks to the Go jobs; simplify cortage 2 to
  Config -> Go build cache -> Flow test (build-cache's restore warms GOMODCACHE).
- Remove go_mod_cache.py; add go_cache.py to the Go-job digests (replacing the
  dropped requires edge as the change-filter input).
- projects.py: drop the heavy-pool warm reserve now that Go modules no longer
  fans out as a first job (+ carries in-progress image recipe bump).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv
maxknv force-pushed the praktika-rust-lint-pilot branch from 2c920f2 to 5d55c68 Compare November 30, 2026 20:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-force-all force all ci jobs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants