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][Test] Fix test_smoke.py::test_skyserve_new_autoscaler_update #3824

Conversation

landscapepainter
Copy link
Collaborator

@landscapepainter landscapepainter commented Aug 12, 2024

Fixing two points:

  • The yaml used for sky serve was not using the port opened, 8081, to run the server script. As the --port option was not used, examples/serve/http_server/server.py was using default port value, 8080, instead, resulting in error.
  • Updated the yaml to be j2 template so the resource: can specify other clouds than just gcp.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_skyserve_new_autoscaler_update
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Sorry for the delay and thanks for catching this issue @landscapepainter! Left two comments : )

@@ -5,10 +5,10 @@ service:
replicas: 2

resources:
cloud: gcp
cloud: {{generic_cloud}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this templating stuff considering we have the --cloud in our test already?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Even though the test yaml with cloud: gcp worked as we expected due to --cloud option, it was confusing and I was not able to come up with a good reason to keep it as cloud: gcp while it is being tested for other clouds as well. Should we keep it as it was without templating?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's keep the original way or just remove the cloud: in the YAML, as it seems unnecessary to do a template when our CLIs are built for being able to override the fields.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the cloud: from YAML, and reverted the template :)

ports: 8081
cpus: 2+

workdir: examples/serve/http_server

run: python3 server.py
run: python3 server.py --port 8081
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch! Is the other changes in this PR needed except for this one?

Copy link
Collaborator Author

@landscapepainter landscapepainter Aug 15, 2024

Choose a reason for hiding this comment

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

The test will work by only keeping this change.

@landscapepainter
Copy link
Collaborator Author

@Michaelvll This is ready for another look! Ran the test again just in case and confirmed it passes.

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks @landscapepainter! LGTM.

@Michaelvll Michaelvll added this pull request to the merge queue Aug 18, 2024
Merged via the queue into skypilot-org:master with commit 5d68632 Aug 18, 2024
20 checks passed
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.

2 participants