Skip to content

Commit 2fe1054

Browse files
authored
Merge branch 'main' into fix-username-bug
2 parents 0b94a10 + 3cb0baa commit 2fe1054

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

.github/workflows/govulncheck.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Govulncheck
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
govulncheck:
11+
name: Govulncheck
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-go@v6
16+
with:
17+
go-version-file: go.mod
18+
- uses: temporalio/public-actions/golang/govulncheck@main

internal/temporalcli/commands.taskqueue_config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ const (
6363
)
6464

6565
// printZeroRateLimitWarning prints a warning when a rate limit is set to 0
66-
func printZeroRateLimitWarning(p *printer.Printer, limitType string) {
67-
p.Printlnf("WARNING: Setting %s to 0 will STOP ALL TRAFFIC on this task queue.", limitType)
68-
p.Println(" This will prevent any tasks from being dispatched until the limit is changed.")
66+
func printZeroRateLimitWarning(cctx *CommandContext, limitType string) {
67+
fmt.Fprintf(cctx.Options.Stderr, "WARNING: Setting %s to 0 will STOP ALL TRAFFIC on this task queue.\n", limitType)
68+
fmt.Fprintln(cctx.Options.Stderr, " This will prevent any tasks from being dispatched until the limit is changed.")
6969
}
7070

7171
// parseFairnessKeyWeights parses "key=weight" or "key=default" format strings
@@ -200,7 +200,7 @@ func (c *TemporalTaskQueueConfigSetCommand) run(cctx *CommandContext, args []str
200200

201201
// Warn about zero rate limit (stops all traffic)
202202
if queueRateLimitIsZero {
203-
printZeroRateLimitWarning(cctx.Printer, "queue rate limit")
203+
printZeroRateLimitWarning(cctx, "queue rate limit")
204204
}
205205
}
206206

@@ -216,7 +216,7 @@ func (c *TemporalTaskQueueConfigSetCommand) run(cctx *CommandContext, args []str
216216

217217
// Warn about zero rate limit
218218
if fairnessRateLimitIsZero {
219-
printZeroRateLimitWarning(cctx.Printer, "fairness key rate limit default")
219+
printZeroRateLimitWarning(cctx, "fairness key rate limit default")
220220
}
221221
}
222222

internal/temporalcli/commands.taskqueue_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ func (s *SharedServerSuite) TestTaskQueue_Config_Validation() {
332332
"--queue-rps-limit-reason", "emergency stop",
333333
)
334334
s.NoError(res.Err)
335-
s.Contains(res.Stdout.String(), "WARNING")
336-
s.Contains(res.Stdout.String(), "STOP ALL TRAFFIC")
335+
s.Contains(res.Stderr.String(), "WARNING")
336+
s.Contains(res.Stderr.String(), "STOP ALL TRAFFIC")
337337

338338
// Duplicate fairness keys - should fail
339339
res = s.Execute(

0 commit comments

Comments
 (0)