Skip to content

CLI mutations fail on deployments with sub-second worker queues (isLowLatency dropped from v1.0 API spec) #2196

Description

@seanmuth

Summary

Any CLI mutation against a deployment that has sub-second pipelines enabled fails with:

Error: Invalid request: Deployments with sub second pipelines enabled must have at least one worker queue with sub second pipelines enabled

This affects every mutating command — even ones unrelated to worker queues or sub-second — including:

  • astro deployment variable update
  • astro deployment variable create
  • astro deployment worker-queue update

The sub-second queue is correctly configured in the UI. The server-side validation is correct. The bug is in the CLI.

Root Cause

isLowLatency was added to the v1alpha1 OpenAPI spec but was never promoted to the v1.0 spec. The CLI's Go client is generated from the v1.0 spec, so the field is absent from all generated structs. Every outgoing mutation request effectively sends isLowLatency: false on all worker queues, which the server correctly rejects.

Spec gap:

  • versionedapi_v1.0.yamlWorkerQueue, UpdateWorkerQueueRequest, WorkerQueueRequest all missing isLowLatency
  • public_v1alpha1.yaml — same three types correctly define isLowLatency: boolean

Generated client (stale): astro-client-v1/api.gen.go

  • WorkerQueue struct — no IsLowLatency
  • UpdateWorkerQueueRequest struct — no IsLowLatency
  • WorkerQueueRequest struct — no IsLowLatency

Mapping sites where the field gets dropped:

  • cloud/deployment/deployment.go ~line 975: ConvertWorkerQueues (standard/dedicated path)
  • cloud/deployment/deployment.go ~line 1200: ConvertWorkerQueues (hybrid path)
  • cloud/deployment/deployment.go ~line 1375: ConvertCreateQueuesToUpdate
  • cloud/deployment/workerqueue/workerqueue.go ~line 85: CreateOrUpdate building existingQueueRequest

The existing queue data is read back from the API correctly (via v1alpha1 which has the field), but the field is dropped when reconstructing the outgoing v1.0 request.

Fix

  1. Add isLowLatency: boolean to WorkerQueue, UpdateWorkerQueueRequest, and WorkerQueueRequest in versionedapi_v1.0.yaml
  2. Run make generate to regenerate astro-client-v1/api.gen.go
  3. Wire IsLowLatency: q.IsLowLatency at the four mapping sites listed above

Workaround

None via CLI. Affected users must make all deployment changes through the Astro UI until this is fixed.

Environment

  • astro-cli v1.43.1 (latest)
  • Deployment: AstroExecutor, Runtime 3.2-5, sub-second pipelines enabled (Labs)

Identified with Claude Sonnet 4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions