Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] SkyPilot Client-Server Architecture #4660

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c689536
Rearchitect SkyPilot to be Client-Server
Michaelvll Feb 6, 2025
4a37077
Update images
Michaelvll Feb 6, 2025
44dde07
Add small design doc
Michaelvll Feb 6, 2025
b7053e7
remove trigger for workflow on restapi branch
Michaelvll Feb 6, 2025
3c4d99a
per-request kubernetes api cache to avoid authentication update not p…
Michaelvll Feb 7, 2025
6ca156c
Minor rewording
concretevitamin Feb 7, 2025
32ae8e0
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 7, 2025
4f62623
Merge branch 'client-server' of github.com:skypilot-org/skypilot into…
Michaelvll Feb 7, 2025
a5c3b52
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 7, 2025
190f63a
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 7, 2025
01196eb
[Docs] Update endpoint fetching docs for client-server (#4662)
romilbhardwaj Feb 7, 2025
97d2283
fix NameError during import
zpoint Feb 7, 2025
638564d
Address comments
Michaelvll Feb 7, 2025
c7acb24
Merge branch 'client-server' of github.com:skypilot-org/skypilot into…
Michaelvll Feb 7, 2025
64635f8
update logic
Michaelvll Feb 7, 2025
6da61fb
smaller jobs requirement
Michaelvll Feb 7, 2025
e2cf8ce
format
Michaelvll Feb 7, 2025
aeaa81b
fix
Michaelvll Feb 7, 2025
7d856ce
remove uneccessary print
Michaelvll Feb 8, 2025
ef5e1a3
make caching per request for GCP credential
Michaelvll Feb 8, 2025
6ca0e22
switch to master catalog
Michaelvll Feb 8, 2025
4efa946
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 8, 2025
f8669e4
terminate cluster
Michaelvll Feb 8, 2025
8f128ea
only handle FAILED_SETUP
Michaelvll Feb 8, 2025
f710ea2
faster backward compat
Michaelvll Feb 8, 2025
0bb9c87
Fix SKY-1432
Michaelvll Feb 8, 2025
4cc948b
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 10, 2025
7b33469
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 11, 2025
4b911d1
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 11, 2025
ed9d252
fix merging conflicts
Michaelvll Feb 11, 2025
d79c46d
Add backward compatibility for serving
Michaelvll Feb 11, 2025
beb981e
use 1 dollar
Michaelvll Feb 11, 2025
d60585e
Add cloud dependency installation
Michaelvll Feb 12, 2025
858fc64
Add handling for the service status not dict
Michaelvll Feb 12, 2025
1f5c77d
Add assertion for storage
Michaelvll Feb 12, 2025
08635ae
add backward compatibility
Michaelvll Feb 12, 2025
1c59667
fix
Michaelvll Feb 12, 2025
2723e9e
fix
Michaelvll Feb 12, 2025
20d3f60
fix quote
Michaelvll Feb 12, 2025
87b596f
add more logging for pod tag
Michaelvll Feb 12, 2025
da7d4c1
fix parenthesis
Michaelvll Feb 12, 2025
e80d2e9
fix add_and_remove
Michaelvll Feb 12, 2025
c19e66f
avoid resource type
Michaelvll Feb 12, 2025
fa3a645
fix pod name
Michaelvll Feb 12, 2025
d67a57a
[client-server] avoid killing the API server on SIGINT (#4699)
cg505 Feb 12, 2025
531b9c5
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 12, 2025
1cd55ab
Merge branch 'client-server' of github.com:skypilot-org/skypilot into…
Michaelvll Feb 12, 2025
39f0f9e
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 12, 2025
87df1e4
fix remote kubectl
Michaelvll Feb 12, 2025
8a62c05
fix dependency installation for k8s
Michaelvll Feb 12, 2025
e11e48b
print info
Michaelvll Feb 12, 2025
2b07ce2
fix syntax issue
Michaelvll Feb 12, 2025
e4ff1e9
Avoid cloud cmd
Michaelvll Feb 12, 2025
6f0185d
activate service account
Michaelvll Feb 12, 2025
1560f2f
format
Michaelvll Feb 12, 2025
3bc5242
remove todo
Michaelvll Feb 12, 2025
f5a4a23
Specify region
Michaelvll Feb 12, 2025
cd289fa
longer wait time for azure
Michaelvll Feb 12, 2025
2de0265
add output for nvidia-smi
Michaelvll Feb 12, 2025
3a9317b
longer sleep
Michaelvll Feb 12, 2025
05bf0f9
More info for api_info
Michaelvll Feb 12, 2025
163d75d
Fix test cancel
Michaelvll Feb 12, 2025
78fc649
longer
Michaelvll Feb 12, 2025
7db62bc
longer wait for cancellation
Michaelvll Feb 12, 2025
5683e8b
longer wait for succeed for Azure
Michaelvll Feb 12, 2025
ddadc84
longer wait for cancellation
Michaelvll Feb 12, 2025
59b9a30
longer wait for azure
Michaelvll Feb 12, 2025
94e9cac
even longer wait for azure
Michaelvll Feb 12, 2025
7f021b3
revert longer wait
Michaelvll Feb 13, 2025
01c39d2
Set sub path for azure storage
Michaelvll Feb 13, 2025
78cc291
Full path for the ux
Michaelvll Feb 13, 2025
6ba026f
fix variable reference
Michaelvll Feb 13, 2025
da2bdd2
minor
Michaelvll Feb 13, 2025
4f8bf2b
Merge branch 'azure-bucket-path-fix' of github.com:skypilot-org/skypi…
Michaelvll Feb 13, 2025
65b6b5a
Azure tests passed with #4706
Michaelvll Feb 13, 2025
e382f84
Airflow updates
romilbhardwaj Feb 13, 2025
0cfb299
enforce azure region for bucket
Michaelvll Feb 13, 2025
0745cd4
Add airflow architecture image
romilbhardwaj Feb 13, 2025
757c61f
Merge branch 'azure-bucket-path-fix' of github.com:skypilot-org/skypi…
Michaelvll Feb 13, 2025
b6051fd
Delete storage even when failure happens
Michaelvll Feb 13, 2025
55f832b
Merge branch 'azure-bucket-path-fix' of github.com:skypilot-org/skypi…
Michaelvll Feb 13, 2025
1fbbfdc
Merge branch 'client-server' of github.com:skypilot-org/skypilot into…
Michaelvll Feb 13, 2025
6420575
Merge branch 'master' of github.com:skypilot-org/skypilot into client…
Michaelvll Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ repos:
- "sky/benchmark|sky/callbacks|sky/skylet/providers/azure|sky/resources.py|sky/backends/monkey_patches"
pass_filenames: false
additional_dependencies:
- types-aiofiles
- types-PyYAML
- types-requests<2.31 # Match the condition in requirements.txt
- types-setuptools
Expand Down
41 changes: 31 additions & 10 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,37 @@ fi

rm -rf build docs

# MacOS and GNU `script` have different usages
if [ "$(uname -s)" = "Linux" ]; then
script -q /tmp/build_docs.txt -c "make html"
# Add command line argument parsing
AUTO_BUILD=false
while [[ "$#" -gt 0 ]]; do
case $1 in
--watch|-w) AUTO_BUILD=true ;;
--port|-p) PORT=$2; shift ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
shift
done

