Skip to content

Replace ordering key prober's --should_cleanup with --should_not_cleanup so that we can use the flag#411

Merged
kamalaboulhosn merged 3 commits intoGoogleCloudPlatform:masterfrom
TimeString:improve-flag
Apr 6, 2026
Merged

Replace ordering key prober's --should_cleanup with --should_not_cleanup so that we can use the flag#411
kamalaboulhosn merged 3 commits intoGoogleCloudPlatform:masterfrom
TimeString:improve-flag

Conversation

@TimeString
Copy link
Copy Markdown
Collaborator

The current implementation will not be able to disable the flag (i.e., specify that I don't want to cleanup). This can be resolved by adding arity=1 in the @parameter() (see https://jcommander.org/ section 2.1), but I try to keep the style consistent with --no_publish flag, I decide to just introduce the negation in the flag name.

…nup so that we can use the flag

The current implmenetation will not be able to disable the flag (i.e., specify that I don't want to cleanup). This can be resolved by adding `arity=1` in the @parameter() (see https://jcommander.org/ section 2.1), but I try to keep the style consistent with `--no_publish` flag.

@Parameter(names = "--should_cleanup", description ="Whether the prober should start by cleaning up the topic and subscription.")
private boolean shouldCleanup = true;
@Parameter(names = "--should_not_cleanup", description = "Whether the prober should start by not cleaning up the topic and subscription.")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we just call it no_cleanup?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.


@Parameter(names = "--should_cleanup", description ="Whether the prober should start by cleaning up the topic and subscription.")
private boolean shouldCleanup = true;
@Parameter(names = "--should_not_cleanup", description = "Whether the prober should start by not cleaning up the topic and subscription.")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adding just a "not" in the description is confusing. Let's change it to "Skip the cleanup of the topic and subscription on startup."

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Revised the flag description per suggestion.

@kamalaboulhosn kamalaboulhosn merged commit 44f7a9b into GoogleCloudPlatform:master Apr 6, 2026
12 checks passed
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