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] Integrate GCS fault tolerance with ray serve. #25637

Merged
merged 27 commits into from
Jun 18, 2022

Conversation

fishbone
Copy link
Contributor

@fishbone fishbone commented Jun 9, 2022

Why are these changes needed?

In this PR, we integrate GCS fault tolerance with ray serve. There are two parts in this PR:

  1. Add timeout with 5s for kv
  2. Rollback for deploy: if writing to KV failed, we'll revert to the right status.

Rollback should be added to all methods, not just deploy actually, so followup PR should be introduced to fix that.

Basic testing for KV timeout in serve and deploy is added. Right now, when GCS restarts, the existing replica will exit due to PG failure. We should fix this in ray core in the followup PR.

Related issue number

Checks

  • 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 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 :(

@fishbone fishbone changed the title [wip][serve] Integrate GCS fault tolerance with ray serve. [serve] Integrate GCS fault tolerance with ray serve. Jun 13, 2022
@fishbone fishbone marked this pull request as ready for review June 13, 2022 02:41
@@ -78,6 +78,7 @@ pygments
pyspark==3.1.2
pytest==5.4.3
pytest-asyncio==0.16.0
pytest-forked
Copy link
Contributor

Choose a reason for hiding this comment

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

should not be here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used in test_gcs_failure.py to make the test isolated with each other.

Copy link
Contributor

Choose a reason for hiding this comment

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

do we use this elsewhere in CI? I think you can specify this in bazel instead. prefer to avoid adding a new dep

python/ray/serve/utils.py Outdated Show resolved Hide resolved
python/ray/serve/deployment_state.py Outdated Show resolved Hide resolved
Copy link
Contributor

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

mostly nits, @simon-mo can you chime on on the pytest-forked question?

python/ray/serve/deployment_state.py Outdated Show resolved Hide resolved
python/ray/serve/tests/test_gcs_failure.py Outdated Show resolved Hide resolved
python/ray/serve/tests/test_gcs_failure.py Outdated Show resolved Hide resolved
@@ -78,6 +78,7 @@ pygments
pyspark==3.1.2
pytest==5.4.3
pytest-asyncio==0.16.0
pytest-forked
Copy link
Contributor

Choose a reason for hiding this comment

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

do we use this elsewhere in CI? I think you can specify this in bazel instead. prefer to avoid adding a new dep

@fishbone
Copy link
Contributor Author

@edoakes @simon-mo @shrekris-anyscale any other comments?

Copy link
Contributor

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

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

re: pytest-forked. I think we should add it back to the requirements.txt and then add comment to explain the --forked cmdline flag.

Copy link
Contributor

@shrekris-anyscale shrekris-anyscale left a comment

Choose a reason for hiding this comment

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

Nice work on the changes! If we add back the pytest-forked dependency, do you think we should pin the version? I don't feel too strongly about it, so I'm okay either way.

@fishbone
Copy link
Contributor Author

@simon-mo @shrekris-anyscale I'm working on pytest-xdist for core tests. Once I finish that, I'll just remove pytest-forked since it's included in pytest-xdist.

I'll add it back to requirement.txt in this PR

@fishbone fishbone merged commit 9fe3c81 into ray-project:master Jun 18, 2022
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.

5 participants