File tree Expand file tree Collapse file tree 7 files changed +28
-13
lines changed Expand file tree Collapse file tree 7 files changed +28
-13
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ RUN conda install -c conda-forge google-cloud-sdk && \
26
26
# Install uv and skypilot
27
27
curl -LsSf https://astral.sh/uv/install.sh | sh && \
28
28
~/.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 && \
30
30
# Cleanup all caches to reduce the image size
31
31
conda clean -afy && \
32
32
~/.local/bin/uv cache clean && \
Original file line number Diff line number Diff line change 1
1
apiService :
2
- image : berkeleyskypilot/skypilot:0.9.2
2
+ image : berkeleyskypilot/skypilot:0.9.3
3
3
# Number of replicas to deploy - replicas > 1 is not well tested, and requires
4
4
# a PVC that supports ReadWriteMany (see accessMode in storage section below).
5
5
replicas : 1
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def _get_git_commit():
35
35
36
36
37
37
__commit__ = _get_git_commit ()
38
- __version__ = '1.0.0-dev0 '
38
+ __version__ = '0.9.3 '
39
39
__root_dir__ = os .path .dirname (os .path .abspath (__file__ ))
40
40
41
41
Original file line number Diff line number Diff line change @@ -568,3 +568,8 @@ def from_managed_job_status(
568
568
569
569
# Should not hit this case, but included to avoid errors
570
570
return cls .FAILED
571
+
572
+
573
+ class RequestAlreadyExistsError (Exception ):
574
+ """Raised when a request is already exists."""
575
+ pass
Original file line number Diff line number Diff line change 34
34
35
35
import setproctitle
36
36
37
+ from sky import exceptions
37
38
from sky import global_user_state
38
39
from sky import models
39
40
from sky import sky_logging
@@ -446,7 +447,8 @@ def prepare_request(
446
447
cluster_name = request_cluster_name )
447
448
448
449
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.' )
450
452
451
453
request .log_path .touch ()
452
454
return request
Original file line number Diff line number Diff line change @@ -142,14 +142,19 @@ async def lifespan(app: fastapi.FastAPI): # pylint: disable=redefined-outer-nam
142
142
del app # unused
143
143
# Startup: Run background tasks
144
144
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.' )
153
158
asyncio .create_task (cleanup_upload_ids ())
154
159
yield
155
160
# Shutdown: Add any cleanup code here if needed
Original file line number Diff line number Diff line change 12
12
'wheel<0.46.0' , # https://github.com/skypilot-org/skypilot/issues/5153
13
13
'cachetools' ,
14
14
# 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' ,
16
19
'colorama' ,
17
20
'cryptography' ,
18
21
# Jinja has a bug in older versions because of the lack of pinning
You can’t perform that action at this time.
0 commit comments