Skip to content

feat: add --temporalAddress option#2175

Merged
lschim merged 3 commits into
mainfrom
feat/temporal-cli-options
Jun 8, 2026
Merged

feat: add --temporalAddress option#2175
lschim merged 3 commits into
mainfrom
feat/temporal-cli-options

Conversation

@lschim

@lschim lschim commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Added in picocli as a globalOption for it to be available in SERVER and WORKER commands.
Added in legacy CLI
Homogenize the option across the platform

lschim added 2 commits June 4, 2026 16:51
…ralNamespace in globalOptions from serverOptions. Homogenize the option name as temporalAddress across the platform
@lschim lschim force-pushed the feat/temporal-cli-options branch from 575861c to aafe87e Compare June 4, 2026 14:51
@lschim lschim requested a review from a team June 4, 2026 14:52
@pirhoo pirhoo changed the title Add --temporalAddress option feat: add --temporalAddress option Jun 5, 2026

@pirhoo pirhoo left a comment

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.

Only two small suggestions but it's good to go!

QueueType batchQueueType;

@Option(names = {"--temporalAddress"}, description = "Temporal address", scope = ScopeType.INHERIT)
String temporalAddress = EnvUtils.resolveUri("temporal", "temporal:7233");

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.

hint: I guess that means temporalAddress can never be empty and the putIfNotNull line 160 might shadow the default value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After review with Pierre, it was determined that it would stay that way because the picocli default value in the annotation needs to be a constant, meaning we won't be able to get the value from environment variables or conf files. Also, all the other address options were written exactly the same way

List.of(TEMPORAL_ADDRESS_OPT), "Temporal address")
.withRequiredArg()
.ofType( String.class )
.defaultsTo("temporal:7233");

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.

suggestion: this breaks the file convention to store default value in DEFAULT_* constants. We might do some girl-scouting here and apply it to other default values.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Noted, the file was girl-scouted to use DEFAULT_* constants !

@lschim lschim merged commit 06a1412 into main Jun 8, 2026
1 check passed
@lschim lschim deleted the feat/temporal-cli-options branch June 8, 2026 13:39
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