Skip to content

fix(k8s): remove stale environment checkout check #7781

Done

Description

@dan-petty

Problem Description

resolve_environment inspects the infra.repos checkout with local git commands (_inspect_infra_checkout and _finalize_infra_tree, added in #7678 for #7295). When the checkout is behind its upstream or has uncommitted or untracked files, cluster commands such as devops k8s push-secrets fail with ConfigurationError even when the command does not need a clean or fast-forwarded infra checkout.

Reproduction Steps

  1. Leave one untracked folder or unpulled commit in the configured infra.repos checkout.
  2. Run uv run devops k8s push-secrets --only devops/devops-cli.
  3. See ConfigurationError naming git -C <checkout> pull --ff-only and git -C <checkout> stash --include-untracked.

Expected vs Actual Behavior

Expected: resolve_environment locates the environment tree without inspecting git status or blocking cluster commands on stale or dirty infra.repos checkouts.
Actual: resolve_environment(..., write=True) raises ConfigurationError and stops the command.

Environment Diagnostics

  • DevOps CLI Version: 0.250.0
  • Python Version: 3.14.10
  • OS & Architecture: Linux x86_64
  • Execution Environment: DevContainer

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. dan-petty commented on Nov 29, 2026

    @dan-petty
    OwnerAuthor
    • Priority: A CLI command fails with ConfigurationError when the checkout is dirty, which is an error condition users hit routinely.
  2. added
    type/bug
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/low
    priority/p1-high
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 29, 2026
  3. removed
    status/in-review
    on Nov 29, 2026
  4. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-29 18:59 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/k8ssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions