skypilot-nightly 1.0.0.dev20251009__py3-none-any.whl → 1.0.0.dev20251011__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of skypilot-nightly might be problematic. Click here for more details.

Files changed (42) hide show
  1. sky/__init__.py +2 -2
  2. sky/backends/cloud_vm_ray_backend.py +1 -0
  3. sky/client/cli/command.py +9 -1
  4. sky/dashboard/out/404.html +1 -1
  5. sky/dashboard/out/_next/static/{hIViZcQBkn0HE8SpaSsUU → Xs6jdcfyNaUuBO8jmzU9_}/_buildManifest.js +1 -1
  6. sky/dashboard/out/_next/static/chunks/3015-7e0e8f06bb2f881c.js +1 -0
  7. sky/dashboard/out/_next/static/chunks/pages/jobs/{[job]-4f7079dcab6ed653.js → [job]-e5c9ce6a24fc0de4.js} +1 -1
  8. sky/dashboard/out/_next/static/chunks/{webpack-6a5ddd0184bfa22c.js → webpack-66f23594d38c7f16.js} +1 -1
  9. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  10. sky/dashboard/out/clusters/[cluster].html +1 -1
  11. sky/dashboard/out/clusters.html +1 -1
  12. sky/dashboard/out/config.html +1 -1
  13. sky/dashboard/out/index.html +1 -1
  14. sky/dashboard/out/infra/[context].html +1 -1
  15. sky/dashboard/out/infra.html +1 -1
  16. sky/dashboard/out/jobs/[job].html +1 -1
  17. sky/dashboard/out/jobs/pools/[pool].html +1 -1
  18. sky/dashboard/out/jobs.html +1 -1
  19. sky/dashboard/out/users.html +1 -1
  20. sky/dashboard/out/volumes.html +1 -1
  21. sky/dashboard/out/workspace/new.html +1 -1
  22. sky/dashboard/out/workspaces/[name].html +1 -1
  23. sky/dashboard/out/workspaces.html +1 -1
  24. sky/data/mounting_utils.py +54 -15
  25. sky/jobs/server/server.py +2 -2
  26. sky/provision/kubernetes/instance.py +2 -27
  27. sky/provision/kubernetes/utils.py +47 -6
  28. sky/serve/constants.py +3 -0
  29. sky/serve/server/server.py +1 -1
  30. sky/serve/service_spec.py +8 -1
  31. sky/server/requests/executor.py +36 -36
  32. sky/server/server.py +6 -2
  33. sky/server/stream_utils.py +61 -26
  34. sky/utils/common_utils.py +6 -3
  35. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/METADATA +34 -34
  36. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/RECORD +41 -41
  37. sky/dashboard/out/_next/static/chunks/3015-8d748834fcc60b46.js +0 -1
  38. /sky/dashboard/out/_next/static/{hIViZcQBkn0HE8SpaSsUU → Xs6jdcfyNaUuBO8jmzU9_}/_ssgManifest.js +0 -0
  39. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/WHEEL +0 -0
  40. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/entry_points.txt +0 -0
  41. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/licenses/LICENSE +0 -0
  42. {skypilot_nightly-1.0.0.dev20251009.dist-info → skypilot_nightly-1.0.0.dev20251011.dist-info}/top_level.txt +0 -0
@@ -11,6 +11,7 @@ import fastapi
11
11
  from sky import global_user_state
12
12
  from sky import sky_logging
13
13
  from sky.server.requests import requests as requests_lib
14
+ from sky.utils import common_utils
14
15
  from sky.utils import message_utils
15
16
  from sky.utils import rich_utils
16
17
  from sky.utils import status_lib
@@ -24,7 +25,9 @@ logger = sky_logging.init_logger(__name__)
24
25
  _BUFFER_SIZE = 8 * 1024 # 8KB
25
26
  _BUFFER_TIMEOUT = 0.02 # 20ms
26
27
  _HEARTBEAT_INTERVAL = 30
27
- _CLUSTER_STATUS_INTERVAL = 1
28
+
29
+ LONG_REQUEST_POLL_INTERVAL = 1
30
+ DEFAULT_POLL_INTERVAL = 0.1
28
31
 
29
32
 
