Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testclient] hide option -s and substitute -ss(0) for it #11828

Merged
merged 1 commit into from
Sep 7, 2021
Merged

[testclient] hide option -s and substitute -ss(0) for it #11828

merged 1 commit into from
Sep 7, 2021

Conversation

yuruguo
Copy link
Contributor

@yuruguo yuruguo commented Aug 28, 2021

Fixes #11827

Motivation

Option --subscriber-name is redundant and easy to cause interference when the size of --subscriptions is equal to 1 but --num-subscriptions is not equal to 1 in command bin/pulsar-perf consume.

Modifications

  • Hide option --subscriber-name
  • Replace --subscriber-name with --subscriptions first element
  • Modify the corresponding doc.

@yuruguo
Copy link
Contributor Author

yuruguo commented Aug 29, 2021

PTAL and approve workflows awaiting approval@eolivelli @hangc0276 @merlimat

Copy link
Contributor

@gaoran10 gaoran10 left a comment

Choose a reason for hiding this comment

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

LGTM

@yuruguo
Copy link
Contributor Author

yuruguo commented Aug 30, 2021

PTAL @eolivelli @codelipenghui

@hangc0276 hangc0276 added this to the 2.9.0 milestone Aug 31, 2021
@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Aug 31, 2021
@Anonymitaet
Copy link
Member

Thanks for your contribution. Does this affect only master or other versioned docs?
If latter, could you please help update all affected versions? Thanks

@yuruguo
Copy link
Contributor Author

yuruguo commented Aug 31, 2021

Thanks for your contribution. Does this affect only master or other versioned docs?
If latter, could you please help update all affected versions? Thanks

This only affects maser and the version that will be released later

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

it looks like we are not handling compatibility.
with this change the 'subscriberName' parameter is ignored.
that is worse than letting the user see an error.

IMHO we should support the old parameter, it is only a matter of handling it as one single value in subscriptions or something like that

@yuruguo
Copy link
Contributor Author

yuruguo commented Sep 6, 2021

it looks like we are not handling compatibility.
with this change the 'subscriberName' parameter is ignored.
that is worse than letting the user see an error.

IMHO we should support the old parameter, it is only a matter of handling it as one single value in subscriptions or something like that

So we don’t need to make any changes? If this is the case I will close this PR.

@eolivelli
Copy link
Contributor

I believe that you can "hide" the parameter
but you have to let the users use the old syntax (with -s)

I am not sure if it is worth.
Using "-s" is quite convenient especially when you are running very simple smoke tests.

what about deprecating "-ss" and let "-s" behave like "-ss" ?

@yuruguo
Copy link
Contributor Author

yuruguo commented Sep 6, 2021

I believe that you can "hide" the parameter
but you have to let the users use the old syntax (with -s)

I am not sure if it is worth.
Using "-s" is quite convenient especially when you are running very simple smoke tests.

what about deprecating "-ss" and let "-s" behave like "-ss" ?

Thanks for your suggestion, I think perhaps the following is a way to consider:
Keep parameter -s(no default value) and make it work, but its priority is higher than parameter -ss only when -s is not null(that is, the user specifies -s).
related to code1
image
related to code2
image

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@MMirelli you may be interested in this patch

@yuruguo yuruguo changed the title [testclient] deprecate option --subscriber-name and substitute --subscriptions first element for it [testclient] hide option --subscriber-name and substitute --subscriptions first element for it Sep 6, 2021
@yuruguo yuruguo changed the title [testclient] hide option --subscriber-name and substitute --subscriptions first element for it [testclient] hide option -s and substitute -ss(0) for it Sep 7, 2021
@eolivelli eolivelli merged commit 981cb62 into apache:master Sep 7, 2021
codelipenghui pushed a commit that referenced this pull request Sep 9, 2021
…criptions first element for it (#11828)

(cherry picked from commit 981cb62)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 9, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
momo-jun added a commit to momo-jun/pulsar that referenced this pull request Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client area/test cherry-picked/branch-2.8 Archived: 2.8 is end of life doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.8.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[testclient] deprecate option --subscriber-name and substitute --subscriptions first element for it
7 participants