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

Move API upload endpoint to package service #1016

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

jraddaoui
Copy link
Collaborator

  • Remove the upload service and package.
  • Set up and close the upload bucket in main.
  • Update configuration:
    • Make upload max size configurable.
    • Use go.artefactual.dev/tools/bucket config struct.

Refs #977.

@jraddaoui jraddaoui self-assigned this Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 47.72727% with 23 lines in your changes missing coverage. Please review.

Project coverage is 53.01%. Comparing base (8aa0da8) to head (2d4c5e4).

Files with missing lines Patch % Lines
cmd/enduro/main.go 0.00% 11 Missing ⚠️
internal/package_/upload.go 69.23% 4 Missing and 4 partials ⚠️
cmd/enduro-a3m-worker/main.go 0.00% 2 Missing ⚠️
cmd/enduro-am-worker/main.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
- Coverage   53.13%   53.01%   -0.12%     
==========================================
  Files         101      100       -1     
  Lines        5814     5768      -46     
==========================================
- Hits         3089     3058      -31     
+ Misses       2474     2461      -13     
+ Partials      251      249       -2     

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

@jraddaoui jraddaoui force-pushed the dev/issue-977-upload-endpoint branch 2 times, most recently from 8c8ef3e to b2fe128 Compare September 3, 2024 01:18
Copy link
Contributor

@sevein sevein left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

Copy link
Contributor

@sevein sevein left a comment

Choose a reason for hiding this comment

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

For the record, I'm now remembering that a missing piece for this upload method to become super useful is to return an identifier, e.g. the workflow identifier, so a client can pull processing state. I think that we had an issue describing this limitation, but I can't find it.

- Remove the upload service and package.
- Set up and close the upload bucket in main.
- Update configuration:
  - Make upload max size configurable.
  - Use `go.artefactual.dev/tools/bucket` config struct.

[skip-codecov]
@jraddaoui
Copy link
Collaborator Author

This endpoint only proxies the upload to a bucket, the workflow is then triggered like a normal MinIO deposit, if properly configured.

@jraddaoui jraddaoui force-pushed the dev/issue-977-upload-endpoint branch from b2fe128 to a0d454d Compare September 4, 2024 01:21
@jraddaoui jraddaoui merged commit a0d454d into main Sep 4, 2024
13 checks passed
@jraddaoui jraddaoui deleted the dev/issue-977-upload-endpoint branch September 4, 2024 01:27
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