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

Serve Java API Improvement #38961

Merged
merged 13 commits into from
Oct 10, 2023
Merged

Serve Java API Improvement #38961

merged 13 commits into from
Oct 10, 2023

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
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)

java/serve/src/main/java/io/ray/serve/api/Serve.java Outdated Show resolved Hide resolved
* @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

src/ray/protobuf/serve.proto Show resolved Hide resolved
python/ray/serve/_private/controller.py Outdated Show resolved Hide resolved
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
python/ray/serve/_private/controller.py Outdated Show resolved Hide resolved
python/ray/serve/_private/controller.py Outdated Show resolved Hide resolved
@edoakes edoakes merged commit 99f76fe into master Oct 10, 2023
82 of 83 checks passed
@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.

3 participants