Skip to content

api: Javadoc changes for io.grpc.LoadBalancer method signatures#11623

Open
SreeramdasLavanya wants to merge 75 commits intogrpc:masterfrom
SreeramdasLavanya:FixIssue-11194
Open

api: Javadoc changes for io.grpc.LoadBalancer method signatures#11623
SreeramdasLavanya wants to merge 75 commits intogrpc:masterfrom
SreeramdasLavanya:FixIssue-11194

Conversation

@SreeramdasLavanya
Copy link
Contributor

@SreeramdasLavanya SreeramdasLavanya commented Oct 17, 2024

Javadoc changes for io.grpc.LoadBalancer

Fixes #11194

@SreeramdasLavanya
Copy link
Contributor Author

Below points have been addressed:

javadoc for public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses)

  • refers to non-existent argument servers

javadoc for public Status acceptResolvedAddresses(ResolvedAddresses resolvedAddresses)

  • refers to an argument named addresses
  • refers to returning values not of the actual return type

@SreeramdasLavanya SreeramdasLavanya marked this pull request as ready for review October 18, 2024 12:40
* single list if needed.
*
* <p>Implementations can choose to reject the given addresses by returning {@code false}.
* <p>Implementations can choose to reject the given addresses by returning {@code UNAVAILABLE}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace with {@code Status.UNAVAILABLE} . Also below.

@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 22, 2024
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 22, 2024
newChildLbStates.add(childLbState);
if (entry.getValue() != null) {
//TODO - https://github.com/grpc/grpc-java/issues/11194
childLbState.lb.handleResolvedAddresses(entry.getValue()); // update child LB
Copy link
Member

Choose a reason for hiding this comment

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

#11894 swapped this to acceptResolvedAddresses()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merged with master branch latest changes

assertThat(fakeClock.getPendingTasks()).isEmpty();
}

@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Revert these changes? The tests were converted to acceptResolvedAddresses.

loadBalancer = new WrrLocalityLoadBalancer(mockHelper, lbRegistry);
}

@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Revert these changes? The tests were converted to acceptResolvedAddresses.

* @deprecated As of release 1.69.0,
* use instead {@link #acceptResolvedAddresses(ResolvedAddresses)}
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

This method is not deprecated, and should not be marked deprecated.

protected abstract LoadBalancer delegate();

@Override
public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses) {
Copy link
Member

Choose a reason for hiding this comment

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

Revert this method's implementation back to forwarding to handleResolvedAddresses(). Everything (in our code base) extending this class has both methods implemented. You can then remove the SuppressWarnings.

}
}

@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

We want to fix these. I've sent out #12053

new TestBalancer(),
Arrays.asList(
LoadBalancer.class.getMethod("acceptResolvedAddresses", ResolvedAddresses.class)));
LoadBalancer.class.getMethod("acceptResolvedAddresses", ResolvedAddresses.class),
Copy link
Member

Choose a reason for hiding this comment

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

acceptResolvedAddresses should be removed already with the current code. After you change handleResolverAddresses to forward, it should be removed as well.

@shivaspeaks shivaspeaks requested a review from ejona86 March 16, 2026 06:57
@shivaspeaks
Copy link
Member

I worked on all the open comments and added the commit address comments.

use acceptResolvedAddresses inn ClusterImplLoadBalancer commit was to solve deprecate warning. The other work around was to use suppress warning. Should we suppress it in this PR to only have desired changes? I believe there could be more usages and we can move to acceptResolvedAddresses when cleaning up.

@shivaspeaks shivaspeaks added the kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary label Mar 16, 2026
@grpc-kokoro grpc-kokoro removed the kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary label Mar 16, 2026
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.

io.grpc.LoadBalancer method signatures don't match javadoc

5 participants