feature/index-page-filepath #233

Open
dkirillov wants to merge 4 commits from dkirillov/frostfs-http-gw:feature/index-page-filepath into master
Member

Beyond the scope of this PR:

  • Enabling slash fallback per namespace/container
  • Handling slash fallback for zip/tar endpoints
**Beyond the scope** of this PR: * Enabling slash fallback per namespace/container * Handling slash fallback for zip/tar endpoints
dkirillov self-assigned this 2025-04-23 10:02:46 +00:00
dkirillov added 4 commits 2025-04-23 10:02:46 +00:00
Add:
 * search index.html
 * fallback by leading slash
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
[#XX] Fix browsing
Some checks failed
/ DCO (pull_request) Failing after 32s
/ Vulncheck (pull_request) Successful in 56s
/ Builds (pull_request) Successful in 1m17s
/ OCI image (pull_request) Successful in 1m37s
/ Lint (pull_request) Failing after 1m11s
/ Tests (pull_request) Successful in 1m17s
/ Integration tests (pull_request) Successful in 6m17s
7958eb4a7d
Simplify tree listing (we need only nodes in exactly the same parent level)

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov force-pushed feature/index-page-filepath from 7958eb4a7d to 9750521598 2025-04-23 10:04:06 +00:00 Compare
dkirillov changed title from WIP: feature/index-page-filepath to feature/index-page-filepath 2025-04-23 10:04:30 +00:00
requested reviews from storage-services-committers, storage-services-developers 2025-04-23 10:04:32 +00:00
Author
Member

@realloc please verify this logic (and similar for head)

if checkS3Err == nil {
run(prm, h.errorMiddleware(logs.ObjectNotFound, ErrObjectNotFound),
Middleware{Func: h.byS3PathMiddleware(h.receiveFile, noopFormer), Enabled: true},
Middleware{Func: h.byS3PathMiddleware(h.receiveFile, indexFormer), Enabled: indexPageEnabled},
Middleware{Func: h.browseIndexMiddleware(h.getDirObjectsS3), Enabled: indexPageEnabled},
)
} else {
slashFallbackEnabled := h.config.EnableFilepathSlashFallback()
fileNameFallbackEnabled := h.config.EnableFilepathFallback()
run(prm, h.errorMiddleware(logs.ObjectNotFound, ErrObjectNotFound),
Middleware{Func: h.byAddressMiddleware(h.receiveFile), Enabled: true},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFilePath, noopFormer), Enabled: true},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFilePath, reverseLeadingSlash), Enabled: slashFallbackEnabled},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFileName, noopFormer), Enabled: fileNameFallbackEnabled},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFileName, reverseLeadingSlash), Enabled: fileNameFallbackEnabled && slashFallbackEnabled},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFilePath, indexFormer), Enabled: indexPageEnabled},
Middleware{Func: h.byAttributeSearchMiddleware(h.receiveFile, object.AttributeFileName, indexFormer), Enabled: fileNameFallbackEnabled && indexPageEnabled},
Middleware{Func: h.browseIndexMiddleware(h.getDirObjectsNative), Enabled: indexPageEnabled},
)
}

@realloc please verify this logic (and similar for head) https://git.frostfs.info/dkirillov/frostfs-http-gw/src/commit/9750521598970d893513e71f5ec7c6ca5035b709/internal/handler/download.go#L68-L88
dkirillov force-pushed feature/index-page-filepath from 9750521598 to a4991bda4e 2025-04-23 11:09:20 +00:00 Compare
Owner

L68-L88 logic looks correct.

L68-L88 logic looks correct.
pogpp approved these changes 2025-04-23 12:15:15 +00:00
All checks were successful
/ DCO (pull_request) Successful in 27s
Required
Details
/ Vulncheck (pull_request) Successful in 50s
Required
Details
/ Builds (pull_request) Successful in 1m19s
Required
Details
/ OCI image (pull_request) Successful in 1m26s
Required
Details
/ Lint (pull_request) Successful in 2m40s
Required
Details
/ Tests (pull_request) Successful in 56s
Required
Details
/ Integration tests (pull_request) Successful in 6m1s
Required
Details
This pull request doesn't have enough approvals yet. 1 of 2 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feature/index-page-filepath:dkirillov-feature/index-page-filepath
git checkout dkirillov-feature/index-page-filepath
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-http-gw#233
No description provided.