Separate legacy filesystem and database code paths: Blob DELETE
Summary
Refactor the blob DELETE handler in registry/handlers/blob.go to separate the legacy filesystem code path from the database code path, as part of the effort to improve maintainability described in &20922.
Context
Route: DELETE /v2/<name>/blobs/<digest>
Current file: registry/handlers/blob.go
Handler method: DeleteBlob
Current State
The handler currently uses conditional branching to switch between database and filesystem metadata backends. This creates cognitive overhead and intermingles actively developed database code with legacy filesystem code.
Goal
Separate the two code paths following the pattern established in !2766 (closed):
- Extract legacy filesystem logic into a dedicated method in a
legacy_*.gofile - Main handler method contains only database logic
- Backend selection occurs at the dispatcher level
Acceptance Criteria
-
Legacy filesystem logic isolated in
legacy_blob.go - Main handler contains only database logic
- Dispatcher selects appropriate handler based on backend configuration
- API conformance tests pass for both database and legacy configurations
Related
- Parent epic: &20922
- Proof of concept: !2766 (closed)