skypilot-nightly 1.0.0.dev20250611__py3-none-any.whl → 1.0.0.dev20250613__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.
- sky/__init__.py +2 -2
- sky/adaptors/kubernetes.py +3 -2
- sky/backends/backend_utils.py +8 -2
- sky/benchmark/benchmark_state.py +2 -1
- sky/catalog/data_fetchers/fetch_aws.py +1 -1
- sky/catalog/data_fetchers/fetch_vast.py +1 -1
- sky/check.py +43 -3
- sky/cli.py +1 -1
- sky/client/cli.py +1 -1
- sky/clouds/cloud.py +1 -1
- sky/clouds/gcp.py +1 -1
- sky/clouds/kubernetes.py +9 -3
- sky/clouds/ssh.py +7 -3
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/chunks/{webpack-208a9812ab4f61c9.js → webpack-5c3e6471d04780c6.js} +1 -1
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/data/storage.py +2 -2
- sky/global_user_state.py +38 -0
- sky/jobs/server/core.py +1 -68
- sky/jobs/state.py +43 -44
- sky/provision/common.py +1 -1
- sky/provision/gcp/config.py +1 -1
- sky/provision/kubernetes/instance.py +2 -1
- sky/provision/kubernetes/utils.py +60 -13
- sky/resources.py +2 -2
- sky/serve/serve_state.py +81 -15
- sky/server/requests/preconditions.py +1 -1
- sky/server/requests/requests.py +11 -6
- sky/skylet/configs.py +26 -19
- sky/skylet/job_lib.py +3 -5
- sky/task.py +1 -1
- sky/templates/jobs-controller.yaml.j2 +0 -23
- sky/templates/kubernetes-ray.yml.j2 +1 -1
- sky/utils/common_utils.py +6 -0
- sky/utils/context.py +1 -1
- sky/utils/controller_utils.py +10 -0
- sky/utils/infra_utils.py +1 -1
- sky/utils/kubernetes/generate_kubeconfig.sh +1 -1
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/RECORD +58 -62
- sky/jobs/dashboard/dashboard.py +0 -223
- sky/jobs/dashboard/static/favicon.ico +0 -0
- sky/jobs/dashboard/templates/index.html +0 -831
- sky/jobs/server/dashboard_utils.py +0 -69
- /sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → UdgJCk2sZFLJgFJW_qiWG}/_buildManifest.js +0 -0
- /sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → UdgJCk2sZFLJgFJW_qiWG}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/top_level.txt +0 -0
@@ -1,69 +0,0 @@
|
|
1
|
-
"""Persistent dashboard sessions.
|
2
|
-
|
3
|
-
Note: before #4717, this was useful because we needed to tunnel to multiple
|
4
|
-
controllers - one per user. Now, there is only one controller for the whole API
|
5
|
-
server, so this is not very useful. TODO(cooperc): Remove or fix this.
|
6
|
-
"""
|
7
|
-
import pathlib
|
8
|
-
from typing import Tuple
|
9
|
-
|
10
|
-
import filelock
|
11
|
-
|
12
|
-
from sky.utils import db_utils
|
13
|
-
|
14
|
-
|
15
|
-
def create_dashboard_table(cursor, conn):
|
16
|
-
cursor.execute("""\
|
17
|
-
CREATE TABLE IF NOT EXISTS dashboard_sessions (
|
18
|
-
user_hash TEXT PRIMARY KEY,
|
19
|
-
port INTEGER,
|
20
|
-
pid INTEGER)""")
|
21
|
-
conn.commit()
|
22
|
-
|
23
|
-
|
24
|
-
def _get_db_path() -> str:
|
25
|
-
path = pathlib.Path('~/.sky/dashboard/sessions.db')
|
26
|
-
path = path.expanduser().absolute()
|
27
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
28
|
-
return str(path)
|
29
|
-
|
30
|
-
|
31
|
-
DB_PATH = _get_db_path()
|
32
|
-
db_utils.SQLiteConn(DB_PATH, create_dashboard_table)
|
33
|
-
LOCK_FILE_PATH = '~/.sky/dashboard/sessions-{user_hash}.lock'
|
34
|
-
|
35
|
-
|
36
|
-
def get_dashboard_session(user_hash: str) -> Tuple[int, int]:
|
37
|
-
"""Get the port and pid of the dashboard session for the user."""
|
38
|
-
with db_utils.safe_cursor(DB_PATH) as cursor:
|
39
|
-
cursor.execute(
|
40
|
-
'SELECT port, pid FROM dashboard_sessions WHERE user_hash=?',
|
41
|
-
(user_hash,))
|
42
|
-
result = cursor.fetchone()
|
43
|
-
if result is None:
|
44
|
-
return 0, 0
|
45
|
-
return result
|
46
|
-
|
47
|
-
|
48
|
-
def add_dashboard_session(user_hash: str, port: int, pid: int) -> None:
|
49
|
-
"""Add a dashboard session for the user."""
|
50
|
-
with db_utils.safe_cursor(DB_PATH) as cursor:
|
51
|
-
cursor.execute(
|
52
|
-
'INSERT OR REPLACE INTO dashboard_sessions (user_hash, port, pid) '
|
53
|
-
'VALUES (?, ?, ?)', (user_hash, port, pid))
|
54
|
-
|
55
|
-
|
56
|
-
def remove_dashboard_session(user_hash: str) -> None:
|
57
|
-
"""Remove the dashboard session for the user."""
|
58
|
-
with db_utils.safe_cursor(DB_PATH) as cursor:
|
59
|
-
cursor.execute('DELETE FROM dashboard_sessions WHERE user_hash=?',
|
60
|
-
(user_hash,))
|
61
|
-
lock_path = pathlib.Path(LOCK_FILE_PATH.format(user_hash=user_hash))
|
62
|
-
lock_path.unlink(missing_ok=True)
|
63
|
-
|
64
|
-
|
65
|
-
def get_dashboard_lock_for_user(user_hash: str) -> filelock.FileLock:
|
66
|
-
path = pathlib.Path(LOCK_FILE_PATH.format(user_hash=user_hash))
|
67
|
-
path = path.expanduser().absolute()
|
68
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
69
|
-
return filelock.FileLock(path)
|
/sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → UdgJCk2sZFLJgFJW_qiWG}/_buildManifest.js
RENAMED
File without changes
|
/sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → UdgJCk2sZFLJgFJW_qiWG}/_ssgManifest.js
RENAMED
File without changes
|
{skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250613.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|