Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload job result files to S3 #155

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Upload job result files to S3 #155

merged 1 commit into from
Jan 8, 2025

Conversation

MrCreosote
Copy link
Member

No description provided.

@MrCreosote MrCreosote requested a review from Tianhao-Gu January 8, 2025 17:20
@MrCreosote
Copy link
Member Author

codecov seems to be having issues again

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 45.33333% with 41 lines in your changes missing coverage. Please review.

Project coverage is 55.18%. Comparing base (61fc7a6) to head (3bf25b2).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cdmtaskservice/nersc/manager.py 23.80% 16 Missing ⚠️
cdmtaskservice/jaws/output.py 51.72% 14 Missing ⚠️
cdmtaskservice/jobflows/nersc_jaws.py 28.57% 10 Missing ⚠️
cdmtaskservice/callback_url_paths.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #155      +/-   ##
==========================================
- Coverage   55.55%   55.18%   -0.37%     
==========================================
  Files          33       34       +1     
  Lines        2054     2120      +66     
==========================================
+ Hits         1141     1170      +29     
- Misses        913      950      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# TODO REMOVE after implementing file upload
logr.info(f"Starting file upload for job {job.id} JAWS run {jaws_info['id']}")

async def presign(output_files: list[Path]) -> list[S3PresignedPost]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure why presign is a nested async function. But totally valid.

Copy link
Member Author

Choose a reason for hiding this comment

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

it has to be async since the s3 client is async, and I'm passing in the function so that I don't add a dependency on the S3 client to the nersc manager. It shouldn't really care where the files end up, just that it gets presigned URLs. I should probably rename a bunch of stuff in the manager and s3 client to make that more clear, since the manager exclusively deals with presigned URLs which really could be for anything

@MrCreosote MrCreosote merged commit bcbe82c into main Jan 8, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants