Skip to content

fix(deploy): emit valid MicroTime timestamps for the GHCR Lease #2835

Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Problem

Production merge-group deploys cannot acquire Lease/flux-system/ghcr-auth-refresh. Two exact attempts, runs 30336754970 and 30336999312, failed before artifact publication, and both heal jobs failed on the same path.

Reproduction

The lease builder emits acquireTime and renewTime with second precision (YYYY-MM-DDTHH:MM:SSZ). A server-side dry-run of that exact object returns BadRequest: Kubernetes Lease MicroTime requires fractional seconds. No Lease exists afterward, and the deployment identity can create, patch, and get Lease objects.

The script currently swallows create/patch stderr and reports the rejection as concurrent updates, hiding the real cause.

Done when

  • lease timestamps use an API-accepted MicroTime format in create, acquire, renew, and release paths
  • controlled tests fail on second-precision timestamps and pass on the emitted values
  • create/patch failures surface a sanitized concrete cause instead of the generic concurrency message
  • the server-side dry-run accepts the exact generated Lease
  • Platform fix(platform): harden Cilium exposure and deploy lease #2813 can pass merge-group production staging and merge

Related to #2613 and blocks #2813.

Activity

  1. self-assigned this
    on Jul 28, 2026
  2. coderabbitai commented on Jul 28, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #2330 - ci: heal prod when a merge-group deploy fails (restore main) [merged]
    #2339 - docs(agents): record merge-queue mechanics + root-cause-before-requeue [merged]
    #2622 - fix(ci): heal cancelled merge-group deploys [merged]
    #2633 - fix(deploy): verify incoming image on Talos nodes [merged]
    #2793 - feat(cilium): activate homogeneous device selection [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. added theissue type on Jul 28, 2026
  4. devantler commented on Jul 28, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Severity check: this blocks the merge queue but does NOT leave prod degraded. Measured 2026-07-28,
    read-only, right after an eviction.

    #2840 was evicted from the merge queue at 13:06Z with this exact failure in 🚀 Deploy to Prod:

    Could not atomically acquire the GHCR synchronization lease after concurrent updates.
    

    The 🩹 Heal Prod job that exists to restore main after a failed merge-group deploy then failed with
    the same error
    , so the automated remediation path is down too. That reads alarming, so I verified the
    cluster's actual state rather than inferring it:

    • every control-plane and worker node reports Ready, including the node named in the earlier drain
      failure on #2120;
    • every Flux Kustomization reports Ready;
    • every Flux HelmRelease reports Ready.

    Why it self-corrects: Flux reconciles continuously, so a merge-group deploy that dies partway is
    converged back by the next reconcile without the heal job needing to succeed. The heal job is
    belt-and-braces here, not the only path.

    So the impact is throughput, not availability — which is still significant: no platform PR can merge
    while this stands, and that is currently ~44 open PRs across all lanes. Worth fixing with urgency, but it
    does not need an out-of-hours prod remediation, and nobody should hand-roll a cluster change on the
    strength of the red heal job.

    I am deliberately not touching #2836 — that PR is being actively iterated in another lane (pushed 12:48Z,
    reviewed 12:55Z, 4 unresolved threads at the time of writing), so code changes there belong to it.

  5. moved this from 👀 In Review to ✅ Done in 🌊 Project Boardon Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

Effort

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions