Skip to content

Add dynamic warm capacity target computation#605

Merged
bill-ph merged 1 commit into
mainfrom
codex/dynamic-warm-capacity-pr-c
May 21, 2026
Merged

Add dynamic warm capacity target computation#605
bill-ph merged 1 commit into
mainfrom
codex/dynamic-warm-capacity-pr-c

Conversation

@bill-ph
Copy link
Copy Markdown
Collaborator

@bill-ph bill-ph commented May 21, 2026

Summary

  • add K8s dynamic warm-capacity file/env config plumbing without public docs or CLI flags yet
  • add configstore aggregation for recent warm-capacity miss buckets
  • add pure image-scoped target computation from base targets plus recent no-idle misses
  • clamp warm_capacity_demand_ttl to at least warm_capacity_miss_window
  • treat shared_warm_target as the default image base target and keep pinned-image floors separate
  • clear per-image warm targets during planned drain so warm spawning stops reliably

This intentionally keeps the PR C/D boundary: PR C computes bucket-derived targets and preserves max_workers=0 as unbounded; PR D will wire these effective targets into the janitor reconciler, remove the #597 in-memory counter path, and add the public README/example/usage docs plus CLI flags for the dynamic knobs.

Tests

  • go test ./configresolve
  • go test .
  • go test ./controlplane
  • go test ./cmd/duckgres-controlplane
  • go test -tags kubernetes -run 'TestOrgRouterAdapterSetWarmCapacityTargetZeroClearsAllWarmTargets|TestOrgRouterReconcileWarmCapacity|TestComputeDynamicWarmCapacityTargets' ./controlplane
  • go test -run 'TestRecordWarmCapacityMiss|TestListWarmCapacityMissesSince|TestPruneWarmCapacityMissBuckets' ./tests/configstore
  • go test -tags kubernetes ./controlplane ./cmd/duckgres-controlplane
  • go test ./... was run; it failed in existing tests/integration catalog compatibility test TestCatalogPsqlCommands/psql_dn because Duckgres returned 3 schema rows vs PostgreSQL's 2.

@bill-ph bill-ph force-pushed the codex/dynamic-warm-capacity-pr-c branch from cbdbd39 to 5b7c8da Compare May 21, 2026 19:33
@bill-ph bill-ph force-pushed the codex/dynamic-warm-capacity-pr-c branch from 5b7c8da to 5b1be74 Compare May 21, 2026 19:48
@bill-ph bill-ph merged commit 8dedc8b into main May 21, 2026
21 of 22 checks passed
@bill-ph bill-ph deleted the codex/dynamic-warm-capacity-pr-c branch May 21, 2026 19:51
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