Skip to content

feat(upload): [OCISDEV-1382] let the coordinator serve the orphaned session - #726

Merged
f-firas merged 1 commit into
mainfrom
OCISDEV-1382
Sep 2, 2026
Merged

feat(upload): [OCISDEV-1382] let the coordinator serve the orphaned session#726
f-firas merged 1 commit into
mainfrom
OCISDEV-1382

Conversation

@f-firas

@f-firas f-firas commented Sep 2, 2026

Copy link
Copy Markdown

@f-firas
f-firas requested a review from a team as a code owner September 2, 2026 10:51
@kw-security

kw-security commented Sep 2, 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 feat(upload): [OCISDEV-1382] let the coordinator serve the orphaned s… feat(upload): [OCISDEV-1382] let the coordinator serve the orphaned session Sep 2, 2026
}

// IsOrphaned reports whether the referenced resource exists but its metadata is unreadable.
func (f *FS) IsOrphaned(ctx context.Context, ref *provider.Reference) bool {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here in the middleware, if the driver does not support IsOrphaned it would panic. The coordinator check sees that the middleware supports IsOrphaned, so does not return NotSupported. But then afterwards, this method would panic.

It's only a practical risk, since middleware always has decomposedfs, which always has IsOrphaned. If we want to be extra safe, we can do something like this:

func (f *FS) IsOrphaned(ctx context.Context, ref *provider.Reference) bool {
      if checker, ok := f.next.(storage.OrphanChecker); ok {
          return checker.IsOrphaned(ctx, ref)
      }
      return false  // inner driver doesn't support it
  }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, good point. The middleware satisfies OrphanChecker either way, so the check doesn't really tell you much. But Not sure about returning false though. There's no error to return, so false just means "healthy", so you'd run --orphaned, get an empty list, and think there's nothing to clean up. I'd rather it blow up than quietly report everything as fine

@f-firas
f-firas merged commit b8fe9b4 into main Sep 2, 2026
16 checks passed
@f-firas
f-firas deleted the OCISDEV-1382 branch September 2, 2026 12:37
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