Skip to content

Conversation

@liuyang-my
Copy link
Contributor

@liuyang-my liuyang-my commented Aug 27, 2023

Why are these changes needed?

This is about Serve Java Improvement. The goal of this PR is to make the Java API consistent with Python.

The design of the user API is discussed in this proposal: ray-project/enhancements#42.
This PR only covers the Java programming API part, including Deployment.bind, Serve.run, DeploymentHandle, and so on, ensuring that these APIs can be used properly. The alignment of some internal core logic, documentation enhancements, and support for the config file will be submitted in subsequent PRs.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@liuyang-my liuyang-my changed the title [WIP] Serve Java API Improvement Serve Java API Improvement Oct 1, 2023
@edoakes edoakes requested a review from sihanwang41 October 2, 2023 16:15
Copy link
Contributor

@sihanwang41 sihanwang41 left a comment

Choose a reason for hiding this comment

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

Thanks for implementing, exciting to see Java moving to 2.x API!
Can you do some auditing?

  1. Add docstring for public API.
  2. Make private API if it is not exposed to users.
  3. Add all v1 API with deprecate decorator. (If possible, add deprecation warning in the decorator)

* @param name application name
* @param timeoutS unit: second
*/
private void waitForApplicationRunning(String name, Long timeoutS) {
Copy link
Contributor

Choose a reason for hiding this comment

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

add check for APPLICATION_STATUS_UNHEALTHY

chuhan.ly added 7 commits October 7, 2023 14:02
Signed-off-by: chuhan.ly <[email protected]>
…support cross-language invocation in local mode.

Signed-off-by: chuhan.ly <[email protected]>
2. Include some audit content.
3. DeploymentHandle.remote use the requestId from context.

Signed-off-by: chuhan.ly <[email protected]>
chuhan.ly added 2 commits October 7, 2023 23:04
@edoakes edoakes merged commit 99f76fe into master Oct 10, 2023
@edoakes edoakes deleted the serve-java-api-2.x branch October 10, 2023 16:25
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.

4 participants