Skip to content

Conversation

@stephanos
Copy link
Collaborator

@stephanos stephanos commented Nov 1, 2025

What was changed

Fixed a bug where explicitly set flags were not passed to the worker.

Before

% go run ./cmd run-worker --scenario workflow_on_many_task_queues --language go --run-id test --namespace test
2025-10-31T18:17:23.442-0700	INFO	workers/run.go:146	Starting worker with command: [./program --task-queue omes-test]

After

go run ./cmd run-worker --scenario workflow_on_many_task_queues --language go --run-id test --namespace test
2025-10-31T18:17:42.389-0700	INFO	workers/run.go:146	Starting worker with command: [./program --task-queue omes-test --namespace=test]

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Signed-off-by: Stephan Behnke <[email protected]>
@stephanos stephanos marked this pull request as ready for review November 1, 2025 01:18
@stephanos stephanos requested a review from a team as a code owner November 1, 2025 01:18
workers/run.go Outdated
func passthrough(fs *pflag.FlagSet, prefix string) (flags []string) {
fs.Visit(func(f *pflag.Flag) {
fs.VisitAll(func(f *pflag.Flag) {
if f.DefValue == f.Value.String() {
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I see the problem, but I think using f.Changed would be better. does that work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup! works, too: Starting worker with command: [./program --task-queue omes-test --namespace=test]

Signed-off-by: Stephan Behnke <[email protected]>
@stephanos stephanos requested a review from dnr November 1, 2025 03:02
@JorTurFer JorTurFer mentioned this pull request Nov 1, 2025
1 task
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