30
33
  async def _yield_log_file_with_payloads_skipped(
@@ -41,12 +44,14 @@ async def _yield_log_file_with_payloads_skipped(
41
44
 
42
45
 
43
46
  async def log_streamer(
44
- request_id: Optional[str],
45
- log_path: pathlib.Path,
46
- plain_logs: bool = False,
47
- tail: Optional[int] = None,
48
- follow: bool = True,
49
- cluster_name: Optional[str] = None) -> AsyncGenerator[str, None]:
47
+ request_id: Optional[str],
48
+ log_path: pathlib.Path,
49
+ plain_logs: bool = False,
50
+ tail: Optional[int] = None,
51
+ follow: bool = True,
52
+ cluster_name: Optional[str] = None,
53
+ polling_interval: float = DEFAULT_POLL_INTERVAL
54
+ ) -> AsyncGenerator[str, None]:
50
55
  """Streams the logs of a request.
51
56
 
52
57
  Args:
@@ -84,6 +89,11 @@ async def log_streamer(
84
89
  f'scheduled: {request_id}')
85
90
  req_status = request_task.status
86
91
  req_msg = request_task.status_msg
92
+ # Slowly back off the database polling up to every 1 second, to avoid
93
+ # overloading the CPU and DB.
94
+ backoff = common_utils.Backoff(initial_backoff=polling_interval,
95
+ max_backoff_factor=10,
96
+ multiplier=1.2)
87
97
  while req_status < requests_lib.RequestStatus.RUNNING:
88
98
  if req_msg is not None:
89
99
  waiting_msg = request_task.status_msg
@@ -99,7 +109,7 @@ async def log_streamer(
99
109
  # TODO(aylei): we should use a better mechanism to avoid busy
100
110
  # polling the DB, which can be a bottleneck for high-concurrency
101
111
  # requests.
102
- await asyncio.sleep(0.1)
112
+ await asyncio.sleep(backoff.current_backoff())
103
113
  status_with_msg = await requests_lib.get_request_status_async(
104
114
  request_id, include_msg=True)
105
115
  req_status = status_with_msg.status
@@ -111,17 +121,20 @@ async def log_streamer(
111
121
 
112
122
  async with aiofiles.open(log_path, 'rb') as f:
113
123
  async for chunk in _tail_log_file(f, request_id, plain_logs, tail,
114
- follow, cluster_name):
124
+ follow, cluster_name,
125
+ polling_interval):
115
126
  yield chunk
116
127
 
117
128
 
118
129
  async def _tail_log_file(
119
- f: aiofiles.threadpool.binary.AsyncBufferedReader,
120
- request_id: Optional[str] = None,
121
- plain_logs: bool = False,
122
- tail: Optional[int] = None,
123
- follow: bool = True,
124
- cluster_name: Optional[str] = None) -> AsyncGenerator[str, None]:
130
+ f: aiofiles.threadpool.binary.AsyncBufferedReader,
131
+ request_id: Optional[str] = None,
132
+ plain_logs: bool = False,
133
+ tail: Optional[int] = None,
134
+ follow: bool = True,
135
+ cluster_name: Optional[str] = None,
136
+ polling_interval: float = DEFAULT_POLL_INTERVAL
137
+ ) -> AsyncGenerator[str, None]:
125
138
  """Tail the opened log file, buffer the lines and flush in chunks."""
126
139
 
127
140
  if tail is not None:
@@ -137,7 +150,7 @@ async def _tail_log_file(
137
150
  yield line_str
138
151
 
139
152
  last_heartbeat_time = asyncio.get_event_loop().time()
140
- last_cluster_status_check_time = asyncio.get_event_loop().time()
153
+ last_status_check_time = asyncio.get_event_loop().time()
141
154
 
142
155
  # Buffer the lines in memory and flush them in chunks to improve log
143
156
  # tailing throughput.
@@ -167,7 +180,17 @@ async def _tail_log_file(
167
180
 
168
181
  line: Optional[bytes] = await f.readline()
169
182
  if not line:
170
- if request_id is not None:
183
+ # Avoid checking the status too frequently to avoid overloading the
184
+ # DB.
185
+ should_check_status = (current_time -
186
+ last_status_check_time) >= polling_interval
187
+ if not follow:
188
+ # We will only hit this path once, but we should make sure to
189
+ # check the status so that we display the final request status
190
+ # if the request is complete.
191
+ should_check_status = True
192
+ if request_id is not None and should_check_status:
193
+ last_status_check_time = current_time
171
194
  req_status = await requests_lib.get_request_status_async(
172
195
  request_id)
173
196
  if req_status.status > requests_lib.RequestStatus.RUNNING:
@@ -185,20 +208,19 @@ async def _tail_log_file(
185
208
  ' cancelled\n')
186
209
  break
187
210
  if not follow:
211
+ # The below checks (cluster status, heartbeat) are not needed
212
+ # for non-follow logs.
188
213
  break
189
214
  # Provision logs pass in cluster_name, check cluster status
190
- # periodically to see if provisioning is done. We only
191
- # check once a second to avoid overloading the DB.
192
- check_status = (current_time - last_cluster_status_check_time
193
- ) >= _CLUSTER_STATUS_INTERVAL
194
- if cluster_name is not None and check_status:
215
+ # periodically to see if provisioning is done.
216
+ if cluster_name is not None and should_check_status:
217
+ last_status_check_time = current_time
195
218
  cluster_record = await (
196
219
  global_user_state.get_status_from_cluster_name_async(
197
220
  cluster_name))
198
221
  if (cluster_record is None or
199
222
  cluster_record != status_lib.ClusterStatus.INIT):
200
223
  break
201
- last_cluster_status_check_time = current_time
202
224
  if current_time - last_heartbeat_time >= _HEARTBEAT_INTERVAL:
203
225
  # Currently just used to keep the connection busy, refer to
204
226
  # https://github.com/skypilot-org/skypilot/issues/5750 for
@@ -234,9 +256,22 @@ async def _tail_log_file(
234
256
  yield chunk
235
257
 
236
258
 
259
+ def stream_response_for_long_request(
260
+ request_id: str,
261
+ logs_path: pathlib.Path,
262
+ background_tasks: fastapi.BackgroundTasks,
263
+ ) -> fastapi.responses.StreamingResponse:
264
+ return stream_response(request_id,
265
+ logs_path,
266
+ background_tasks,
267
+ polling_interval=LONG_REQUEST_POLL_INTERVAL)
268
+
269
+
237
270
  def stream_response(
238
- request_id: str, logs_path: pathlib.Path,
239
- background_tasks: fastapi.BackgroundTasks
271
+ request_id: str,
272
+ logs_path: pathlib.Path,
273
+ background_tasks: fastapi.BackgroundTasks,
274
+ polling_interval: float = DEFAULT_POLL_INTERVAL
240
275
  ) -> fastapi.responses.StreamingResponse:
241
276
 
242
277
  async def on_disconnect():
@@ -249,7 +284,7 @@ def stream_response(
249
284
  background_tasks.add_task(on_disconnect)
250
285
 
251
286
  return fastapi.responses.StreamingResponse(
252
- log_streamer(request_id, logs_path),
287
+ log_streamer(request_id, logs_path, polling_interval=polling_interval),
253
288
  media_type='text/plain',
254
289
  headers={
255
290
  'Cache-Control': 'no-cache, no-transform',
sky/utils/common_utils.py CHANGED
@@ -265,13 +265,16 @@ def get_global_job_id(job_timestamp: str,
265
265
 
266
266
  class Backoff:
267
267
  """Exponential backoff with jittering."""
268
- MULTIPLIER = 1.6
269
268
  JITTER = 0.4
270
269
 
271
- def __init__(self, initial_backoff: float = 5, max_backoff_factor: int = 5):
270
+ def __init__(self,
271
+ initial_backoff: float = 5,
272
+ max_backoff_factor: int = 5,
273
+ multiplier: float = 1.6):
272
274
  self._initial = True
273
275
  self._backoff = 0.0
274
276
  self._initial_backoff = initial_backoff
277
+ self._multiplier = multiplier
275
278
  self._max_backoff = max_backoff_factor * self._initial_backoff
276
279
 
277
280
  # https://github.com/grpc/grpc/blob/2d4f3c56001cd1e1f85734b2f7c5ce5f2797c38a/doc/connection-backoff.md
@@ -283,7 +286,7 @@ class Backoff:
283
286
  self._initial = False
284
287
  self._backoff = min(self._initial_backoff, self._max_backoff)
285
288
  else:
286
- self._backoff = min(self._backoff * self.MULTIPLIER,
289
+ self._backoff = min(self._backoff * self._multiplier,
287
290
  self._max_backoff)
288
291
  self._backoff += random.uniform(-self.JITTER * self._backoff,
289
292
  self.JITTER * self._backoff)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20251009
3
+ Version: 1.0.0.dev20251011
4
4
  Summary: SkyPilot: Run AI on Any Infra — Unified, Faster, Cheaper.
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -155,51 +155,51 @@ Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "server"
155
155
  Requires-Dist: aiosqlite; extra == "server"
156
156
  Requires-Dist: greenlet; extra == "server"
157
157
  Provides-Extra: all
158
+ Requires-Dist: google-cloud-storage; extra == "all"
159
+ Requires-Dist: ray[default]>=2.6.1; extra == "all"
158
160
  Requires-Dist: nebius>=0.2.47; extra == "all"
161
+ Requires-Dist: awscli>=1.27.10; extra == "all"
162
+ Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
163
+ Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "all"
164
+ Requires-Dist: azure-core>=1.24.0; extra == "all"
165
+ Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
166
+ Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
159
167
  Requires-Dist: websockets; extra == "all"
160
- Requires-Dist: azure-core>=1.31.0; extra == "all"
161
- Requires-Dist: msgraph-sdk; extra == "all"
168
+ Requires-Dist: passlib; extra == "all"
169
+ Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
162
170
  Requires-Dist: ibm-cloud-sdk-core; extra == "all"
163
- Requires-Dist: google-cloud-storage; extra == "all"
164
- Requires-Dist: casbin; extra == "all"
171
+ Requires-Dist: ibm-cos-sdk; extra == "all"
172
+ Requires-Dist: azure-identity>=1.19.0; extra == "all"
173
+ Requires-Dist: kubernetes!=32.0.0,>=20.0.0; extra == "all"
174
+ Requires-Dist: pyjwt; extra == "all"
175
+ Requires-Dist: pydo>=0.3.0; extra == "all"
176
+ Requires-Dist: aiohttp; extra == "all"
165
177
  Requires-Dist: ibm-platform-services>=0.48.0; extra == "all"
178
+ Requires-Dist: colorama<0.4.5; extra == "all"
179
+ Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
180
+ Requires-Dist: anyio; extra == "all"
181
+ Requires-Dist: oci; extra == "all"
182
+ Requires-Dist: greenlet; extra == "all"
166
183
  Requires-Dist: ecsapi>=0.2.0; extra == "all"
167
- Requires-Dist: awscli>=1.27.10; extra == "all"
168
- Requires-Dist: sqlalchemy_adapter; extra == "all"
169
184
  Requires-Dist: msrestazure; extra == "all"
170
- Requires-Dist: protobuf<7.0.0,>=5.26.1; extra == "all"
185
+ Requires-Dist: boto3>=1.26.1; extra == "all"
186
+ Requires-Dist: msgraph-sdk; extra == "all"
187
+ Requires-Dist: casbin; extra == "all"
171
188
  Requires-Dist: ibm-vpc; extra == "all"
172
- Requires-Dist: ray[default]>=2.6.1; extra == "all"
173
- Requires-Dist: anyio; extra == "all"
174
- Requires-Dist: runpod>=1.6.1; extra == "all"
175
- Requires-Dist: google-api-python-client>=2.69.0; extra == "all"
176
- Requires-Dist: greenlet; extra == "all"
177
- Requires-Dist: ibm-cos-sdk; extra == "all"
178
- Requires-Dist: docker; extra == "all"
179
- Requires-Dist: azure-common; extra == "all"
180
189
  Requires-Dist: python-dateutil; extra == "all"
181
- Requires-Dist: tomli; python_version < "3.11" and extra == "all"
182
- Requires-Dist: pyjwt; extra == "all"
183
190
  Requires-Dist: botocore>=1.29.10; extra == "all"
184
- Requires-Dist: azure-core>=1.24.0; extra == "all"
185
- Requires-Dist: colorama<0.4.5; extra == "all"
186
- Requires-Dist: passlib; extra == "all"
187
- Requires-Dist: azure-mgmt-compute>=33.0.0; extra == "all"
188
- Requires-Dist: pyopenssl<24.3.0,>=23.2.0; extra == "all"
189
191
  Requires-Dist: vastai-sdk>=0.1.12; extra == "all"
192
+ Requires-Dist: grpcio>=1.63.0; extra == "all"
193
+ Requires-Dist: azure-cli>=2.65.0; extra == "all"
194
+ Requires-Dist: tomli; python_version < "3.11" and extra == "all"
190
195
  Requires-Dist: aiosqlite; extra == "all"
191
- Requires-Dist: aiohttp; extra == "all"
196
+ Requires-Dist: runpod>=1.6.1; extra == "all"
192
197
  Requires-Dist: cudo-compute>=0.1.10; extra == "all"
193
- Requires-Dist: pyvmomi==8.0.1.0.2; extra == "all"
194
- Requires-Dist: boto3>=1.26.1; extra == "all"
195
- Requires-Dist: pydo>=0.3.0; extra == "all"
196
- Requires-Dist: azure-cli>=2.65.0; extra == "all"
197
- Requires-Dist: azure-identity>=1.19.0; extra == "all"
198
- Requires-Dist: kubernetes!=32.0.0,>=20.0.0; extra == "all"
199
- Requires-Dist: azure-storage-blob>=12.23.1; extra == "all"
200
- Requires-Dist: azure-mgmt-network>=27.0.0; extra == "all"
201
- Requires-Dist: grpcio>=1.63.0; extra == "all"
202
- Requires-Dist: oci; extra == "all"
198
+ Requires-Dist: azure-common; extra == "all"
199
+ Requires-Dist: sqlalchemy_adapter; extra == "all"
200
+ Requires-Dist: docker; extra == "all"
201
+ Requires-Dist: google-api-python-client>=2.69.0; extra == "all"
202
+ Requires-Dist: azure-core>=1.31.0; extra == "all"
203
203
  Dynamic: author
204
204
  Dynamic: classifier
205
205
  Dynamic: description
@@ -1,4 +1,4 @@
1
- sky/__init__.py,sha256=VBoSJNGIYKBa65awxYvg4v5V4B51muKT45hbukiiBh8,6713
1
+ sky/__init__.py,sha256=N7LSSmftSCZ8e_XeFLtZYZzS4gjz7YHnoXcd0nz_ENA,6713
2
2
  sky/admin_policy.py,sha256=XdcJnYqmude-LGGop-8U-FeiJcqtfYsYtIy4rmoCJnM,9799
3
3
  sky/authentication.py,sha256=oOY5TmvqLXQslUNDPAe2aNFZ1qi7igDM-Mp4GfAQ2hw,24066
4
4
  sky/check.py,sha256=hBDTkiADC3HFfO6brZV819FVWcdOs3aiuhB6x6mY4Q4,29728
@@ -38,7 +38,7 @@ sky/adaptors/vsphere.py,sha256=zJP9SeObEoLrpgHW2VHvZE48EhgVf8GfAEIwBeaDMfM,2129
38
38
  sky/backends/__init__.py,sha256=l1xXpkzPFMma0ZkT4GzVMu7uvgS3AsECg6zLc0S3JHQ,702
39
39
  sky/backends/backend.py,sha256=zmF6TuKtUwzsP1hq0TI9nuuUySlPc9sgeW6F4GC8Ckk,8352
40
40
  sky/backends/backend_utils.py,sha256=qbewVFNHQlinc4Wvn6ewocv3nash0X6RuDPOgyLXvFY,177499
41
- sky/backends/cloud_vm_ray_backend.py,sha256=FL2pk-QQyi4HNtEIevf0PH9856VNiK4toqyFJAE8fxk,308398
41
+ sky/backends/cloud_vm_ray_backend.py,sha256=er8BcbWZj1_Y_T9hLjcIPzQ038ww4kI7pumQu3D_n1E,308450
42
42
  sky/backends/docker_utils.py,sha256=_EhM6NStZDAwcegppQqExaB5iuSn1qL4xFFUqXAz2Uk,8392
43
43
  sky/backends/local_docker_backend.py,sha256=ncc8-WJrMRnqPl9fzvGr-nftIz7tTzKtUi-p_z_nH60,17366
44
44
  sky/backends/wheel_utils.py,sha256=DE71Muq5qLRhGpCVg1Rb6YOI7S_BzT8Hak27Pz8L4yw,12486
@@ -87,7 +87,7 @@ sky/client/sdk.py,sha256=zlIhCbrIhzYsqL1SUW3onmu2xDYTleSKBSLuDm6Z13o,107483
87
87
  sky/client/sdk_async.py,sha256=8G_E9Dn4d80rV-wxRH4zZUXZGAm6rLw3C8PI07fXwwQ,31106
88
88
  sky/client/service_account_auth.py,sha256=5jXk0G6ufuW-SHCO7BEHQeTO0_2a8KfFmA63auXFRj4,1529
89
89
  sky/client/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
- sky/client/cli/command.py,sha256=8LuQpQKmT8Wm_dloI2vFj7wm8TVehuJlkmRUm-VVEWQ,250333
90
+ sky/client/cli/command.py,sha256=fqEiu4GsRz2Zi3ZIE9oYp7B_oGxgYArVewuWDnyh1G8,250525
91
91
  sky/client/cli/deprecation_utils.py,sha256=H_d5UyF2CekEoThduAzt5cihBO8hwKYMu0-Wqfbjv5E,3370
92
92
  sky/client/cli/flags.py,sha256=lLXHooU4HEslbHJuGAiCrKYkJZx99hAKaJbstw7s1bc,12136
93
93
  sky/client/cli/table_utils.py,sha256=HT_y__9_tZLKJ0aJu-hh67cu3NXfWDoiHir5fTmWaDw,10156
@@ -119,17 +119,19 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
119
119
  sky/clouds/utils/gcp_utils.py,sha256=09MF4Vx0EW7S-GXGpyxpl2aQlHrqeu9ioV0nyionAyk,9890
120
120
  sky/clouds/utils/oci_utils.py,sha256=TFqAqRLggg4Z0bhxrrq8nouSSomZy-ub1frHXEkud2M,7302
121
121
  sky/clouds/utils/scp_utils.py,sha256=VGuccVO5uFGr8-yolWSoYrgr11z6cIeDBGcqkBzAyOs,18409
122
- sky/dashboard/out/404.html,sha256=mOIttA8Srd5zBYsZAxHWrSm6fZDW0rCsqms-f-i4i04,1423
123
- sky/dashboard/out/clusters.html,sha256=5QuxuHxV8TgO3A_ZUr6Mw3xIaMKTlkDWsLmpC58YVw0,1418
124
- sky/dashboard/out/config.html,sha256=nyke4vFkPbLYUgZglNayZrIBo2b30J2VQSkQE-bllSk,1414
122
+ sky/dashboard/out/404.html,sha256=iHTtcdePx8fU8_uYwRLH3bhmyk9qnyP1pFAoBD7TBoI,1423
123
+ sky/dashboard/out/clusters.html,sha256=b8Jjo729-EV3C94KE6zU2n6gf5WScog8TaAgj65BZs4,1418
124
+ sky/dashboard/out/config.html,sha256=wN89ofAmCnj9024H9sRHc6q2HP8FKXdntzYvI6tAjY0,1414
125
125
  sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
126
- sky/dashboard/out/index.html,sha256=oBlMfKod5hdiPnlfFiuTtHrb958GemK3qjiiL2ljLq0,1407
127
- sky/dashboard/out/infra.html,sha256=9I0lujnx9uGCowfM_5IMd8qKVm4fH1uwcHkeVugN4Wo,1412
128
- sky/dashboard/out/jobs.html,sha256=W72YO7AZU4IzcrbHV5tyWxEfnR1qCWO4HQdtfOKssZA,1410
126
+ sky/dashboard/out/index.html,sha256=VdXFlocm4-TD1lyD4ogWUQLb9l1p76S4OhxtLQOTYTg,1407
127
+ sky/dashboard/out/infra.html,sha256=FDE_mEvMMmwMX1LjMZcTxSxfekPpZ5ZNFijMHHnNUIg,1412
128
+ sky/dashboard/out/jobs.html,sha256=EpJ49nAOQRyQ9DEa8wszW1AFCwFg5BJcoIkZwW8MBFg,1410
129
129
  sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
130
- sky/dashboard/out/users.html,sha256=SxC9W9Xuvh-VtYy3NLvUE5bJ8U0Vnkj91gPU7ZALYbs,1412
131
- sky/dashboard/out/volumes.html,sha256=Ghidhe836x0v-ViCUGnzjXZoCSOdz3L3SlD7ISPPYg4,1416
132
- sky/dashboard/out/workspaces.html,sha256=sY4xSDLjWzo4Tlq1e8ildKjrqqcrN8kizmTXoFryB9M,1422
130
+ sky/dashboard/out/users.html,sha256=IRThL7x5FFIbcmCBH2DYQR0X9JFv_dOc2JHTClQTMrM,1412
131
+ sky/dashboard/out/volumes.html,sha256=9rCu2MHChxJN4rqlgP6jUb92aXJKvkxy_xs41plhJcI,1416
132
+ sky/dashboard/out/workspaces.html,sha256=y_b4XFUQn9wC5a5AVKhV_8LfgGGM3gURAH-kNf0WLLQ,1422
133
+ sky/dashboard/out/_next/static/Xs6jdcfyNaUuBO8jmzU9_/_buildManifest.js,sha256=1ombZKzLAegWk-mEKBFMtiwI-xk8sWY2rYidGQBNj7Y,2394
134
+ sky/dashboard/out/_next/static/Xs6jdcfyNaUuBO8jmzU9_/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
133
135
  sky/dashboard/out/_next/static/chunks/1121-d0782b9251f0fcd3.js,sha256=jIvnDxaTleAz3HdZK9-RScSB0ZMg8-D63KQmn8avaHI,8883
134
136
  sky/dashboard/out/_next/static/chunks/1141-3b40c39626f99c89.js,sha256=M5vM2c9SRPEly-CQj0Vj7wJzyFSyuALDik9KFLXWmec,18285
135
137
  sky/dashboard/out/_next/static/chunks/1272-1ef0bf0237faccdb.js,sha256=VJ6y-Z6Eg2T93hQIRfWAbjAkQ7nQhglmIaVbEpKSILY,38451
@@ -137,7 +139,7 @@ sky/dashboard/out/_next/static/chunks/1871-49141c317f3a9020.js,sha256=hUHiB-SESv
137
139
  sky/dashboard/out/_next/static/chunks/2350.fab69e61bac57b23.js,sha256=TQCHO4AUL9MZo1e_8GOiL8y6vjQpj5tdXZ8oCKwM1LA,271
138
140
  sky/dashboard/out/_next/static/chunks/2369.fc20f0c2c8ed9fe7.js,sha256=qkKMDvgq-AVeC811VipJzXHAB__R4G2eHj-I-7_N2Ek,8177
139
141
  sky/dashboard/out/_next/static/chunks/2755.97300e1362fe7c98.js,sha256=zNlZ7a_yzrFWXrSy0Lnt7Akp4YU-2jP6pP22sc9F9jY,50173
140
- sky/dashboard/out/_next/static/chunks/3015-8d748834fcc60b46.js,sha256=tj3H7To9B1N0JYiKiOjl-9n6BxWftbuDIuN7kKPtzrg,39407
142
+ sky/dashboard/out/_next/static/chunks/3015-7e0e8f06bb2f881c.js,sha256=MxchpmVa6gnQdTEN3IErojpa0hKmljOS0P6-w0U9Ufg,39230
141
143
  sky/dashboard/out/_next/static/chunks/3294.1fafbf42b3bcebff.js,sha256=omOoN6E5JWJ1Du3e_WhRBJeTdsTip05pJjwaLOd0ihI,42452
142
144
  sky/dashboard/out/_next/static/chunks/3785.a19328ba41517b8b.js,sha256=NWRf7Qtfo6EGSJWrdFfhaHw3CbrWVujT8oiiNAcipNk,4538
143
145
  sky/dashboard/out/_next/static/chunks/3850-ff4a9a69d978632b.js,sha256=XphBY9psNzmvGD28zgDunQEb-TX0_eOVaElmcuOjD1g,7455
@@ -165,7 +167,7 @@ sky/dashboard/out/_next/static/chunks/framework-cf60a09ccd051a10.js,sha256=_Qbam
165
167
  sky/dashboard/out/_next/static/chunks/main-app-587214043926b3cc.js,sha256=t7glRfataAjNw691Wni-ZU4a3BsygRzPKoI8NOm-lsY,116244
166
168
  sky/dashboard/out/_next/static/chunks/main-f15ccb73239a3bf1.js,sha256=jxOPLDVX3rkMc_jvGx2a-N2v6mvfOa8O6V0o-sLT0tI,110208
167
169
  sky/dashboard/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
168
- sky/dashboard/out/_next/static/chunks/webpack-6a5ddd0184bfa22c.js,sha256=hTbYeLv41ycQEMDb_cwa8hWx4tx-jsLk2zjKvuWRp2Q,4770
170
+ sky/dashboard/out/_next/static/chunks/webpack-66f23594d38c7f16.js,sha256=-I_5dIeLkBzeXUkajoN-Bp72fpfSGN3b4cefd134guY,4770
169
171
  sky/dashboard/out/_next/static/chunks/pages/_app-ce361c6959bc2001.js,sha256=mllo4Yasw61zRtEO49uE_MrAutg9josSJShD0DNSjf0,95518
170
172
  sky/dashboard/out/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
171
173
  sky/dashboard/out/_next/static/chunks/pages/clusters-2f61f65487f6d8ff.js,sha256=oo_EAAsi1TLXO-art_64PTCZjakwl-7wVUZnB3-SJK8,869
@@ -179,25 +181,23 @@ sky/dashboard/out/_next/static/chunks/pages/workspaces-69c80d677d3c2949.js,sha25
179
181
  sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-477555ab7c0b13d8.js,sha256=ayTps6hRnExScjIMxgIjOM3C7loY8Nh-xgHi5LW3TgM,18462
180
182
  sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8f058b0346db2aff.js,sha256=NTKiOQ3iFYPM9OIi-n4BYOsH5HzhPyXOCPg-y6PrAJc,26585
181
183
  sky/dashboard/out/_next/static/chunks/pages/infra/[context]-553b8b5cb65e100b.js,sha256=UVXo5C-h3U7cxfP1O2cN8o8Y6r1HAw3uXTI_hHPUdjw,847
182
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4f7079dcab6ed653.js,sha256=3HxL3dCowhvYQ9-5AmwqmYDXqBoA3hzmcTJ97tYOcOg,29632
184
+ sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-e5c9ce6a24fc0de4.js,sha256=hDNA4CVUzNVLGGQDZJxWmam2c2kCg0RDWTWRp0YPP6A,29936
183
185
  sky/dashboard/out/_next/static/chunks/pages/jobs/pools/[pool]-bc979970c247d8f3.js,sha256=5eIt_lFp0D_BEUV71mu4rNxapiZpB8368SMtRbh-Qec,26183
184
186
  sky/dashboard/out/_next/static/chunks/pages/workspace/new-3f88a1c7e86a3f86.js,sha256=83s5N5CZwIaRcmYMfqn2we60n2VRmgFw6Tbx18b8-e0,762
185
187
  sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-e8688c35c06f0ac5.js,sha256=TVmk0pD0iszL39u2Ru56HLEFFLO648NeT2KbEcW5X5o,1495
186
188
  sky/dashboard/out/_next/static/css/4614e06482d7309e.css,sha256=nk6GriyGVd1aGXrLd7BcMibnN4v0z-Q_mXGxrHFWqrE,56126
187
- sky/dashboard/out/_next/static/hIViZcQBkn0HE8SpaSsUU/_buildManifest.js,sha256=fDgBu-xWtz2NSaqaba9lDtZnk99IYF9DFALmyg5noEE,2394
188
- sky/dashboard/out/_next/static/hIViZcQBkn0HE8SpaSsUU/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
189
- sky/dashboard/out/clusters/[cluster].html,sha256=i8IaGQ2jKHgVADjimkp-5Em-L_Sqqy5d--cgZOTVfak,2937
190
- sky/dashboard/out/clusters/[cluster]/[job].html,sha256=UHRpFy-epu7U5OZnTjbnxY1HVGAbilm2xWVWQWItx6g,2073
191
- sky/dashboard/out/infra/[context].html,sha256=IBBwjXQWBgl28k-haZAHflwSoTj2rb6EuBGp0ySwz4Y,1436
192
- sky/dashboard/out/jobs/[job].html,sha256=tQUhWnfWd8uiHcqoYws_TE0xy5g5yfCDXwndQ717EjQ,2305
193
- sky/dashboard/out/jobs/pools/[pool].html,sha256=pua8XVUAB1s_KBD8Bc1F18eWE2q7a0wxFhkdYsxeUrU,2143
189
+ sky/dashboard/out/clusters/[cluster].html,sha256=EA15bGlRjhBkedbuVKo0Zqqnhr6dUa4SN1Izv_OH_So,2937
190
+ sky/dashboard/out/clusters/[cluster]/[job].html,sha256=PYDTv2sId3KrtezjCDXEmaYblWvqsiz2h11U81QMv0U,2073
191
+ sky/dashboard/out/infra/[context].html,sha256=UvBTaYbJKaDRHyOHKHYhm71T5SboyvpoWcu9TiyHnC0,1436
192
+ sky/dashboard/out/jobs/[job].html,sha256=8nlZAZChf0cbTzD9jPH_b2xP2Ki7uHj19lxfH6XSESs,2305
193
+ sky/dashboard/out/jobs/pools/[pool].html,sha256=XrYw9Ee2mjjSKsz1At5BeSpjEDYWMQ_k418bPNQ86f0,2143
194
194
  sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
195
- sky/dashboard/out/workspace/new.html,sha256=Ami7tV5DzBCafGKUyIgC-Jov4EaVp7ZA4sUvVwEM9jo,1428
196
- sky/dashboard/out/workspaces/[name].html,sha256=fLtzwgR4DJQXxRhXilPTMVfzmKeLhEZ_zfL75uH-jBs,2759
195
+ sky/dashboard/out/workspace/new.html,sha256=0fDNuy3rMSGKlfKpAis2XmfLOR-oD8BfdT4M2E61514,1428
196
+ sky/dashboard/out/workspaces/[name].html,sha256=I4h8DCGMp_4dssa1LwHn5mH7gwP2TVl4O_UsVFPhBpY,2759
197
197
  sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
198
198
  sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
199
199
  sky/data/data_utils.py,sha256=AjEA_JRjo9NBMlv-Lq5iV4lBED_YZ1VqBR9pG6fGVWE,35179
200
- sky/data/mounting_utils.py,sha256=QZjcSNB3HiQgzIodbx0I-IyKaW_XUzUuNTpgJAZAfEk,24594
200
+ sky/data/mounting_utils.py,sha256=trsjpEfQmsctEi6OHMKVSL915OEDdrQVlwTlkXrd4r0,26479
201
201
  sky/data/storage.py,sha256=y6cIgfmhgL8ldjHR7whg2q71TzFQ3Lxiyv6d3anC62I,209290
202
202
  sky/data/storage_utils.py,sha256=bqCE7WQVOpFMxqVRkxee4oLn-iImh4ZL8qB5IicXh0w,14230
203
203
  sky/jobs/__init__.py,sha256=BiABNdlab7xZDOv4C34kc1XuxG6C_Ip7Q96mT2iCnIg,1686
@@ -212,7 +212,7 @@ sky/jobs/client/sdk.py,sha256=HQdnZtK-yWXvOX5XEVZU145vIzfCvYZFtL6uzQEm6-c,17133
212
212
  sky/jobs/client/sdk_async.py,sha256=hsyPshdpbKG0RUzw2ntDeAJAkOIl-O9WDoSREV_km3o,4875
213
213
  sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
214
214
  sky/jobs/server/core.py,sha256=MMSYH-dHNK7DfCzG0tl35ft5a975mQhRNYA5skqKakA,48351
215
- sky/jobs/server/server.py,sha256=oCFOE58oSXspgxIj4BaPIkqTrH0SUzgH0c__OG4Wc60,8894
215
+ sky/jobs/server/server.py,sha256=jSMq_hqfj0Lhjd-MTeD_oH_EpuYTB7cU9cHCMymToHg,8928
216
216
  sky/jobs/server/utils.py,sha256=rI_fVyEJhHjuapcB6JefkKgRuT_VeLiubAixsPo5jj0,5023
217
217
  sky/logs/__init__.py,sha256=zW4gAEvWDz5S53FlLp3krAuKrmTSJ0e3kZDnhxSbW4E,722
218
218
  sky/logs/agent.py,sha256=Jwpzio10P45BS6cugt6Ovu3_ZhysuXVcL_aneYZQENE,4766
@@ -265,10 +265,10 @@ sky/provision/hyperbolic/utils.py,sha256=NCa3ULvIi64-YHYoOnPd3SShlJ6VuQsEwaTBqHF
265
265
  sky/provision/kubernetes/__init__.py,sha256=xUHCbN5fkbnM5_E1trFHHOndTsvEwBdi-8qvvpK92io,1030
266
266
  sky/provision/kubernetes/config.py,sha256=iY6WfgmRK_z5mzHGe_8hQS2Op3qKmZ18UY2MgArIGRE,27782
267
267
  sky/provision/kubernetes/constants.py,sha256=vZJQsAVjAgwsOskB48tIFSXtNw7IFnJOQE_H6N-vOYQ,1130
268
- sky/provision/kubernetes/instance.py,sha256=LTD1XAhoNpR3tJRBLquASp9dWL3bSr5zKrz_R6VDtAc,76669
268
+ sky/provision/kubernetes/instance.py,sha256=ZAw6KkvuSwNXzAUN3-FTgCspnAyGtUaWb4YOoWU5fzE,75718
269
269
  sky/provision/kubernetes/network.py,sha256=Dgj8u7IQBHKHt-mSDhYzue1wfDk96FR_8fO89TwuZ2E,12846
270
270
  sky/provision/kubernetes/network_utils.py,sha256=qFiACDq4S1WKMyVbxhGax-K2SJM-4viC8CyEzwvXt6c,11480
271
- sky/provision/kubernetes/utils.py,sha256=wfCd0l7OXEJXYCtQDElR9X_b4-NcBMGhpBV72qhbJ4Q,152115
271
+ sky/provision/kubernetes/utils.py,sha256=2pouuLaWndZNn3DfjtcqjALf6tLnHG2PIwbr2Hv_9xg,153486
272
272
  sky/provision/kubernetes/volume.py,sha256=b5mozvUCw9rsGxiUS9LxR-MyELK-EQHYglJkGTFNobY,11473
273
273
  sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml,sha256=5oDGZUsDpO1B9E9JZptkakdIy7LWVR_CqHFFZpMulJE,1270
274
274
  sky/provision/lambda_cloud/__init__.py,sha256=6EEvSgtUeEiup9ivIFevHmgv0GqleroO2X0K7TRa2nE,612
@@ -362,7 +362,7 @@ sky/schemas/generated/servev1_pb2.pyi,sha256=HSjaksOAoaoNLzaWzqwN4UVwHel7BKhVZa9
362
362
  sky/schemas/generated/servev1_pb2_grpc.py,sha256=1tlAqxEjbQiXQSx8KniWWigUMwrxA6ocOjmGM-9UOgY,13657
363
363
  sky/serve/__init__.py,sha256=jlwErB4VeKh0wp9FkTIQoE5JQvc6KIB-vrqhtsJ2q-E,1810
364
364
  sky/serve/autoscalers.py,sha256=DBMf5AyH1PBrTMGPElHzMe_nMg1TQAM4R1tKJvEwRvk,48666
365
- sky/serve/constants.py,sha256=VYQKGuwaPI9o2xC5HzB0TGKdiMeE9gOiX82K5yGEfGg,5062
365
+ sky/serve/constants.py,sha256=VXzFs207N9Pxa-ZUJjRBGMGvffhr0ernOATXDZXbGic,5250
366
366
  sky/serve/controller.py,sha256=lyB6EHIfEMqKg-gshFLKUHEZqs77ufsD_ev6catz10Q,13975
367
367
  sky/serve/load_balancer.py,sha256=gQpjOwnpu2HLdymbYCeCgJodDklMEwYMGgYU9ThXHPM,15774
368
368
  sky/serve/load_balancing_policies.py,sha256=hhPrcuwT_rEJx4DMRC6iuLpUY8wOabUtXtPK7clg1F8,10148
@@ -371,7 +371,7 @@ sky/serve/serve_rpc_utils.py,sha256=6MTwPRt7h0pVnOthO4JUs1UEBbCLZ-prd-Pzjy_QPmw,
371
371
  sky/serve/serve_state.py,sha256=pRtxWBagIUUvgrKNZ51-9xfW0hadSGILIMzVRzm_0IU,33321
372
372
  sky/serve/serve_utils.py,sha256=G-enI29qHA-hLzej3G7AibSqv6lPy6PVC_w0Mm2colU,70833
373
373
  sky/serve/service.py,sha256=IYyMGYIu_TZtcjtao67H_Qm9WX358AiTOiHJbpcl5eQ,18365
374
- sky/serve/service_spec.py,sha256=5AjPXjtqc4e1CJWHiH998suRJMkHcQHi4mUaX52_Mhs,24800
374
+ sky/serve/service_spec.py,sha256=INa1Gno8GUgYlqsgzwSkIbZAKhbZ0mVNPw3d7jjgx3I,25056
375
375
  sky/serve/spot_placer.py,sha256=auRlYZNg8uIW-lxiirxpDP-iIaJtkrhesm6OGMgwPq4,11288
376
376
  sky/serve/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
377
377
  sky/serve/client/impl.py,sha256=ZukLKNyEtDnl24GEI6tg9b76RkSpAs5mj6PcYO57W18,10741
@@ -380,7 +380,7 @@ sky/serve/client/sdk_async.py,sha256=idvbLb6q_NBo79OnXE-3SF-bwYFMPzDg_khiNqOLd3o
380
380
  sky/serve/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
381
381
  sky/serve/server/core.py,sha256=4w79PONDX5hAem95U1MRDHZ1VNMaBZJkI6hv5d2IKjQ,11011
382
382
  sky/serve/server/impl.py,sha256=oQL6qd-rTq9M7Qs3n-fCv0vyQe1F9dAid_OgmRCjyjs,48982
383
- sky/serve/server/server.py,sha256=DzTOQ69FcNoSmA_wCV0RcHD66_nuDzXVcULhTpMqOhU,4519
383
+ sky/serve/server/server.py,sha256=KPbYYUlTK3LEqrDd8q-9gsKu-gF8hXWjdMTFLhaoguM,4536
384
384
  sky/server/__init__.py,sha256=MPPBqFzXz6Jv5QSk6td_IcvnfXfNErDZVcizu4MLRow,27
385
385
  sky/server/common.py,sha256=spZ2skXS2A7eD-90LSpDs7gbSH2b0RWvUV4I3CixyB4,40342
386
386
  sky/server/config.py,sha256=oQO2Wls01oYIIr4h7B6UiPBNPcsqHlCJ3batir-Zx80,11143
@@ -388,9 +388,9 @@ sky/server/constants.py,sha256=9hLNn1FsBegnMxoQzYfgHIVPIqon7KufzG4G9yqhS-o,2456
388
388
  sky/server/daemons.py,sha256=XQdqRMVyxyqS9fY2HLqW_cxVR6qgqoQ7irPvRYWvG7E,9092
389
389
  sky/server/metrics.py,sha256=8mTyD-zo2gyAJSPJyCtTR8oImeFJ2K-sAdlje5Bf5U4,5781
390
390
  sky/server/rest.py,sha256=295lCvmAJhGTaal2P00ab6z0fxGj4KfxdI94E-2AhQA,14414
391
- sky/server/server.py,sha256=vlx8Z2S4hXYzNhnuipZDvnoz4S8s-9-1AfoCIoZ25_M,83965
391
+ sky/server/server.py,sha256=ce4vrz4LP5zm_-uvkkBWg2WyEda6QWuNyJtcMSC8PmA,84261
392
392
  sky/server/state.py,sha256=YbVOMJ1JipQQv17gLIGyiGN7MKfnP83qlUa5MB1z0Yk,747
393
- sky/server/stream_utils.py,sha256=b8gdWTsvxTnm779mMSdgb1LR_giVP9peKJIn8KIPJKU,10673
393
+ sky/server/stream_utils.py,sha256=V_sZWx9ppPHo4YuoN21zT6asttQlTnF2hb3FgmfpIMY,12136
394
394
  sky/server/uvicorn.py,sha256=lJROnpJqoZr59zGwYa_pUniV7rEwmZn0PV4t-YYY-yo,11832
395
395
  sky/server/versions.py,sha256=3atZzUa7y1XeKNcrfVxKWAo_5ZyCOnbY7DKpIqed7Do,10011
396
396
  sky/server/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -401,7 +401,7 @@ sky/server/html/log.html,sha256=TSGZktua9Ysl_ysg3w60rjxAxhH61AJnsYDHdtqrjmI,6929
401
401
  sky/server/html/token_page.html,sha256=eUndS5u1foL9vaWGPRTLMt7lCzD1g0wYJ2v_EeeFzlc,7046
402
402
  sky/server/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
403
403
  sky/server/requests/event_loop.py,sha256=OhpPbuce65bbjpGRlcJa78AVnYSm08SzFKt70ypCUuQ,1211
404
- sky/server/requests/executor.py,sha256=ILkqZC331VZiZsRim6IdiI7O_SvShKQzC5J8eMT0F1E,34256
404
+ sky/server/requests/executor.py,sha256=WDZoy6ijIuCBh5LHS6-1YepsLjf0YVHX2v4hfk048u4,34197
405
405
  sky/server/requests/payloads.py,sha256=4ZXDJuu35lQiQ06aJNfTzSGQxCGSxZZgBsAWcf3nKJc,28022
406
406
  sky/server/requests/preconditions.py,sha256=En-mSIe8JXDkiRCMlpgyJGFgYDnhthGReihV5u0oqy8,7283
407
407
  sky/server/requests/process.py,sha256=UpJp5rZizNMFRCNRtudFSjbcJhFarFbtAGDWI9x_ZyE,13197
@@ -499,7 +499,7 @@ sky/utils/cluster_utils.py,sha256=PxVIVCBPA8qKkKvrF7bImDC1jhUZeJDADYtV-ELTZXE,15
499
499
  sky/utils/command_runner.py,sha256=Q30y89HaxMUZ_57h1TAWxhI3c6V_QGwL0yuvkZ3eR48,51241
500
500
  sky/utils/command_runner.pyi,sha256=FE8lFyxsh6528uSeSS38yk9Yu9HSJ8LFJT0ylMWNR6k,10618
501
501
  sky/utils/common.py,sha256=yJc110y8rwcBIKEJgb8kUD4e1OeolFEVtonwmqtAxCM,2729
502
- sky/utils/common_utils.py,sha256=5_dNGrFtvylmi38HTMLSgxHLbeBgNCr9UH8BDSUbQeI,39053
502
+ sky/utils/common_utils.py,sha256=3p-x8pU5tAFxJ95eW-KpY-aRPTGqL6ZvMbUO_iSiPVM,39147
503
503
  sky/utils/config_utils.py,sha256=agfDWJi79DH5XKD_GBvUwhRwmB0-ZkYbKCjcEgV6gP4,13861
504
504
  sky/utils/context.py,sha256=N_kxD3NXBGRqzb8QsSkrGLvqBt_dD7bIkyerGIOJEcE,13394
505
505
  sky/utils/context_utils.py,sha256=eMXSaEK1EKDnWNgNT12mAQ2cC1B8XaQcF5cqs5jxiIc,7294
@@ -566,9 +566,9 @@ sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
566
566
  sky/workspaces/core.py,sha256=kRrdh-8MhX1953pML1B_DoStnDuNrsmHcZlnWoAxVo0,27218
567
567
  sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
568
568
  sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
569
- skypilot_nightly-1.0.0.dev20251009.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
570
- skypilot_nightly-1.0.0.dev20251009.dist-info/METADATA,sha256=mAE11fFTmI2AWxGKxcVJnNH2WdVzmI7zczSKKBDtIik,20454
571
- skypilot_nightly-1.0.0.dev20251009.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
572
- skypilot_nightly-1.0.0.dev20251009.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
573
- skypilot_nightly-1.0.0.dev20251009.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
574
- skypilot_nightly-1.0.0.dev20251009.dist-info/RECORD,,
569
+ skypilot_nightly-1.0.0.dev20251011.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
570
+ skypilot_nightly-1.0.0.dev20251011.dist-info/METADATA,sha256=mdB_WExr69ksSXsZnel8RJhtn75sYiVSL3owVTtGOjQ,20454
571
+ skypilot_nightly-1.0.0.dev20251011.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
572
+ skypilot_nightly-1.0.0.dev20251011.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
573
+ skypilot_nightly-1.0.0.dev20251011.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
574
+ skypilot_nightly-1.0.0.dev20251011.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3015],{23015:function(e,s,t){t.r(s),t.d(s,{ClusterJobs:function(){return H},ManagedJobs:function(){return Z},ManagedJobsTable:function(){return B},Status2Actions:function(){return q},filterJobsByName:function(){return J},filterJobsByPool:function(){return O},filterJobsByUser:function(){return W},filterJobsByWorkspace:function(){return U},statusGroups:function(){return z}});var r=t(85893),a=t(67294),l=t(11163),n=t(41664),i=t.n(n),c=t(55739),o=t(30803),d=t(37673),u=t(68764),h=t(36989),x=t(51214),m=t(68969),p=t(6378);class j{_generateFilterKey(e){let{allUsers:s=!0,nameMatch:t,userMatch:r,workspaceMatch:a,poolMatch:l,statuses:n}=e;return["allUsers:".concat(s),t?"name:".concat(t):"",r?"user:".concat(r):"",a?"workspace:".concat(a):"",l?"pool:".concat(l):"",n&&n.length>0?"statuses:".concat(n.sort().join(",")):""].filter(Boolean).join("|")||"default"}_getCacheStatus(e){let s=this.fullDataCache.get(e),t=Date.now();if(!s)return{isCached:!1,isFresh:!1,age:0,maxAge:12e4,hasData:!1};let r=t-s.timestamp;return{isCached:!0,isFresh:r<12e4,age:r,maxAge:12e4,hasData:s.jobs&&Array.isArray(s.jobs),data:s}}async getPaginatedJobs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{page:s=1,limit:t=10,...r}=e,a=this._generateFilterKey(r);try{let e=this._getCacheStatus(a);if(e.isCached&&e.hasData){let l=e.data;if(!l.jobs||Array.isArray(l.jobs)&&0===l.jobs.length){if(!this.prefetching.has(a)){let e=this._loadFullDataset(r,a).catch(()=>{}).finally(()=>this.prefetching.delete(a));this.prefetching.set(a,e)}}else{let n=(s-1)*t,i=l.jobs.slice(n,n+t);if(!this.prefetching.has(a)&&(!e.isFresh||e.age>e.maxAge/2)){let e=this._loadFullDataset(r,a).catch(()=>{}).finally(()=>this.prefetching.delete(a));this.prefetching.set(a,e)}return{jobs:i,total:l.total,totalNoFilter:l.totalNoFilter||l.total,controllerStopped:l.controllerStopped,statusCounts:l.statusCounts||{},fromCache:!0,cacheStatus:e.isFresh?"local_cache_hit":"local_cache_stale_hit"}}}let l=await p.default.get(m.getManagedJobs,[{...r,page:s,limit:t}]),n=(null==l?void 0:l.jobs)||[],i="number"==typeof(null==l?void 0:l.total)?l.total:n.length,c=!!(null==l?void 0:l.controllerStopped);if(!this.prefetching.has(a)){let e=this._loadFullDataset(r,a).catch(e=>{console.warn("Background prefetch of full jobs failed:",e)}).finally(()=>{this.prefetching.delete(a)});this.prefetching.set(a,e)}return{jobs:n,total:i,totalNoFilter:(null==l?void 0:l.totalNoFilter)||i,controllerStopped:c,statusCounts:(null==l?void 0:l.statusCounts)||{},fromCache:!1,cacheStatus:"server_page_fetch"}}catch(e){return console.error("Error in getPaginatedJobs:",e),{jobs:[],total:0,totalNoFilter:0,controllerStopped:!1,statusCounts:{},fromCache:!1,cacheStatus:"error"}}}async _loadFullDataset(e,s){let t=await p.default.get(m.getManagedJobs,[e]);if(t.controllerStopped||!t.jobs)return t;let r={jobs:t.jobs,total:t.jobs.length,totalNoFilter:t.totalNoFilter||t.jobs.length,controllerStopped:!1,statusCounts:t.statusCounts||{},timestamp:Date.now()};return this.fullDataCache.set(s,r),r}isDataLoading(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e);return this.isLoading.has(s)||this.prefetching.has(s)}isDataCached(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e),t=this._getCacheStatus(s);return t.isCached&&t.isFresh&&t.hasData}getCacheStatus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=this._generateFilterKey(e);return this._getCacheStatus(s)}invalidateCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){let s=this._generateFilterKey(e);this.fullDataCache.delete(s),this.isLoading.delete(s),this.prefetching.delete(s)}else this.fullDataCache.clear(),this.isLoading.clear(),this.prefetching.clear();p.default.invalidateFunction(m.getManagedJobs)}getCacheStats(){let e={cachedFilters:Array.from(this.fullDataCache.keys()),loadingFilters:Array.from(this.isLoading.keys()),prefetchingFilters:Array.from(this.prefetching.keys()),cacheSize:this.fullDataCache.size,loadingCount:this.isLoading.size,prefetchingCount:this.prefetching.size};for(let[s,t]of(e.detailedStatus={},this.fullDataCache.entries())){let r=this._getCacheStatus(s);e.detailedStatus[s]={age:r.age,isFresh:r.isFresh,hasData:r.hasData,jobCount:t.jobs?t.jobs.length:0}}return e}constructor(){this.fullDataCache=new Map,this.isLoading=new Map,this.prefetching=new Map}}let f=new j;var g=t(23266),b=t(17324),v=t(53081),w=t(13626),y=t(23293),N=t(6521),k=t(16826),C=t(92128),S=t(94545),_=t(99307),L=t(20546),E=t(23001),R=t(88950);let D=(e,s)=>{let t={...e.query},r=[],a=[],l=[];s.map((e,s)=>{var t;r.push(null!==(t=e.property.toLowerCase())&&void 0!==t?t:""),a.push(e.operator),l.push(e.value)}),t.property=r,t.operator=a,t.value=l,e.replace({pathname:e.pathname,query:t},void 0,{shallow:!0})},F=(e,s)=>{let t={...e.query},r=t.property,a=t.operator,l=t.value;if(void 0===r)return[];let n=[],i=Array.isArray(r)?r.length:1;if(1===i)n.push({property:s.get(r),operator:a,value:l});else for(let e=0;e<i;e++)n.push({property:s.get(r[e]),operator:a[e],value:l[e]});return n},M=e=>{var s,t;let{propertyList:l=[],valueList:n,setFilters:i,updateURLParams:c,placeholder:o="Filter items"}=e,d=(0,a.useRef)(null),u=(0,a.useRef)(null),[h,x]=(0,a.useState)(!1),[m,p]=(0,a.useState)(""),[j,f]=(0,a.useState)((null===(s=l[0])||void 0===s?void 0:s.value)||"status"),[g,b]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&x(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.useEffect)(()=>{let e=[];n&&"object"==typeof n&&(e=n[j]||[]),""!==m.trim()&&(e=e.filter(e=>e&&e.toString().toLowerCase().includes(m.toLowerCase()))),b(e)},[j,n,m]);let v=e=>{let s=l.find(s=>s.value===e);return s?s.label:e},w=e=>{i(s=>{let t=[...s,{property:v(j),operator:":",value:e}];return c(t),t}),x(!1),p(""),d.current.focus()};return(0,r.jsxs)("div",{className:"flex flex-row border border-gray-300 rounded-md overflow-visible",children:[(0,r.jsx)("div",{className:"border-r border-gray-300 flex-shrink-0",children:(0,r.jsxs)(R.Ph,{onValueChange:f,value:j,children:[(0,r.jsx)(R.i4,{"aria-label":"Filter Property",className:"focus:ring-0 focus:ring-offset-0 border-none rounded-l-md rounded-r-none w-20 sm:w-24 md:w-32 h-8 text-xs sm:text-sm",children:(0,r.jsx)(R.ki,{placeholder:(null===(t=l[0])||void 0===t?void 0:t.label)||"Status"})}),(0,r.jsx)(R.Bw,{children:l.map((e,s)=>(0,r.jsx)(R.Ql,{value:e.value,children:e.label},"property-item-".concat(s)))})]})}),(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)("input",{type:"text",ref:d,placeholder:o,value:m,onChange:e=>{p(e.target.value),h||x(!0)},onFocus:()=>{x(!0)},onKeyDown:e=>{"Enter"===e.key&&""!==m.trim()?(i(e=>{let s=[...e,{property:v(j),operator:":",value:m}];return c(s),s}),p(""),x(!1)):"Escape"===e.key&&(x(!1),d.current.blur())},className:"h-8 w-full sm:w-96 px-3 pr-8 text-sm border-none rounded-l-none rounded-r-md focus:ring-0 focus:outline-none",autoComplete:"off"}),m&&(0,r.jsx)("button",{onClick:()=>{p(""),x(!1)},className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",title:"Clear filter",tabIndex:-1,children:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),h&&g.length>0&&(0,r.jsx)("div",{ref:u,className:"absolute z-50 mt-1 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-y-auto",style:{zIndex:9999},children:g.map((e,s)=>(0,r.jsx)("div",{className:"px-3 py-2 cursor-pointer hover:bg-gray-50 text-sm ".concat(s!==g.length-1?"border-b border-gray-100":""),onClick:()=>w(e),children:(0,r.jsx)("span",{className:"text-sm text-gray-700",children:e})},"".concat(e,"-").concat(s)))})]})]})},I=e=>{let{filters:s=[],setFilters:t,updateURLParams:a}=e,l=e=>{t(s=>{let t=s.filter((s,t)=>t!==e);return a(t),t})};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center gap-4 py-2 px-2",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-content gap-2",children:[s.map((e,s)=>(0,r.jsx)(A,{filter:e,onRemove:()=>l(s)},"filteritem-".concat(s))),s.length>0&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("button",{onClick:()=>{a([]),t([])},className:"rounded-full px-4 py-1 text-sm text-gray-700 bg-gray-200 hover:bg-gray-300",children:"Clear filters"})})]})})})},A=e=>{let{filter:s,onRemove:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-center text-blue-600 bg-blue-100 px-1 py-1 rounded-full text-sm",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,r.jsx)("span",{children:"".concat(s.property," ")}),(0,r.jsx)("span",{children:"".concat(s.operator," ")}),(0,r.jsx)("span",{children:" ".concat(s.value)})]}),(0,r.jsx)("button",{onClick:()=>t(),className:"p-0.5 ml-1 transform text-gray-400 hover:text-gray-600 bg-blue-500 hover:bg-blue-600 rounded-full flex flex-col items-center",title:"Clear filter",children:(0,r.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"white",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:5,d:"M6 18L18 6M6 6l12 12"})})})]})})},z={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},P=[{label:"Name",value:"name"},{label:"User",value:"user"},{label:"Workspace",value:"workspace"},{label:"Pool",value:"pool"}];function J(e,s){if(!s||""===s.trim())return e;let t=s.toLowerCase().trim();return e.filter(e=>(e.name||"").toLowerCase().includes(t))}function U(e,s){return s&&"ALL_WORKSPACES"!==s?e.filter(e=>(e.workspace||"default").toLowerCase()===s.toLowerCase()):e}function W(e,s){return s&&"ALL_USERS"!==s?e.filter(e=>(e.user_hash||e.user)===s):e}function O(e,s){if(!s||""===s.trim())return e;let t=s.toLowerCase().trim();return e.filter(e=>(e.pool||"").toLowerCase().includes(t))}let T=e=>{if(!e)return"-";let s=e instanceof Date?e:new Date(1e3*e);return(0,r.jsx)(h.Zg,{date:s})};function Z(){let e=(0,l.useRouter)(),[s,t]=(0,a.useState)(!1),[n,c]=(0,a.useState)(!0),[o,d]=(0,a.useState)(!0),u=a.useRef(null),x=a.useRef(null),[j,g]=(0,a.useState)([]),[w,y]=(0,a.useState)([]),N=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t(!0),!e&&o&&c(!0);try{let[e]=await Promise.all([p.default.get(m.vs,[{}])]);g(e.pools||[])}catch(e){console.error("Error fetching data:",e)}finally{t(!1),!e&&o&&(c(!1),d(!1))}};(0,a.useEffect)(()=>{N()},[]);let k=s=>{D(e,s)},C=a.useCallback(()=>{let s=new Map;s.set("",""),s.set("status","Status"),s.set("name","Name"),s.set("user","User"),s.set("workspace","Workspace"),s.set("pool","Pool"),y(F(e,s))},[e,y]);return(0,a.useEffect)(()=>{e.isReady&&C()},[e.isReady,e.query.tab,C]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,r.jsx)("div",{className:"text-base",children:(0,r.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"})}),(0,r.jsx)("div",{className:"w-full sm:w-auto",children:(0,r.jsx)(M,{propertyList:P,valueList:{},setFilters:y,updateURLParams:k,placeholder:"Filter jobs"})})]}),(0,r.jsx)(I,{filters:w,setFilters:y,updateURLParams:k}),(0,r.jsx)(B,{refreshInterval:h.yc,setLoading:t,refreshDataRef:u,filters:w,onRefresh:()=>{f.invalidateCache(),p.default.invalidate(m.vs,[{}]),p.default.invalidate(b.getWorkspaces),p.default.invalidate(v.R),u.current&&u.current(),x.current&&x.current()},poolsData:j,poolsLoading:n}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(V,{refreshInterval:h.yc,setLoading:t,refreshDataRef:x})})]})}function B(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,filters:n,onRefresh:j,poolsData:b,poolsLoading:v}=e,[N,k]=(0,a.useState)([]),[R,D]=(0,a.useState)(0),[F,M]=(0,a.useState)(0),[I,A]=(0,a.useState)({key:null,direction:"ascending"}),[P,J]=(0,a.useState)(!1),[U,W]=(0,a.useState)(!0),[O,Z]=(0,a.useState)(1),[B,H]=(0,a.useState)(10),[V,Y]=(0,a.useState)(null),Q=(0,a.useRef)(null),[X,$]=(0,a.useState)([]),[ee,es]=(0,a.useState)({}),[et,er]=(0,a.useState)({}),[ea,el]=(0,a.useState)(!1),[en,ei]=(0,a.useState)(!1),[ec,eo]=(0,a.useState)(!1),[ed,eu]=(0,a.useState)("all"),[eh,ex]=(0,a.useState)(!0),[em,ep]=(0,a.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),ej=(0,E.X)(),ef=(0,a.useRef)(0),eg=async()=>{ep({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller?",onConfirm:async()=>{try{eo(!0),J(!0),await (0,m.Ce)("restartcontroller"),await eb()}catch(e){console.error("Error restarting controller:",e)}finally{eo(!1),J(!1)}}})},eb=a.useCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=!1!==e.includeStatus,r=ef.current+1;ef.current=r,J(!0),t(!0);try{let e,t;let a=e=>{let s=(n||[]).find(s=>(s.property||"").toLowerCase()===e);return s&&s.value?String(s.value):void 0};X.length>0?t=X:eh?"active"===ed?t=z.active:"finished"===ed&&(t=z.finished):t=[];let l={allUsers:!0,nameMatch:a("name"),userMatch:a("user"),workspaceMatch:a("workspace"),poolMatch:a("pool"),statuses:t,page:O,limit:B},i=null;if(f.isDataCached(l),f.isDataLoading(l),s){let[s,t]=await Promise.all([f.getPaginatedJobs(l),p.default.get(g.getClusters)]);e=s,i=t}else e=await f.getPaginatedJobs(l);let{jobs:c=[],total:o=0,totalNoFilter:d=0,controllerStopped:u=!1,cacheStatus:h="unknown",statusCounts:x={}}=e||{},m=!1,j=!1;if(s&&i){let e=null==i?void 0:i.find(e=>(0,S.Ym)(e.cluster)),s=e?e.status:"NOT_FOUND";"STOPPED"==s&&u&&(m=!0),"LAUNCHING"==s&&(j=!0)}r===ef.current&&(k(c),D(o||0),M(d||0),el(!!m),ei(!!j),er(x),W(!1))}catch(e){console.error("Error fetching data:",e),r===ef.current&&(k([]),el(!1),W(!1))}finally{r===ef.current&&(J(!1),t(!1))}},[t,n,O,B,X,eh,ed]);a.useEffect(()=>{l&&(l.current=eb)},[l,eb]);let ev=a.useRef(eb);a.useEffect(()=>{ev.current=eb},[eb]);let ew=a.useRef(!0);a.useEffect(()=>{eb({includeStatus:!0}),ew.current=!1},[]),a.useEffect(()=>{ew.current||eb({includeStatus:!1})},[O]),a.useEffect(()=>{ew.current||eb({includeStatus:!0})},[n,B]),a.useEffect(()=>{ew.current||eb({includeStatus:!0})},[ed,X,eh]),(0,a.useEffect)(()=>{let e=setInterval(()=>{ev.current&&ev.current({includeStatus:!0})},s);return()=>{clearInterval(e)}},[s]),(0,a.useEffect)(()=>{Z(1)},[ed]),(0,a.useEffect)(()=>{Z(1)},[n,B]),(0,a.useEffect)(()=>{$([]),ex(!0)},[ed]);let ey=e=>{let s="ascending";I.key===e&&"ascending"===I.direction&&(s="descending"),A({key:e,direction:s})},eN=e=>I.key===e?"ascending"===I.direction?" ↑":" ↓":"";a.useMemo(()=>{let e=N||[];return{active:e.filter(e=>z.active.includes(e.status)).length,finished:e.filter(e=>z.finished.includes(e.status)).length}},[N]);let ek=e=>X.length>0?X.includes(e):"all"===ed||z[ed].includes(e),eC=a.useMemo(()=>N,[N]),eS=a.useMemo(()=>I.key?[...eC].sort((e,s)=>e[I.key]<s[I.key]?"ascending"===I.direction?-1:1:e[I.key]>s[I.key]?"ascending"===I.direction?1:-1:0):eC,[eC,I]),e_=(O-1)*B,eL=R>0?Math.ceil(R/B):0,eE=R>0?Math.min(e_+eS.length,R):0,eR=e=>{if(X.includes(e)){let s=X.filter(s=>s!==e);0===s.length?(ex(!0),$([])):($(s),ex(!1))}else $([...X,e]),ex(!1);Z(1)};return(0,a.useEffect)(()=>{es(et)},[et]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between text-sm mb-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center",children:[(0,r.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!P&&0===F&&!U&&(0,r.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(ee).map(e=>{let[s,t]=e;return(0,r.jsxs)("button",{onClick:()=>eR(s),className:"px-3 py-0.5 rounded-full flex items-center space-x-2 ".concat(ek(s)||X.includes(s)?(0,_.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,r.jsx)("span",{children:s}),(0,r.jsx)("span",{className:"text-xs ".concat(ek(s)||X.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),F>0&&(0,r.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,r.jsx)("span",{className:"text-gray-500",children:"("}),(0,r.jsx)("button",{onClick:()=>{a.startTransition(()=>{eu("all"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("all"===ed&&eh?"text-purple-700 underline":"text-gray-600 hover:text-purple-700 hover:underline"),children:"show all jobs"}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{a.startTransition(()=>{eu("active"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("active"===ed&&eh?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,r.jsx)("button",{onClick:()=>{a.startTransition(()=>{eu("finished"),$([]),ex(!0),Z(1)})},className:"text-sm font-medium ".concat("finished"===ed&&eh?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,r.jsx)("span",{className:"text-gray-500",children:")"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[P&&(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(c.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,r.jsxs)("button",{onClick:()=>{j&&j()},disabled:P,className:"text-sky-blue hover:text-sky-blue-bright flex items-center text-sm",children:[(0,r.jsx)(w.Z,{className:"h-4 w-4 mr-1.5"}),(0,r.jsx)("span",{children:"Refresh"})]})]})]})}),ej&&ea&&0===eS.length&&!P&&!U&&(0,r.jsx)("div",{className:"mb-4 p-4 bg-gray-50 rounded-lg border",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,r.jsxs)("p",{className:"text-gray-700 text-center text-sm",children:["Job controller stopped.",(0,r.jsx)("br",{}),"Restart to check status."]}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:eg,className:"text-sky-blue hover:text-sky-blue-bright",disabled:P||ec,children:ec?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Z,{className:"h-4 w-4 mr-2"}),"Restart"]})})]})}),(0,r.jsx)(d.Zb,{children:(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(u.iA,{className:"min-w-full",children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("id"),children:["ID",eN("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("name"),children:["Name",eN("name")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("user"),children:["User",eN("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("workspace"),children:["Workspace",eN("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("submitted_at"),children:["Submitted",eN("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("job_duration"),children:["Duration",eN("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("status"),children:["Status",eN("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("resources_str"),children:["Requested",eN("resources_str")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("infra"),children:["Infra",eN("infra")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("cluster"),children:["Resources",eN("cluster")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("recoveries"),children:["Recoveries",eN("recoveries")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>ey("pool"),children:["Worker Pool",eN("pool")]}),(0,r.jsx)(u.ss,{children:"Details"}),(0,r.jsx)(u.ss,{children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:P&&U?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):eS.length>0?(0,r.jsx)(r.Fragment,{children:eS.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(u.SC,{children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(L.H,{username:e.user,userHash:e.user_hash})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:T(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(_.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.requested_resources}),(0,r.jsx)(u.pj,{children:e.infra&&"-"!==e.infra?(0,r.jsx)(h.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+(()=>{let s=x.MO.NAME_TRUNCATE_LENGTH,t=e.infra.substring(e.infra.indexOf("(")),r=t.substring(1,t.length-1);if(r.length<=s)return t;let a="".concat(r.substring(0,Math.floor((s-3)/2)),"...").concat(r.substring(r.length-Math.ceil((s-3)/2)));return"(".concat(a,")")})()})]})}):(0,r.jsx)("span",{children:e.infra||"-"})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(h.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(u.pj,{children:e.recoveries}),(0,r.jsx)(u.pj,{children:(0,r.jsx)("div",{className:v?"blur-sm transition-all duration-300":"",children:v?"-":(0,h.os)(e.pool,e.pool_hash,b)})}),(0,r.jsx)(u.pj,{children:e.details?(0,r.jsx)(G,{text:e.details,rowId:e.id,expandedRowId:V,setExpandedRowId:Y}):"-"}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(q,{jobParent:"/jobs",jobId:e.id,managed:!0,workspace:e.workspace})})]}),V===e.id&&(0,r.jsx)(K,{text:e.details,colSpan:13,innerRef:Q})]},e.task_job_id))}):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:13,className:"text-center py-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[en&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,r.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. It will be ready shortly."}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!ea&&!en&&(0,r.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),!ej&&ea&&(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3 px-4",children:[(0,r.jsx)("p",{className:"text-gray-700 text-center text-sm sm:text-base max-w-md",children:"The managed job controller has been stopped. Restart to check the latest job status."}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:eg,className:"text-sky-blue hover:text-sky-blue-bright",disabled:P||ec,children:ec?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Z,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})})}),(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:B,onChange:e=>{H(parseInt(e.target.value,10)),Z(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsx)("div",{children:R>0?"".concat(e_+1," – ").concat(eE," of ").concat(R):"0 – 0 of 0"}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{Z(e=>Math.max(e-1,1))},disabled:1===O||!eS||0===eS.length,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{eL>0&&O<eL&&Z(e=>e+1)},disabled:0===eL||O>=eL||!eS||0===eS.length,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,r.jsx)(C.cV,{isOpen:em.isOpen,onClose:()=>ep({...em,isOpen:!1}),onConfirm:em.onConfirm,title:em.title,message:em.message,confirmClassName:"bg-blue-600 hover:bg-blue-700 text-white"})]})}function q(e){let{withLabel:s=!1,jobParent:t,jobId:a,managed:n,workspace:i="default"}=e,c=(0,l.useRouter)(),o=(e,s)=>{e.preventDefault(),e.stopPropagation(),c.push({pathname:"".concat(t,"/").concat(a),query:{tab:s}})},d=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.preventDefault(),e.stopPropagation(),n)(0,m.jh)({jobId:parseInt(a),controller:s});else{let e=t.match(/\/clusters\/(.+)/);if(e){let s=e[1];(0,g.GH)({clusterName:s,jobIds:[a],workspace:i})}}};return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(h.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>o(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(N.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),(0,r.jsx)(h.WH,{content:"Download Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:e=>d(e,!1),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(k.Z,{className:"w-4 h-4"}),s&&(0,r.jsx)("span",{className:"ml-1.5",children:"Download"})]})},"downloadlogs")]})}function H(e){let{clusterName:s,clusterJobData:t,loading:l,refreshClusterJobsOnly:n,userFilter:x=null,nameFilter:m=null,workspace:p="default"}=e,[j,f]=(0,a.useState)(null),[g,b]=(0,a.useState)({key:null,direction:"ascending"}),[v,y]=(0,a.useState)(1),[N,k]=(0,a.useState)(10),C=(0,a.useRef)(null),[S,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=e=>{j&&C.current&&!C.current.contains(e.target)&&f(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[j]);let R=a.useMemo(()=>{let e=t||[];return x&&"ALL_USERS"!==x&&(e=W(e,x)),m&&(e=J(e,m)),e},[t,x,m]);(0,a.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(S)&&E(t)},[t,S]);let D=a.useMemo(()=>g.key?[...R].sort((e,s)=>e[g.key]<s[g.key]?"ascending"===g.direction?-1:1:e[g.key]>s[g.key]?"ascending"===g.direction?1:-1:0):R,[R,g]),F=e=>{let s="ascending";g.key===e&&"ascending"===g.direction&&(s="descending"),b({key:e,direction:s})},M=e=>g.key===e?"ascending"===g.direction?" ↑":" ↓":"",I=Math.ceil(D.length/N),A=(v-1)*N,z=A+N,P=D.slice(A,z);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)(d.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),(0,r.jsx)("div",{className:"flex items-center",children:n&&(0,r.jsxs)("button",{onClick:n,disabled:l,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center text-sm ml-2",children:[(0,r.jsx)(w.Z,{className:"w-4 h-4 mr-1"}),"Refresh Jobs"]})})]}),(0,r.jsxs)(u.iA,{children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("id"),children:["ID",M("id")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("job"),children:["Name",M("job")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("user"),children:["User",M("user")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("workspace"),children:["Workspace",M("workspace")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("submitted_at"),children:["Submitted",M("submitted_at")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("job_duration"),children:["Duration",M("job_duration")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("status"),children:["Status",M("status")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap",onClick:()=>F("resources"),children:["Resources",M("resources")]}),(0,r.jsx)(u.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,r.jsx)(u.RM,{children:l?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:9,className:"text-center py-12 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading cluster jobs..."})]})})}):P.length>0?P.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(u.SC,{className:j===e.id?"selected-row":"",children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,r.jsx)(G,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:j,setExpandedRowId:f})})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(L.H,{username:e.user,userHash:e.user_hash})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(u.pj,{children:T(e.submitted_at)}),(0,r.jsx)(u.pj,{children:(0,h.LU)(e.job_duration)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(_.OE,{status:e.status})}),(0,r.jsx)(u.pj,{children:e.resources}),(0,r.jsx)(u.pj,{className:"flex content-center items-center",children:(0,r.jsx)(q,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1,workspace:p})})]}),j===e.id&&(0,r.jsx)(K,{text:e.job||"Unnamed job",colSpan:9,innerRef:C})]},e.id)):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),D&&D.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:N,onChange:e=>{k(parseInt(e.target.value,10)),y(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:20,children:"20"}),(0,r.jsx)("option",{value:50,children:"50"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[A+1," – ",Math.min(z,D.length)," of"," ",D.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{y(e=>Math.max(e-1,1))},disabled:1===v,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{y(e=>Math.min(e+1,I))},disabled:v===I||0===I,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function K(e){let{text:s,colSpan:t,innerRef:a}=e;return(0,r.jsx)(u.SC,{className:"expanded-details",children:(0,r.jsx)(u.pj,{colSpan:t,children:(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:a,children:(0,r.jsx)("div",{className:"flex justify-between items-start",children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function G(e){let{text:s,rowId:t,expandedRowId:l,setExpandedRowId:n}=e,i=s||"",c=i.length>50,o=l===t,d=c?"".concat(i.substring(0,50)):i,u=(0,a.useRef)(null);return(0,r.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,r.jsx)("span",{className:"truncate",children:d}),c&&(0,r.jsx)("button",{ref:u,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),n(o?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:o?"... show less":"... show more"})]})}function V(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l}=e,[n,o]=(0,a.useState)([]),[x,j]=(0,a.useState)({key:null,direction:"ascending"}),[f,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[w,y]=(0,a.useState)(1),[N,k]=(0,a.useState)(10),C=a.useCallback(async()=>{g(!0),t(!0);try{let{pools:e=[]}=await p.default.get(m.vs,[{}])||{};o(e),v(!1)}catch(e){console.error("Error fetching pools data:",e),o([]),v(!1)}finally{g(!1),t(!1)}},[t]);a.useEffect(()=>{l&&(l.current=C)},[l,C]),(0,a.useEffect)(()=>{o([]);let e=!0;C();let t=setInterval(()=>{e&&C()},s);return()=>{e=!1,clearInterval(t)}},[s,C]);let S=e=>{let s="ascending";x.key===e&&"ascending"===x.direction&&(s="descending"),j({key:e,direction:s})},L=e=>x.key===e?"ascending"===x.direction?" ↑":" ↓":"",E=a.useMemo(()=>x.key?[...n].sort((e,s)=>e[x.key]<s[x.key]?"ascending"===x.direction?-1:1:e[x.key]>s[x.key]?"ascending"===x.direction?1:-1:0):n,[n,x]),R=Math.ceil(E.length/N),D=(w-1)*N,F=D+N,M=E.slice(D,F),I=e=>{if(!e||!e.replica_info||0===e.replica_info.length)return"0 (target: 0)";let s=e.replica_info.filter(e=>"READY"===e.status).length,t=e.target_num_replicas||0;return"".concat(s," (target: ").concat(t,")")},A=e=>{let{jobCounts:s}=e;return(0,r.jsx)(h.x9,{jobCounts:s,getStatusStyle:_.Cl})},z=e=>{let{replicaInfo:s}=e;return(0,r.jsx)(h.Kl,{replicaInfo:s})};return(0,r.jsxs)(d.Zb,{children:[(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(u.iA,{className:"min-w-full table-fixed",children:[(0,r.jsx)(u.xD,{children:(0,r.jsxs)(u.SC,{children:[(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-32",onClick:()=>S("name"),children:["Pool",L("name")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("job_counts"),children:["Jobs",L("job_counts")]}),(0,r.jsx)(u.ss,{className:"whitespace-nowrap w-20",children:"Workers"}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-36",onClick:()=>S("requested_resources_str"),children:["Worker Details",L("requested_resources_str")]}),(0,r.jsxs)(u.ss,{className:"sortable whitespace-nowrap w-40",onClick:()=>S("requested_resources_str"),children:["Worker Resources",L("requested_resources_str")]})]})}),(0,r.jsx)(u.RM,{children:f&&b?(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(c.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):M.length>0?M.map(e=>(0,r.jsxs)(u.SC,{children:[(0,r.jsx)(u.pj,{children:(0,r.jsx)(i(),{href:"/jobs/pools/".concat(e.name),className:"text-blue-600 hover:text-blue-800",children:e.name})}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(A,{jobCounts:e.jobCounts})}),(0,r.jsx)(u.pj,{children:I(e)}),(0,r.jsx)(u.pj,{children:(0,r.jsx)(z,{replicaInfo:e.replica_info})}),(0,r.jsx)(u.pj,{children:e.requested_resources_str||"-"})]},e.name)):(0,r.jsx)(u.SC,{children:(0,r.jsx)(u.pj,{colSpan:5,className:"text-center py-6 text-gray-500",children:"No pools found"})})})]})}),M.length>0&&R>1&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("span",{className:"text-sm text-gray-700",children:"Rows per page:"}),(0,r.jsxs)("select",{value:N,onChange:e=>{k(parseInt(e.target.value,10)),y(1)},className:"border border-gray-300 rounded px-2 py-1 text-sm",children:[(0,r.jsx)("option",{value:5,children:"5"}),(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:25,children:"25"}),(0,r.jsx)("option",{value:50,children:"50"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:[D+1,"-",Math.min(F,E.length)," of"," ",E.length]}),(0,r.jsx)("button",{onClick:()=>{y(e=>Math.max(e-1,1))},disabled:1===w,className:"px-2 py-1 text-sm border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Previous"}),(0,r.jsx)("button",{onClick:()=>{y(e=>Math.min(e+1,R))},disabled:w===R,className:"px-2 py-1 text-sm border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next"})]})]})]})}}}]);