Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Remove deprecated API - HttpSender and RemoteBaggMana #431

Merged

Conversation

pavolloffay
Copy link
Member

Related to #414 (comment)

Signed-off-by: Pavol Loffay ploffay@redhat.com

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@ghost ghost assigned pavolloffay May 24, 2018
@ghost ghost added the review label May 24, 2018
jpkrohling
jpkrohling previously approved these changes May 24, 2018
Copy link
Collaborator

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM

* @deprecated use {@link Builder}
*/
@Deprecated
public HttpSender(String endpoint) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that now it's not possible to override this class

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not good :)

* @deprecated use {@link Builder}
*/
@Deprecated
public RemoteBaggageRestrictionManager(
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that now it's not possible to override this class

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's not good, then.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

oops, my bad, we shouldn't deprecate this

Copy link
Member Author

Choose a reason for hiding this comment

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

We want to deprecate it and use builder instead. Does protected constructor work for you?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's fine

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks the private with the most parameters is changed from private to protected

protected RemoteBaggageRestrictionManager(
       String serviceName,
       BaggageRestrictionManagerProxy proxy,
       Metrics metrics,
       boolean denyBaggageOnInitializationFailure,
       int refreshIntervalMs,
       int initialDelayMs
   ) {

@codecov
Copy link

codecov bot commented May 24, 2018

Codecov Report

Merging #431 into master will increase coverage by 0.16%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #431      +/-   ##
============================================
+ Coverage     87.15%   87.32%   +0.16%     
+ Complexity      510      509       -1     
============================================
  Files            65       65              
  Lines          1978     1972       -6     
  Branches        258      258              
============================================
- Hits           1724     1722       -2     
+ Misses          164      160       -4     
  Partials         90       90
Impacted Files Coverage Δ Complexity Δ
...acing/baggage/RemoteBaggageRestrictionManager.java 100% <ø> (+6.55%) 10 <0> (ø) ⬇️
...main/java/io/jaegertracing/senders/HttpSender.java 92.45% <ø> (-0.28%) 5 <0> (-1)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71b1a50...2841c44. Read the comment docs.

Copy link
Collaborator

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Let's clarify the need for subclassing HttpSender and the RemoteBaggageRestrictionManager.

@pavolloffay
Copy link
Member Author

I am not sure if people are overriding it. We can make builder constructors provided is needed.

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@jpkrohling
Copy link
Collaborator

I am not sure if people are overriding it.

It's more about the message we are sending: do we let subclass it, or should they never subclass it? If the HttpSender is part of the public API, then it should be extensible.

@pavolloffay
Copy link
Member Author

If the HttpSender is part of the public API, then it should be extensible.

I am not quite sure about ^^. There are public APIs which are not extensible. Maybe our question is: is there a reason to extend it? Do people need it?

From the API design perspective, visibility should be restricted as much as possible. If people ask for it make it public

@jpkrohling
Copy link
Collaborator

There are public APIs which are not extensible

True, but then they marked as "final".

Maybe our question is: is there a reason to extend it? Do people need it?

That's indeed the question. There's only one method that could be overridden, so, one could just extend ThriftSender directly, just like the HttpSender does.

@jpkrohling jpkrohling dismissed their stale review May 25, 2018 07:06

Dismissing review, to discuss whether HttpSender/RemoteBaggageRestrictionManager should be extensible

@pavolloffay pavolloffay merged commit 9dca4ce into jaegertracing:master Jun 1, 2018
@ghost ghost removed the review label Jun 1, 2018
@pavolloffay pavolloffay mentioned this pull request Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants