feat(Ocisdev-901) remove legacy upload functions - #725
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
|
||
| var defaultFilePerm = os.FileMode(0664) | ||
|
|
||
| func (d *driver) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error) { |
There was a problem hiding this comment.
This lives in coordinator & can be removed, no?
| } | ||
|
|
||
| // SetStorageValue is used to set metadata only relevant for the upload session implementation | ||
| func (s *OcisSession) SetStorageValue(key, value string) { |
There was a problem hiding this comment.
Why can't we delete this full file? Is it still used somewhere? Theoretically, it should be unused now, no?
There was a problem hiding this comment.
I also expect that we can delete this file: /v2/pkg/storage/utils/decomposedfs/upload/store.go
| } | ||
|
|
||
| // ListUploadSessions returns the upload sessions for the given filter | ||
| func (fs *Decomposedfs) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error) { |
| } | ||
|
|
||
| // UploadSessionLister defines the interface for FS implementations that allow listing and purging upload sessions | ||
| type UploadSessionLister interface { |
| } | ||
|
|
||
| // UploadSession is the interface that storage drivers need to return whan listing upload sessions. | ||
| type UploadSession interface { |
There was a problem hiding this comment.
I'm not sure, whether this interface still makes sense. In /Users/lars.jurgensen/repos/ocis/reva/pkg/upload/session.go we already have a session interface, but it's using this interface as well:
type Session interface {
storage.UploadSession
Conceptually, I don't think it makes sense to have both. Previously, we had UploadSession has general driver independent interface, and OcisSession as decomposedfs implementation. Now we have two interfaces, which are both driver independent. The comment says that UploadSession is specifically for the ListUploadSessions method, but I don't see a reason, why it can't use Session instead (once ListUploadSessions from storage.fs is removed and we only have it on coordinator)
| @@ -1 +1 @@ | |||
| // Copyright 2018-2021 CERN | |||
There was a problem hiding this comment.
I'm wondering whether we can remove this file, or at least move it somewhere else. The only thing where I'm sure we need it is UploadSessionFilter, which is just a couple of lines. Since we have a /reva/pkg/upload/ package, it feels misplaced to me in reva/pkg/storage/uploads.go. wdyt?
No description provided.