Skip to content

feat(Ocisdev-901) remove legacy upload functions - #725

Open
f-firas wants to merge 1 commit into
OCISDEV-900-pr7-switchoverfrom
OCISDEV-901-remove-legacy-upload
Open

feat(Ocisdev-901) remove legacy upload functions#725
f-firas wants to merge 1 commit into
OCISDEV-900-pr7-switchoverfrom
OCISDEV-901-remove-legacy-upload

Conversation

@f-firas

@f-firas f-firas commented Aug 31, 2026

Copy link
Copy Markdown

No description provided.

@f-firas
f-firas requested a review from a team as a code owner August 31, 2026 08:46
@kw-security

kw-security commented Aug 31, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@f-firas f-firas changed the title Ocisdev 901 remove legacy upload feat(Ocisdev-901) remove legacy upload functions Aug 31, 2026
@f-firas
f-firas changed the base branch from main to OCISDEV-900-pr7-switchover August 31, 2026 09:07

var defaultFilePerm = os.FileMode(0664)

func (d *driver) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why can't we delete this full file? Is it still used somewhere? Theoretically, it should be unused now, no?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we remove this? If not why?

Comment thread pkg/storage/uploads.go
}

// UploadSessionLister defines the interface for FS implementations that allow listing and purging upload sessions
type UploadSessionLister interface {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can this be removed?

Comment thread pkg/storage/uploads.go
}

// UploadSession is the interface that storage drivers need to return whan listing upload sessions.
type UploadSession interface {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)

Comment thread pkg/storage/uploads.go
@@ -1 +1 @@
// Copyright 2018-2021 CERN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

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.

3 participants