Skip to content

Commit c200ac1

Browse files
github-actions[bot]actions-useraylei
authored
Release 0.9.3 (#5598)
* Release 0.9.3 * Pin click version for correct argument parsing (#5597) * Pin click version for correct argument parsing Signed-off-by: Aylei <rayingecho@gmail.com> * Loosen constrain Signed-off-by: Aylei <rayingecho@gmail.com> * Correct issue link Signed-off-by: Aylei <rayingecho@gmail.com> --------- Signed-off-by: Aylei <rayingecho@gmail.com> * Cherry-pick: Fix worker exits on duplicate scheduling (#5611) (#5613) Fix worker exits on duplicate scheduling (#5611) Signed-off-by: Aylei <rayingecho@gmail.com> --------- Signed-off-by: Aylei <rayingecho@gmail.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aylei <rayingecho@gmail.com>
1 parent 51be370 commit c200ac1

File tree

7 files changed

+28
-13
lines changed

7 files changed

+28
-13
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN conda install -c conda-forge google-cloud-sdk && \
2626
# Install uv and skypilot
2727
curl -LsSf https://astral.sh/uv/install.sh | sh && \
2828
~/.local/bin/uv pip install --prerelease allow azure-cli --system && \
29-
~/.local/bin/uv pip install skypilot-nightly[all] --system && \
29+
~/.local/bin/uv pip install skypilot[all]==0.9.3 --system && \
3030
# Cleanup all caches to reduce the image size
3131
conda clean -afy && \
3232
~/.local/bin/uv cache clean && \

charts/skypilot/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiService:
2-
image: berkeleyskypilot/skypilot:0.9.2
2+
image: berkeleyskypilot/skypilot:0.9.3
33
# Number of replicas to deploy - replicas > 1 is not well tested, and requires
44
# a PVC that supports ReadWriteMany (see accessMode in storage section below).
55
replicas: 1

sky/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _get_git_commit():
3535

3636

3737
__commit__ = _get_git_commit()
38-
__version__ = '1.0.0-dev0'
38+
__version__ = '0.9.3'
3939
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
4040

4141

sky/exceptions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,3 +568,8 @@ def from_managed_job_status(
568568

569569
# Should not hit this case, but included to avoid errors
570570
return cls.FAILED
571+
572+
573+
class RequestAlreadyExistsError(Exception):
574+
"""Raised when a request is already exists."""
575+
pass

sky/server/requests/executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
import setproctitle
3636

37+
from sky import exceptions
3738
from sky import global_user_state
3839
from sky import models
3940
from sky import sky_logging
@@ -446,7 +447,8 @@ def prepare_request(
446447
cluster_name=request_cluster_name)
447448

448449
if not api_requests.create_if_not_exists(request):
449-
raise RuntimeError(f'Request {request_id} already exists.')
450+
raise exceptions.RequestAlreadyExistsError(
451+
f'Request {request_id} already exists.')
450452

451453
request.log_path.touch()
452454
return request

sky/server/server.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,19 @@ async def lifespan(app: fastapi.FastAPI): # pylint: disable=redefined-outer-nam
142142
del app # unused
143143
# Startup: Run background tasks
144144
for event in requests_lib.INTERNAL_REQUEST_DAEMONS:
145-
executor.schedule_request(
146-
request_id=event.id,
147-
request_name=event.name,
148-
request_body=payloads.RequestBody(),
149-
func=event.event_fn,
150-
schedule_type=requests_lib.ScheduleType.SHORT,
151-
is_skypilot_system=True,
152-
)
145+
try:
146+
executor.schedule_request(
147+
request_id=event.id,
148+
request_name=event.name,
149+
request_body=payloads.RequestBody(),
150+
func=event.event_fn,
151+
schedule_type=requests_lib.ScheduleType.SHORT,
152+
is_skypilot_system=True,
153+
)
154+
except exceptions.RequestAlreadyExistsError:
155+
# Lifespan will be executed in each uvicorn worker process, we
156+
# can safely ignore the error if the task is already scheduled.
157+
logger.debug(f'Request {event.id} already exists.')
153158
asyncio.create_task(cleanup_upload_ids())
154159
yield
155160
# Shutdown: Add any cleanup code here if needed

sky/setup_files/dependencies.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
'wheel<0.46.0', # https://github.com/skypilot-org/skypilot/issues/5153
1313
'cachetools',
1414
# NOTE: ray requires click>=7.0.
15-
'click >= 7.0',
15+
# click 8.2.0 has a bug in parsing the command line arguments:
16+
# https://github.com/pallets/click/issues/2894
17+
# TODO(aylei): remove this once the bug is fixed in click.
18+
'click >= 7.0, < 8.2.0',
1619
'colorama',
1720
'cryptography',
1821
# Jinja has a bug in older versions because of the lack of pinning

0 commit comments

Comments
 (0)