-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Extract volume interaction to a volumes service #36688
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
Conversation
c7109af to
4b5957c
Compare
volume/service/service.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a very different abstraction from what we are calling services currently (ex: ImageService, and RegistryService) which implement higher level logic.
Most of this interface is implemented by the VolumeStore, right?
I would think a VolumeService would be a type that implements api/server/router/volume.Backend, as well as whatever is used by other services. That way we remove the need for a monolithic daemon package.
I like the changes in this PR, but it seems that we're losing the ability to create a VolumeService to replace the daemon methods for volumes.
Could this continue to be a VolumeStore, and we split out a service later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could call it that still... but that (replace daemon methods) is indeed the intent, it's just yet more change to add in this large PR, of course can add a commit to make that happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this change.
4b5957c to
0f566d3
Compare
0f566d3 to
5eefc91
Compare
983da3c to
eaac2a9
Compare
Codecov Report
@@ Coverage Diff @@
## master #36688 +/- ##
==========================================
- Coverage 35.05% 34.93% -0.13%
==========================================
Files 615 609 -6
Lines 45828 44973 -855
==========================================
- Hits 16065 15711 -354
+ Misses 27652 27136 -516
- Partials 2111 2126 +15 |
511108e to
81b74d8
Compare
f1c8283 to
e14f9b3
Compare
92981fd to
a5466d5
Compare
|
Updated and all green. |
This cleans up some of the package API's used for interacting with volumes, and simplifies management. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
ping @anusha-ragunathan PTAL |
|
LGTM |
|
@cpuguy83 unit tests TestServiceCreate/TestServiceGet may fail
|

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

This cleans up some of the package API's used for interacting with volumes, and simplifies management.
This is built on top of #36637.
I've done a lot of manual testing on this, but would like to add some more tests especially around the filtering logic, which is also now consolidated to the volume service.