File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -124,9 +124,10 @@ def _get_index_json_through_bucket(
124
124
service_packs = json .loads (f .read ())
125
125
service_pack_list = service_packs .get (SERVICE_PACKS )
126
126
except Exception as e :
127
- logging .warning (e )
128
- logging .warning (
129
- "Failed to retrieve the full conda pack path from slug. Pass conda pack path 'oci://<bucketname>@<namespace>/<path_to_conda>' instead of slug."
127
+ logging .error (
128
+ f"Error occurred in attempt to extract the list of the service conda environments "
129
+ f"from the object storage for bucket '{ bucketname } ' and namespace '{ namespace } '. "
130
+ f"Please make sure that you've provided correct bucket and namespace."
130
131
)
131
132
return service_pack_list
132
133
@@ -156,16 +157,21 @@ def get_service_packs(
156
157
"""
157
158
service_pack_path_mapping = {}
158
159
service_pack_slug_mapping = {}
160
+
159
161
try :
160
- logging .info ("Obtaining service packs through bucket." )
161
162
service_pack_list = _get_index_json_through_bucket (
162
- namespace = namespace , bucketname = bucketname , auth = auth
163
+ namespace = namespace ,
164
+ bucketname = bucketname ,
165
+ auth = auth
163
166
)
164
167
except Exception as e :
165
- # not internet
166
- logging .warning (e )
167
- logging .warning ("Failed to obtain service packs through bucket. Please ensure internet connection." )
168
-
168
+ logging .error (
169
+ "Failed to fetch service packs index from namespace '%s' and bucket '%s': %s" ,
170
+ namespace ,
171
+ bucketname ,
172
+ str (e ),
173
+ )
174
+ return service_pack_path_mapping , service_pack_slug_mapping
169
175
170
176
for service_pack in service_pack_list :
171
177
# Here we need to replace the namespace and bucketname
You can’t perform that action at this time.
0 commit comments