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

[SkyServe] Fix replica log not found when replica cluster not found #2924

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Dec 30, 2023

Previous SkyServe has a bug: when the replica cluster is not created yet, sky serve logs cannot correctly show the replica launch log. This PR fixes the problem. This bug is common when we retry on scarce resources, where within the inner waiting time, there is no cluster in the SkyServe controller's database.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky serve up a cluster w/ OnDemand A100 and run sky serve logs <service-name> 1
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@@ -580,6 +575,11 @@ def _get_replica_status() -> serve_state.ReplicaStatus:
f'of replica {replica_id}...{colorama.Style.RESET_ALL}')

backend = backends.CloudVmRayBackend()
handle = global_user_state.get_handle_from_cluster_name(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move handle = global_user_state.get_handle_from_cluster_name(...) before # Notify user here to make sure user won't think the log is finished.?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That makes sense! Fixed. Thanks!

Copy link
Collaborator

@MaoZiming MaoZiming left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@cblmemo cblmemo merged commit 527eb4c into master Jan 3, 2024
19 checks passed
@cblmemo cblmemo deleted the serve-fix-replica-log branch January 3, 2024 16:12
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.

None yet

2 participants