馃挜 Surface priority and fairness details in CLI output - #1217
Draft
moody-temporal wants to merge 1 commit into
Draft
moody-temporal wants to merge 1 commit into
moody-temporal wants to merge 1 commit into
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
What changed?
task-queue describe --report-priority-statsto show per-priority task counts for all build IDs, includingstatsByPriorityin JSON output when requested.Release notes 馃挜
The new
statsByPriorityfield changestask-queue describe -o jsonoutput when--report-priority-statsis used.Validation
go test ./... -count=1andcd cliext && go test ./... -count=1passed.Checklist
Stability
-o json/-o jsonl) are treated as breaking changesDesign
Help text
--namespace, not-n), one flag per lineYourXxxform (YourWorkflowId,YourNamespace)Behavior
Tests
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.5Happy 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 countsError case
$ temporal task-queue describe \ --task-queue YourTaskQueue \ --report-priority-stats \ --disable-stats Error: --report-priority-stats cannot be used with --disable-stats $ echo $? 1Composition
$ 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