Skip to content

[improve][cli][PIP-280] Retrofit pulsar-cli-utils into pulsar-broker and pulsar-client-tools#21412

Merged
tisonkun merged 4 commits intoapache:masterfrom
JooHyukKim:pip280-scout
Nov 14, 2023
Merged

[improve][cli][PIP-280] Retrofit pulsar-cli-utils into pulsar-broker and pulsar-client-tools#21412
tisonkun merged 4 commits intoapache:masterfrom
JooHyukKim:pip280-scout

Conversation

@JooHyukKim
Copy link
Copy Markdown
Contributor

@JooHyukKim JooHyukKim commented Oct 21, 2023

Motivation

  • Retrofit pulsar-cli-utils into pulsar-broker and pulsar-client-tools.
  • This seems to cover last bits of refactor around time and byte-unit.

Modifications

  • Made TokensCliUtils in pulsar-broker module to delegate time parsing logic to pulsar-cli-utils.
  • Same as above, but to CmdPersistentTopics

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: https://github.com/JooHyukKim/pulsar/pull/23/

@JooHyukKim
Copy link
Copy Markdown
Contributor Author

This seems to cover last bits of refactor around time and byte-unit.

/cc @tisonkun, WDYT?

Copy link
Copy Markdown
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

Out thread - I found that RelativeTimeUtil is duplicated in pulsar-common and pulsar-cli-utils. What's the reason, and if we can eliminate the duplicate?

@JooHyukKim
Copy link
Copy Markdown
Contributor Author

WRT failing tests, they are flakey since they all pass in my fork.

@JooHyukKim
Copy link
Copy Markdown
Contributor Author

Out of thread - I noticed that RelativeTimeUtil is duplicated in both pulsar-common and pulsar-cli-utils. Is there a specific reason for this? Can we eliminate the duplication?

Indeed, RelativeTimeUtil is duplicated. However, I suggest we retain it.

The rationale is that the duplication serves as a small trade-off to avoid introducing a dependency between the two modules.

Furthermore, the likelihood of changes to the RelativeTimeUtil implementation is quite low, making the cost of this duplication minimal.

@tisonkun
Copy link
Copy Markdown
Member

WRT failing tests, they are flakey since they all pass in my fork.

Lari fixes an amount of flaky tests these days, you can merge master and push this branch to retrigger the CI.

Copy link
Copy Markdown
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

@tisonkun
Copy link
Copy Markdown
Member

Merging..

@tisonkun tisonkun merged commit 36d4708 into apache:master Nov 14, 2023
@JooHyukKim JooHyukKim deleted the pip280-scout branch November 14, 2023 16:10
TakaHiR07 pushed a commit to TakaHiR07/pulsar that referenced this pull request Dec 8, 2023
…sar-broker` and `pulsar-client-tools` (apache#21412)"

This reverts commit 36d4708.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants