镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

💥 Surface priority and fairness details in CLI output - #1217

Open
moody-temporal wants to merge 4 commits into
temporalio:mainfrom
moody-temporal:feature/priority-fairness-cli-output
Open

moody-temporal wants to merge 4 commits into
temporalio:mainfrom
moody-temporal:feature/priority-fairness-cli-output

Conversation

@moody-temporal

Copy link
Copy Markdown

Related issues

What changed?

  • Show workflow and activity priority, fairness key, and fairness weight in human-readable describe output.
  • Show fairness weight overrides in task queue config output.
  • Add task-queue describe --report-priority-stats to show per-priority task counts for all build IDs, including statsByPriority in JSON output when requested.

Release notes 💥

The new statsByPriority field changes task-queue describe -o json output when --report-priority-stats is used.

Validation

  • go test ./... -count=1 and cd cliext && go test ./... -count=1 passed.
  • Module tidy, generated code and docs, formatting, and server version checks passed.
  • Manually tested end to end against an OSS Temporal dev server 1.32.0 with fairness enabled. Workflow and activity details, fairness overrides, and workflow/activity queue stats showed the expected values.

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes
  • Changes to JSON output (-o json / -o jsonl) are treated as breaking changes

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
  • New flags are named after the API concept, not the implementation mechanism
  • New flags don't duplicate an existing flag that serves the same purpose
  • New flags do not have short aliases without strong justification

Help text

  • All flags shown in help text and examples are implemented and functional
  • Summaries use sentence case and have no trailing period
  • Long descriptions end with a period and include at least one example invocation
  • Examples use long flags (--namespace, not -n), one flag per line
  • Placeholder values use YourXxx form (YourWorkflowId, YourNamespace)

Behavior

  • Results go to stdout; errors and warnings go to stderr
  • Error messages are lowercase with no trailing punctuation

Tests

  • Added functional test(s) (SharedServerSuite)

Manual tests

Setup

temporal server start-dev \
    --headless \
    --dynamic-config-value matching.enableFairness=true

temporal task-queue config set \
    --task-queue YourTaskQueue \
    --task-queue-type workflow \
    --fairness-key-weight tenant-a=4.5

temporal workflow start \
    --type YourWorkflowType \
    --task-queue YourTaskQueue \
    --workflow-id YourWorkflowId \
    --priority-key 2 \
    --fairness-key tenant-a \
    --fairness-weight 5.5

Happy path

$ temporal workflow describe \
    --workflow-id YourWorkflowId
# Priority: 2; fairness key: tenant-a; fairness weight: 5.5

$ temporal task-queue config get \
    --task-queue YourTaskQueue \
    --task-queue-type workflow
# tenant-a has fairness weight 4.5

$ temporal task-queue describe \
    --task-queue YourTaskQueue \
    --report-priority-stats
# Per-priority task counts include priority 2

$ temporal task-queue describe \
    --task-queue YourTaskQueue \
    --report-priority-stats \
    --output json
# statsByPriority contains the per-priority counts

Error case

$ temporal task-queue describe \
    --task-queue YourTaskQueue \
    --report-priority-stats \
    --disable-stats
Error: --report-priority-stats cannot be used with --disable-stats
$ echo $?
1

Composition

$ temporal activity start \
    --activity-id YourActivityId \
    --type YourActivityType \
    --task-queue YourTaskQueue \
    --start-to-close-timeout 5m \
    --priority-key 2 \
    --fairness-key tenant-a \
    --fairness-weight 5.5 \
    --output json | jq -r .runId
YourRunId

$ temporal activity describe \
    --activity-id YourActivityId \
    --run-id YourRunId
# Priority: 2; fairness key: tenant-a; fairness weight: 5.5

$ temporal task-queue describe \
    --task-queue YourTaskQueue \
    --report-priority-stats
# Activity queue stats include priority 2

@CLAassistant

CLAassistant commented Sep 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@moody-temporal
moody-temporal marked this pull request as ready for review October 16, 2026 17:12
@moody-temporal
moody-temporal requested a review from a team as a code owner October 16, 2026 17:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T18:12:57.548012Z 5782014 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73e55168ad

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/temporalcli/commands.taskqueue.go
@moody-temporal
moody-temporal force-pushed the feature/priority-fairness-cli-output branch from d8f9624 to 7d64d65 Compare October 16, 2026 18:00

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5782014d6d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/temporalcli/commands.taskqueue.go
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.

2 participants