skypilot-nightly 1.0.0.dev20250128__py3-none-any.whl → 1.0.0.dev20250129__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/aws.py +21 -5
- sky/clouds/aws.py +1 -1
- sky/provision/aws/instance.py +3 -2
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/RECORD +10 -10
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/top_level.txt +0 -0
sky/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
# Replaced with the current commit when building the wheels.
|
8
|
-
_SKYPILOT_COMMIT_SHA = '
|
8
|
+
_SKYPILOT_COMMIT_SHA = 'a80208ff0f4c4c8ce869b1a693e5d8d9e588ba52'
|
9
9
|
|
10
10
|
|
11
11
|
def _get_git_commit():
|
@@ -35,7 +35,7 @@ def _get_git_commit():
|
|
35
35
|
|
36
36
|
|
37
37
|
__commit__ = _get_git_commit()
|
38
|
-
__version__ = '1.0.0.
|
38
|
+
__version__ = '1.0.0.dev20250129'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/adaptors/aws.py
CHANGED
@@ -120,9 +120,17 @@ def _create_aws_object(creation_fn_or_cls: Callable[[], Any],
|
|
120
120
|
# The LRU cache needs to be thread-local to avoid multiple threads sharing the
|
121
121
|
# same session object, which is not guaranteed to be thread-safe.
|
122
122
|
@_thread_local_lru_cache()
|
123
|
-
def session():
|
123
|
+
def session(check_credentials: bool = True):
|
124
124
|
"""Create an AWS session."""
|
125
|
-
|
125
|
+
s = _create_aws_object(boto3.session.Session, 'session')
|
126
|
+
if check_credentials and s.get_credentials() is None:
|
127
|
+
# s.get_credentials() can be None if there are actually no credentials,
|
128
|
+
# or if we fail to get credentials from IMDS (e.g. due to throttling).
|
129
|
+
# Technically, it could be okay to have no credentials, as certain AWS
|
130
|
+
# APIs don't actually need them. But afaik everything we use AWS for
|
131
|
+
# needs credentials.
|
132
|
+
raise botocore_exceptions().NoCredentialsError()
|
133
|
+
return s
|
126
134
|
|
127
135
|
|
128
136
|
# Avoid caching the resource/client objects. If we are using the assumed role,
|
@@ -149,11 +157,15 @@ def resource(service_name: str, **kwargs):
|
|
149
157
|
config = botocore_config().Config(
|
150
158
|
retries={'max_attempts': max_attempts})
|
151
159
|
kwargs['config'] = config
|
160
|
+
|
161
|
+
check_credentials = kwargs.pop('check_credentials', True)
|
162
|
+
|
152
163
|
# Need to use the client retrieved from the per-thread session to avoid
|
153
164
|
# thread-safety issues (Directly creating the client with boto3.resource()
|
154
165
|
# is not thread-safe). Reference: https://stackoverflow.com/a/59635814
|
155
166
|
return _create_aws_object(
|
156
|
-
lambda: session().resource(
|
167
|
+
lambda: session(check_credentials=check_credentials).resource(
|
168
|
+
service_name, **kwargs), 'resource')
|
157
169
|
|
158
170
|
|
159
171
|
def client(service_name: str, **kwargs):
|
@@ -164,12 +176,16 @@ def client(service_name: str, **kwargs):
|
|
164
176
|
kwargs: Other options.
|
165
177
|
"""
|
166
178
|
_assert_kwargs_builtin_type(kwargs)
|
179
|
+
|
180
|
+
check_credentials = kwargs.pop('check_credentials', True)
|
181
|
+
|
167
182
|
# Need to use the client retrieved from the per-thread session to avoid
|
168
183
|
# thread-safety issues (Directly creating the client with boto3.client() is
|
169
184
|
# not thread-safe). Reference: https://stackoverflow.com/a/59635814
|
170
185
|
|
171
|
-
return _create_aws_object(
|
172
|
-
|
186
|
+
return _create_aws_object(
|
187
|
+
lambda: session(check_credentials=check_credentials).client(
|
188
|
+
service_name, **kwargs), 'client')
|
173
189
|
|
174
190
|
|
175
191
|
@common.load_lazy_modules(modules=_LAZY_MODULES)
|
sky/clouds/aws.py
CHANGED
@@ -711,7 +711,7 @@ class AWS(clouds.Cloud):
|
|
711
711
|
@functools.lru_cache(maxsize=1) # Cache since getting identity is slow.
|
712
712
|
def _sts_get_caller_identity(cls) -> Optional[List[List[str]]]:
|
713
713
|
try:
|
714
|
-
sts = aws.client('sts')
|
714
|
+
sts = aws.client('sts', check_credentials=False)
|
715
715
|
# The caller identity contains 3 fields: UserId, Account, Arn.
|
716
716
|
# 1. 'UserId' is unique across all AWS entity, which looks like
|
717
717
|
# "AROADBQP57FF2AEXAMPLE:role-session-name"
|
sky/provision/aws/instance.py
CHANGED
@@ -55,7 +55,7 @@ _RESUME_PER_INSTANCE_TIMEOUT = 120 # 2 minutes
|
|
55
55
|
# https://aws.amazon.com/ec2/pricing/on-demand/#Data_Transfer_within_the_same_AWS_Region
|
56
56
|
|
57
57
|
|
58
|
-
def _default_ec2_resource(region: str) -> Any:
|
58
|
+
def _default_ec2_resource(region: str, check_credentials: bool = True) -> Any:
|
59
59
|
if not hasattr(aws, 'version'):
|
60
60
|
# For backward compatibility, reload the module if the aws module was
|
61
61
|
# imported before and stale. Used for, e.g., a live jobs controller
|
@@ -95,7 +95,8 @@ def _default_ec2_resource(region: str) -> Any:
|
|
95
95
|
importlib.reload(aws)
|
96
96
|
return aws.resource('ec2',
|
97
97
|
region_name=region,
|
98
|
-
max_attempts=BOTO_MAX_RETRIES
|
98
|
+
max_attempts=BOTO_MAX_RETRIES,
|
99
|
+
check_credentials=check_credentials)
|
99
100
|
|
100
101
|
|
101
102
|
def _cluster_name_filter(cluster_name_on_cloud: str) -> List[Dict[str, Any]]:
|
{skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=ExFZHFlVtSULSHNGhEbMwQWNbiaGjjVm4Q8JKdLDfWU,5529
|
2
2
|
sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
|
3
3
|
sky/authentication.py,sha256=LXUDABKP1FJCS256xTTDJa40WXwHKF5x49S-4hZbD1M,21501
|
4
4
|
sky/check.py,sha256=qTpm3N1zUZi2inEZPsrbt278B3h8nsk2gnepzIgLybE,10899
|
@@ -16,7 +16,7 @@ sky/skypilot_config.py,sha256=FN93hSG-heQCHBnemlIK2TwrJngKbpx4vMXNUzPIzV8,9087
|
|
16
16
|
sky/status_lib.py,sha256=J7Jb4_Dz0v2T64ttOdyUgpokvl4S0sBJrMfH7Fvo51A,1457
|
17
17
|
sky/task.py,sha256=zri5_Ghh5-fjDf2rl997ZmL4IlXetW9u9XXJIRUJ3Qg,51353
|
18
18
|
sky/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
-
sky/adaptors/aws.py,sha256=
|
19
|
+
sky/adaptors/aws.py,sha256=FNNC8B-iqSSiCLPiWGK_PLm1R-Kt4yI5JPIpdE0QJxQ,7565
|
20
20
|
sky/adaptors/azure.py,sha256=yjM8nAPW-mlSXfmA8OmJNnSIrZ9lQx2-GxiI-TIVrwE,21910
|
21
21
|
sky/adaptors/cloudflare.py,sha256=5NUvRGZ1gNf6xwL4CfsjekQTAsTsQQCH7l3tQIhkFxQ,7587
|
22
22
|
sky/adaptors/common.py,sha256=nJmuBYFokCH0vX2oFqdAJYS-84FnUSTmIPKjAi4gqzo,2877
|
@@ -41,7 +41,7 @@ sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
|
42
42
|
sky/benchmark/benchmark_utils.py,sha256=mP8Ox2WiKfthq6LcUAZnHknFQ0n8v9o_rCh1LXLgkqc,26192
|
43
43
|
sky/clouds/__init__.py,sha256=iORaV6auqMxa6-6FKgt1C9f3UqRk1GASUtakua3tb9A,1395
|
44
|
-
sky/clouds/aws.py,sha256=
|
44
|
+
sky/clouds/aws.py,sha256=eYhCdHrp7niqt6rT3PX0jd92gtx1NG0A8KTl-Ob-BsI,53831
|
45
45
|
sky/clouds/azure.py,sha256=UlBsgVH3dTV1INFLwHCntpXrdZ4ByTkdXQmjvVdGyQo,31608
|
46
46
|
sky/clouds/cloud.py,sha256=5_ZduUcyCEY1JnX_h0PrJ5xwtPP4oor4jf6cICgSArc,35370
|
47
47
|
sky/clouds/cloud_registry.py,sha256=oLoYFjm_SDTgdHokY7b6A5Utq80HXRQNxV0fLjDdVsQ,2361
|
@@ -117,7 +117,7 @@ sky/provision/metadata_utils.py,sha256=LrxeV4wD2QPzNdXV_npj8q-pr35FatxBBjF_jSbpO
|
|
117
117
|
sky/provision/provisioner.py,sha256=ZOgFOO0NB4QZVPwd4qikRqi615Bq67n0Vcl3cTDVxNE,29153
|
118
118
|
sky/provision/aws/__init__.py,sha256=mxq8PeWJqUtalDozTNpbtENErRZ1ktEs8uf2aG9UUgU,731
|
119
119
|
sky/provision/aws/config.py,sha256=-4mr5uxgsl_8eLm_4DfP8JurZGSysGuY0iDeBTHnX5Q,25943
|
120
|
-
sky/provision/aws/instance.py,sha256=
|
120
|
+
sky/provision/aws/instance.py,sha256=3-R8ohuN8ooNh2Fqqb7-c4vNFy1xsw2GQF4PHg3APhE,40843
|
121
121
|
sky/provision/aws/utils.py,sha256=m49pS-SHGW7Au3bhDeTPsL8N5iRzbwOXzyEWRCc1Vho,3238
|
122
122
|
sky/provision/azure/__init__.py,sha256=87cgk1_Ws7n9rqaDDPv-HpfrkVeSQMdFQnhnXwyx9g4,548
|
123
123
|
sky/provision/azure/azure-config-template.json,sha256=jrjAgOtpe0e6FSg3vsVqHKQqJe0w-HeWOFT1HuwzS2c,4712
|
@@ -289,9 +289,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=k0TBoQ4zgf79-sVkixKSGYFHQ7Z
|
|
289
289
|
sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
|
290
290
|
sky/utils/kubernetes/rsync_helper.sh,sha256=h4YwrPFf9727CACnMJvF3EyK_0OeOYKKt4su_daKekw,1256
|
291
291
|
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
|
292
|
-
skypilot_nightly-1.0.0.
|
293
|
-
skypilot_nightly-1.0.0.
|
294
|
-
skypilot_nightly-1.0.0.
|
295
|
-
skypilot_nightly-1.0.0.
|
296
|
-
skypilot_nightly-1.0.0.
|
297
|
-
skypilot_nightly-1.0.0.
|
292
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
293
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/METADATA,sha256=t06vBK0dA7BIxwSsBsD477mo_-DgGUXnt4etMTMJQDw,21249
|
294
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
295
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
296
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
297
|
+
skypilot_nightly-1.0.0.dev20250129.dist-info/RECORD,,
|
File without changes
|
{skypilot_nightly-1.0.0.dev20250128.dist-info → skypilot_nightly-1.0.0.dev20250129.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|