Skip to content

Commit

Permalink
convert S3 compute log manager to support new captured log API (#9961)
Browse files Browse the repository at this point in the history
* noop

* partial upload, s3
  • Loading branch information
prha committed Nov 2, 2022
1 parent 70c5f8d commit 4df6e55
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 103 deletions.
6 changes: 4 additions & 2 deletions python_modules/dagster/dagster/_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,20 @@ def _gen_thing():
return thing_or_gen


def ensure_dir(file_path):
def ensure_dir(file_path: str) -> str:
try:
os.makedirs(file_path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
return file_path


def ensure_file(path):
def ensure_file(path: str) -> str:
ensure_dir(os.path.dirname(path))
if not os.path.exists(path):
touch_file(path)
return path


def touch_file(path):
Expand Down

0 comments on commit 4df6e55

Please sign in to comment.