artefactual-sdps / enduro

A tool to support ingest and automation in digital preservation workflows
https://enduro.readthedocs.io/
Apache License 2.0
4 stars 3 forks source link

Add bucket package #859

Closed sevein closed 4 months ago

sevein commented 5 months ago

This commit introduces a new package bucket aiming to consolidate the different ways we configure and create buckets across the application.

It enables future work such as embedding the shared config in different contexts as well as using memory-based or fs-based buckets for testing purposes when setting up some components of the application.

Relates to https://github.com/artefactual-sdps/enduro/issues/858.

codecov[bot] commented 5 months ago

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (b0e5362) 45.33% compared to head (863636e) 46.00%.

Files Patch % Lines
internal/storage/types/location_config.go 0.00% 10 Missing :warning:
internal/upload/service.go 88.23% 0 Missing and 2 partials :warning:
internal/watcher/minio.go 93.75% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #859 +/- ## ========================================== + Coverage 45.33% 46.00% +0.66% ========================================== Files 93 94 +1 Lines 5036 5065 +29 ========================================== + Hits 2283 2330 +47 + Misses 2551 2533 -18 Partials 202 202 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sevein commented 4 months ago

Thank you both, will address your feedback soon.

Diogenesoftoronto commented 4 months ago

I added some of the code changes as suggestions and trying it out I noticed that defer on the close throws a lint error which should be ignored. I do not think we should be checking every close error here especially not in a test.

sevein commented 4 months ago

Thanks, I forgot I had submitted this PR! I'll merge.