Skip to content

Commit

Permalink
[AWS] Fix catalog folder not exists issue (#3883)
Browse files Browse the repository at this point in the history
fix catalog folder
  • Loading branch information
Michaelvll authored Aug 28, 2024
1 parent f73debf commit 13f54eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sky/clouds/service_catalog/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class InstanceTypeInfo(NamedTuple):


def get_catalog_path(filename: str) -> str:
return os.path.join(_ABSOLUTE_VERSIONED_CATALOG_DIR, filename)
catalog_path = os.path.join(_ABSOLUTE_VERSIONED_CATALOG_DIR, filename)
os.makedirs(os.path.dirname(catalog_path), exist_ok=True)
return catalog_path


def is_catalog_modified(filename: str) -> bool:
Expand Down Expand Up @@ -225,7 +227,7 @@ def _update_catalog():
with open(meta_path + '.md5', 'w',
encoding='utf-8') as f:
f.write(hashlib.md5(r.text.encode()).hexdigest())
logger.info(f'Updated {cloud} catalog.')
logger.debug(f'Updated {cloud} catalog {filename}.')

return LazyDataFrame(catalog_path, update_func=_update_catalog)

Expand Down

0 comments on commit 13f54eb

Please sign in to comment.