cp9 task #135 · /goal

Premium remote-ec2-k3d — where the daily-loop time goes

From a clean machine: clone main @ ef85e7f → build → setup/doctor/up → Train B (Premium lifecycle smoke). Host: m7i.xlarge amd64, us-west-2, account 804837308162. Measured by @Emma.

Headline answers

cp9 up — per-stage timing (total 11m02s)

cp9's own native "Timing breakdown" on success.

stagedurationnote
preflight / config_load~1ms
owner_identity_ready1.97sAWS STS
iam_ready3.82sassume cp9-developer
substrate_init0.05sterraform init
substrate_plan33.9sterraform plan
substrate_apply48.3sterraform apply (IAM/metadb/route53/PCA)
host_ready2m10.8sEC2 boot + SSH + remote bootstrap (20%)
service_plan / metadb_seed / context / tiltfile_generate~0sowned by Session Tiltfile (skipped in core)
session_context_write5ms
tilt_ready6.5slaunch tilt + handoff
session_ready7m16.7swait for remote image builds + all 72 Tilt resources ready (66%)

Before this run, also: git clone main 2.7s, make build 19.5s, setup 4.9s, doctor 4.3s, up dry-run 0.03s.

Inside session_ready (the 7m17s) — top Tilt build durations

From tilt get uiresources buildHistory. Builds run in parallel, so wall-clock (437s) < sum; the longest builds gate the critical path.

116s  dedicated-infra-api-crds      ← old-crossplane CRDs imported by #601
 74s  dedicated-account-svc-image   ← source-built image
 70s  kms-local-image               ← source-built stub
 70s  dataplane-manager
 67s  billing-svc-image             ← source-built stub
 31s  regional-server
 28s  dataflow
 27s  cluster-controller            ← dedicated runtime
 26s  dedicated-global-service      ← dedicated runtime
 22s  nextgen-crossplane-ready
 17s  upbound-aws-provider

Finding: a large share of session_ready is (a) source-built local images (*-image: kms/billing/dedicated-account ~67–74s each) and (b) the Dedicated runtime imported by #601 (dedicated-infra-api-crds 116s + dedicated-account/global-service/cluster-controller/dedicated-kong). The dual Dedicated+Premium runtime materially inflates Premium up time.

Train B (Premium lifecycle smoke) — blocked at create→ACTIVE

OpenAPI CreateTidb returned 200 (cluster id 10752…) in ~1s; the cluster then sat CREATING for 32+ min and never reached ACTIVE (run stopped). So the SQL proof (ResetRootPassword → public endpoint → host mysql select 1 → delete) could not run. Two dataplane EKS clusters were created (ACTIVE in AWS) but the cluster never became usable.

Root cause (confirmed): dual Crossplane providers coexist after #601 imported the Dedicated runtime — eks.aws.upbound.io (Premium/new) and eks.aws.crossplane.io (Dedicated/old). The dataplane's dataplane-metadata-… cluster CR landed on the old CRD (READY=False), but dataplane-manager GetDataPlane looks it up under the new upbound CRD → "not found" → pre-create-tidbcluster "failed to load shared pool" → create DAG deadlocks → config-center never registers components → cluster-ng-server loops "tidb cluster version not found" → CREATING forever. (Not a DB seed gap — config-center defaults are all present.)

Two bugs found on main HEAD (both from the #601 Dedicated import)

Recommendations

  1. Instrument the two black boxes. Emit sub-timings inside host_ready (RunInstances → SSH-ready → remote bootstrap/docker/k3d) and session_ready (per source-image build, per-Tilt-resource ready, "all-ready-at" timestamp). Add OpenAPI train timing (create→ACTIVE, per readiness gate).
  2. Attack the dominant costs. session_ready is gated by source-image builds (cache them / prebuild) and the Dedicated-runtime footprint (#601). host_ready (EC2 cold boot 2m11s) is fixed per-run overhead — a warm/pooled host would remove it.
  3. The create→ACTIVE dataplane wait is the real ceiling for the daily loop — real EKS provisioning per cluster. For agent dogfood, a pre-warmed shared pool would avoid per-create EKS spin-up.

Artifacts