Skip to content

fix(infra): repair development OpenAPI schema serialization (#1058) - #1079

Merged
athvin merged 2 commits into
mainfrom
issue/1058-dev-metrics-schema
Nov 10, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1058-dev-metrics-schema

Conversation

@athvin

@athvin athvin commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #1058

Claimed by Codex at 2026-11-10T18:45:58.039604+00:00; session 01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-87.lan. This open draft PR holds the claim.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Pin metrics-server to v0.9.0-eksbuild.14, upgrading development from build 12 and preserving the build already running in production.

Why

Development’s metrics-server emits malformed OpenAPI v2 definitions. JSON retrieval and APIService availability look healthy, but conversion to protobuf fails, so strict kubectl validation stops runner-isolation before Job creation.

Proof

Read-only kubectl v1.37.2 reproduces the dev protobuf 503; prod protobuf and dev JSON/v3 pass. The same OpenAPI parser used upstream fails on the downloaded dev schema and passes on prod. Removing only the malformed definitions from a local copy also makes conversion pass. Local Terraform 1.11.4 format/credential-free validation passed for dev and prod, and make skills-check passed. All PR workflows pass at d1c4f514; infra 42878835494 plans exactly one in-place dev metrics-server upgrade, 0 additions/0 destroys, and no changes in prod/core/state-backend. Live repair and unchanged isolation acceptance are pending.

Risk & rollback

Terraform updates the managed dev add-on in place; metrics availability may briefly pause during rollout. Production already runs the pinned build. Strict validation and all permission-denial assertions stay unchanged. If the add-on update fails, inspect EKS health and select a known-good supported build through Terraform; build 12 is known to break schema validation.

Post-merge ledger

Closed by: Codex · session 01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-87.lan · 2026-11-10T19:21:56.795028+00:00

Specific to this change

  • Completed the 30-minute main watch from 2026-11-10T18:51:29Z through 2026-11-10T19:21:56.795028+00:00: no new main failure; 365 public health probes, zero failures. Final dev add-on readback is v0.9.0-eksbuild.14 ACTIVE with no health issues; the exact protobuf OpenAPI v2 request returned 200 again at 19:20:32Z. Both-environment runner acceptance remains successful (42880252276).

  • CI-owned Terraform apply — infra 42879421433 succeeded in core/dev/prod. Dev now reports build 14 ACTIVE without health issues; production remains on build 14. Both new dev metrics-server pods are ready with zero restarts; the process emitted Serving securely on [::]:10251 at 18:55:00.999597Z.

  • Dev OpenAPI v2 protobuf and metrics — the exact kubectl v1.37.2 explain job --output=plaintext-openapiv2 command returned HTTP 200 at 18:55:59Z, after returning 503 before the upgrade. NodeMetricsList contains both current nodes with usage. Evidence: /tmp/er-1058-dev-openapi-after.log and /tmp/er-1058-node-metrics.json.

  • Unchanged runner-isolation workflow — run 42880252276 passed both fixture tenants in dev and prod: own-prefix put/get/list, cross-prefix put/get/list/delete AccessDenied, and root-list AccessDenied. All eight Jobs and both ConfigMaps were cleaned up. Log evidence: /tmp/er-1058-acceptance.log.

  • PR feat(infra): isolate runner lake access by tenant (#550) #1027's live S3-boundary item is closed with run 42880252276. Rollout-plan documentation is updated in docs(infra): record verified production rollout milestones (#1080) #1081 (f2baff25), merged after the live evidence existed.

Context — plan, discoveries, measurements, files

Plan

  1. Preserve the read-only reproduction: matching kubectl v1.37.2 fails dev OpenAPI v2 protobuf, while dev JSON/v3 and prod protobuf succeed. Locally reproduce conversion failure from malformed metrics-server definitions and compare the healthy production add-on.
  2. Pin both environments to the already-running production metrics-server build v0.9.0-eksbuild.14; development currently runs build 12. Record the schema diagnostic in the platform reference. Keep the existing strict validation and isolation assertions unchanged.
  3. Run Terraform format/credential-free validation and skill checks. Review a fresh CI plan: expect only an in-place dev add-on upgrade; no production resource change or stateful replacement.
  4. Land through land-pr, wait for the CI-owned apply, prove dev protobuf schemas and metrics are healthy, and dispatch the unchanged runner-isolation workflow on main. Require dev and prod positive/negative controls, close PR feat(infra): isolate runner lake access by tenant (#550) #1027's deferred live-boundary item, and finish the post-merge watch.

Discoveries

  • Both clusters run v1.36.5-eks-577a51e. Dev metrics-server is v0.9.0-eksbuild.12; prod is build 14. AWS lists build 14 as the default compatible version for EKS 1.36.
  • Dev's OpenAPI document contains 20 definitions with Go struct field names ArbitraryKeys, SchemaProps, SwaggerSchemaProps, including the metrics API types. gnostic-models v0.7.0 (the upstream Kubernetes 1.36.5 dependency) rejects those properties. Production conversion passes (3,809,449 bytes); the local dev copy with those definitions removed also passes. The altered copy was never sent to a cluster.
  • A core/v1 List forces kubectl v1.37.2 through legacy v2 validation. That explained the differing ConfigMap/Job behavior, but changing the submission shape would leave the malformed schema producer in place. This PR repairs the producer instead.
  • Evidence: issue Restore dev Kubernetes schema validation for runner-isolation acceptance #1058 comments and /tmp/er-1058-{openapi-explain,openapi-v3-explain,prod-openapi-explain,schema-conversion,prod-schema-conversion,sanitized-schema-conversion}.log on Mac-87.lan. No cluster writes were used for diagnosis.

Measurements

Files

@github-actions

Copy link
Copy Markdown
Contributor

terraform plan

a1b4783 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 1 0
prod 0 0 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

dev — 0 to add, 1 to change
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.network.data.aws_availability_zones.available: Reading...
module.network.data.aws_region.current: Reading...
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_region.current: Reading...
data.aws_caller_identity.current: Reading...
data.aws_region.current: Read complete after 0s [id=us-east-2]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=2205495074]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_trust: Read complete after 0s [id=4060172364]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_eks_addon.metrics_server will be updated in-place
  ~ resource "aws_eks_addon" "metrics_server" {
      ~ addon_version            = "v0.9.0-eksbuild.12" -> "v0.9.0-eksbuild.14"
        id                       = "er-dev:metrics-server"
        tags                     = {}
        # (9 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

@athvin
athvin marked this pull request as ready for review November 10, 2026 18:50
@athvin
athvin merged commit 2354ff9 into main Nov 10, 2026
43 checks passed
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.

Restore dev Kubernetes schema validation for runner-isolation acceptance

2 participants