Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial support for GetBucketLifecycle operation #1064

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This document outlines major changes between releases.
### Added

### Changed
- GetBucketLifecycle operation now partially supported. It always returns NoSuchLifecycleConfiguration error (#1049)

### Fixed

Expand Down
17 changes: 17 additions & 0 deletions api/handler/lifecycle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package handler

import (
"net/http"

"github.com/nspcc-dev/neofs-s3-gw/api"
"github.com/nspcc-dev/neofs-s3-gw/api/s3errors"
)

func (h *handler) GetBucketLifecycleHandler(w http.ResponseWriter, r *http.Request) {
h.logAndSendError(
w,
"The lifecycle configuration does not exist",
api.GetReqInfo(r.Context()),
s3errors.GetAPIError(s3errors.ErrNoSuchLifecycleConfiguration),
)
}
4 changes: 0 additions & 4 deletions api/handler/unimplemented.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ func (h *handler) SelectObjectContentHandler(w http.ResponseWriter, r *http.Requ
h.logAndSendError(w, "not implemented", api.GetReqInfo(r.Context()), s3errors.GetAPIError(s3errors.ErrNotImplemented))
}

func (h *handler) GetBucketLifecycleHandler(w http.ResponseWriter, r *http.Request) {
h.logAndSendError(w, "not implemented", api.GetReqInfo(r.Context()), s3errors.GetAPIError(s3errors.ErrNotImplemented))
}

func (h *handler) GetBucketEncryptionHandler(w http.ResponseWriter, r *http.Request) {
h.logAndSendError(w, "not implemented", api.GetReqInfo(r.Context()), s3errors.GetAPIError(s3errors.ErrNotImplemented))
}
Expand Down
14 changes: 7 additions & 7 deletions docs/aws_s3_compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ See [Ownership](./aws_s3_compat.md#ownership-controls) section for details.

## Lifecycle

| | Method | Comments |
|----|---------------------------------|----------|
| 🔵 | DeleteBucketLifecycle | |
| 🔵 | GetBucketLifecycle | |
| 🔵 | GetBucketLifecycleConfiguration | |
| 🔵 | PutBucketLifecycle | |
| 🔵 | PutBucketLifecycleConfiguration | |
| | Method | Comments |
|----|---------------------------------|------------------------------------------------------|
| 🔵 | DeleteBucketLifecycle | |
| 🟡 | GetBucketLifecycle | It always returns NoSuchLifecycleConfiguration error |
| 🔵 | GetBucketLifecycleConfiguration | |
| 🔵 | PutBucketLifecycle | |
| 🔵 | PutBucketLifecycleConfiguration | |

## Logging

Expand Down
Loading