Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions api/py/ai/chronon/repo/hub_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def _build_local_repo_hashmap(root_dir: str):

if exceptions:
error_msg = (
"The following files had exceptions during upload: \n"
+ "\n".join(exceptions)
+ "\n\n Consider deleting the files (safe operation) and checking "
+ "your thrift version before rerunning your command."
"The following files had exceptions during upload: \n"
+ "\n".join(exceptions)
+ "\n\n Consider deleting the files (safe operation) and checking "
+ "your thrift version before rerunning your command."
)
raise RuntimeError(error_msg)

Expand All @@ -70,6 +70,8 @@ def _build_local_repo_hashmap(root_dir: str):

def compute_and_upload_diffs(root_dir: str, branch: str):
diffed_entities = _get_diffed_entities(root_dir, branch)
print(f"\n\nUploading:\n {"\n".join(diffed_entities.keys())}")
entity_keys_str = "\n".join(diffed_entities.keys())
log_str = "\n\nUploading:\n{entity_keys}".format(entity_keys=entity_keys_str)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit maybe just use f-strings?

log_str = f"\n\nUploading:\n{entity_keys_str}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can change. I'm a an of f strings but I think the trust in them got us to this error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging. but i can change it in a follow up

print(log_str)
# TODO make PUT request to ZiplineHub
return
Loading