if [ "$AUTO_BUILD" = true ]; then
# Use sphinx-autobuild for automatic rebuilding
# Ignore gallery directory to prevent unnecessary rebuilds
sphinx-autobuild source build/html \
--ignore "*.md" \
--port $PORT
else
# Assume MacOS (uname -s = Darwin)
script -q /tmp/build_docs.txt bash -c "make html"
fi
rm -rf build docs

# Check if the output contains "ERROR:" or "WARNING:"
if grep -q -E "ERROR:|WARNING:" /tmp/build_docs.txt; then
echo "Errors or warnings detected, exiting..."
exit 1
# MacOS and GNU `script` have different usages
if [ "$(uname -s)" = "Linux" ]; then
script -q /tmp/build_docs.txt -c "make html"
else
# Assume MacOS (uname -s = Darwin)
script -q /tmp/build_docs.txt bash -c "make html"
fi

# Check if the output contains "ERROR:" or "WARNING:"
if grep -q -E "ERROR:|WARNING:" /tmp/build_docs.txt; then
echo "Errors or warnings detected, exiting..."
exit 1
fi
fi
1 change: 1 addition & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx-design==0.5.0
pydata-sphinx-theme==0.14.4
Pygments==2.16.1
myst-parser==2.0.0
sphinx-autobuild==2021.3.14

sphinx-autodoc-typehints==1.25.2
sphinx-book-theme==1.1.0
Expand Down
1 change: 1 addition & 0 deletions docs/source/_static/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ document.addEventListener('DOMContentLoaded', () => {
// New items:
const newItems = [
{ selector: '.toctree-l1 > a', text: 'Many Parallel Jobs' },
{ selector: '.toctree-l1 > a', text: 'SkyPilot API Server' },
{ selector: '.toctree-l1 > a', text: 'Admin Policies' },
{ selector: '.toctree-l2 > a', text: 'Multiple Kubernetes Clusters' },
{ selector: '.toctree-l2 > a', text: 'HTTPS Encryption' },
Expand Down
4 changes: 2 additions & 2 deletions docs/source/cloud-setup/policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ a request should be rejected, the policy should raise an exception.

The ``sky.Config`` and ``sky.RequestOptions`` classes are defined as follows:

.. literalinclude:: ../../../sky/skypilot_config.py
.. literalinclude:: ../../../sky/utils/config_utils.py
:language: python
:pyobject: Config
:caption: `Config Class <https://github.com/skypilot-org/skypilot/blob/master/sky/skypilot_config.py>`_
:caption: `Config Class <https://github.com/skypilot-org/skypilot/blob/master/sky/utils/config_utils.py>`_


.. literalinclude:: ../../../sky/admin_policy.py
Expand Down
8 changes: 7 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@
main_doc = 'index'

autosummary_generate = True
napolean_use_rtype = False
# Disable automatic type hints to let Napoleon handle them
napoleon_use_rtype = False
# Napoleon settings
napoleon_custom_sections = [
('Request Returns', 'params_style'),
('Request Raises', 'params_style'),
]

# -- Options for autodoc

Expand Down
1 change: 1 addition & 0 deletions docs/source/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Read the research:
:maxdepth: 1
:caption: User Guides

../reference/api-server/api-server
Secrets and Environment Variables <../running-jobs/environment-variables>
Docker Containers <../examples/docker-containers>
../examples/ports
Expand Down
Binary file added docs/source/images/client-server/arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/client-server/executor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/client-server/local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/client-server/remote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading