Skip to content

Commit

Permalink
[SkyServe][Test] Fix test_smoke.py::test_skyserve_new_autoscaler_upda…
Browse files Browse the repository at this point in the history
…te (#3824)

* fix test_smoke.py::test_skyserve_new_autoscaler_update

* nit

* format

* move out the comment from run at new_autoscaler_after.yaml

* revert comment

* revert templating

* nit

* nit
  • Loading branch information
landscapepainter authored Aug 18, 2024
1 parent 61c9c87 commit 5d68632
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/skyserve/update/new_autoscaler_after.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ service:
base_ondemand_fallback_replicas: 1

resources:
cloud: gcp
ports: 8081
use_spot: true
cpus: 2+
Expand All @@ -22,4 +21,4 @@ run: |
# blue-green update.
sleep 120
fi
python3 server.py
python3 server.py --port 8081
3 changes: 1 addition & 2 deletions tests/skyserve/update/new_autoscaler_before.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ service:
replicas: 2

resources:
cloud: gcp
ports: 8081
cpus: 2+

workdir: examples/serve/http_server

run: python3 server.py
run: python3 server.py --port 8081
4 changes: 2 additions & 2 deletions tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -3952,7 +3952,7 @@ def test_skyserve_update_autoscale(generic_cloud: str):
@pytest.mark.parametrize('mode', ['rolling', 'blue_green'])
def test_skyserve_new_autoscaler_update(mode: str, generic_cloud: str):
"""Test skyserve with update that changes autoscaler"""
name = _get_service_name() + mode
name = f'{_get_service_name()}-{mode}'

wait_until_no_pending = (
f's=$(sky serve status {name}); echo "$s"; '
Expand Down Expand Up @@ -3982,7 +3982,7 @@ def test_skyserve_new_autoscaler_update(mode: str, generic_cloud: str):
_check_service_version(name, "1"),
]
test = Test(
'test-skyserve-new-autoscaler-update',
f'test-skyserve-new-autoscaler-update-{mode}',
[
f'sky serve up -n {name} --cloud {generic_cloud} -y tests/skyserve/update/new_autoscaler_before.yaml',
_SERVE_WAIT_UNTIL_READY.format(name=name, replica_num=2) +
Expand Down

0 comments on commit 5d68632

Please sign in to comment.