Skip to content

Add task queue fairness configuration for namespaces - #72

Merged
chndler merged 6 commits into
mainfrom
chandler/add_ns_fairness
Jun 3, 2026
Merged

chndler merged 6 commits into
mainfrom
chandler/add_ns_fairness

Conversation

@chndler

@chndler chndler commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

  • Added --enable-task-queue-fairness flag to temporal cloud namespace create.
  • Added temporal cloud namespace fairness get to read a namespace's current fairness setting.
  • Added temporal cloud namespace fairness set --enable-task-queue-fairness=<bool> to toggle it on an existing namespace (with --async, --async-operation-id, --resource-version, --idempotent support).
  • Wired the flag into NamespaceSpec.Fairness and added unit tests for create + both new commands.

Why?

Users previously had no targeted way to enable or disable task queue fairness — they could only do so by hand-editing the full namespace spec via namespace edit/apply. This adds first-class create-time and update-time controls, following the existing namespace lifecycle pattern for single-field sub-spec management.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note

Low Risk
Scoped namespace configuration using the existing get/apply/update flow with prompts and tests; no auth or data-path changes.

Overview
Adds task queue fairness controls for Temporal Cloud namespaces so users can set or read TaskQueueFairnessEnabled without editing the full namespace spec.

temporal cloud namespace create gains --enable-task-queue-fairness. The flag is tri-state: if omitted, NamespaceSpec.Fairness is left unset so the server default applies; if provided, create wires FairnessSpec accordingly.

New temporal cloud namespace fairness commands follow the existing lifecycle-style pattern: get prints the current enabled state (treating missing fairness as false), and set --enable-task-queue-fairness fetches the namespace, applies a spec diff with confirmation, and UpdateNamespace with async polling and optional resource-version / async-operation overrides.

Command definitions in commands.yml drive generated CLI wiring; unit tests cover create fairness mapping and get/set behavior.

Reviewed by Cursor Bugbot for commit d6d4c22. Bugbot is set up for automated code reviews on this repo. Configure here.

@chndler
chndler requested a review from a team as a code owner June 1, 2026 16:23
the current version is fetched automatically.

# Namespace fairness commands
- name: cloud namespace fairness

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the state of this feature? If its not GA yet, can we add a Experimental label to the commands, similar to the custom roles feature?

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 31e984e. Configure here.

Comment thread temporalcloudcli/commands.namespace.fairness.go
@chndler
chndler merged commit 78cbd21 into main Jun 3, 2026
6 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.

3 participants