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(
124124 service_packs = json .loads (f .read ())
125125 service_pack_list = service_packs .get (SERVICE_PACKS )
126126 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."
130131 )
131132 return service_pack_list
132133
@@ -156,16 +157,21 @@ def get_service_packs(
156157 """
157158 service_pack_path_mapping = {}
158159 service_pack_slug_mapping = {}
160+
159161 try :
160- logging .info ("Obtaining service packs through bucket." )
161162 service_pack_list = _get_index_json_through_bucket (
162- namespace = namespace , bucketname = bucketname , auth = auth
163+ namespace = namespace ,
164+ bucketname = bucketname ,
165+ auth = auth
163166 )
164167 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
169175
170176 for service_pack in service_pack_list :
171177 # Here we need to replace the namespace and bucketname
You can’t perform that action at this time.
0 commit comments