Gwen Lg
21db7a4d4b
chore: remove various useless code
...
- call expect directly on Result
lint message: called `ok().expect()` on a `Result` value
help: you can call `expect()` directly on the `Result`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ok_expect
- use assign operation instead of manual implementation
lint message: manual implementation of an assign operation
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#assign_op_pattern
- remove useless call to format
lint message: useless use of `format!`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
- remove useless `?Sized`
lint message: `?Sized` bound is ignored because of a `Sized` requirement
note: ...because `Deserialize` has the bound `Sized`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_maybe_sized
- use is_some instead of pattern maching with Some(_)
lint message: redundant pattern matching, consider using `is_some()`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_pattern_matching
- remove unneeded unit return type
lint message: unneeded unit return type
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unused_unit
- remove redundant closure
lint message: redundant closure
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_closure
- use derive Default instead of manual implementation
lint message: this `impl` can be derived
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#derivable_impls
- remove unneeded `return` statement
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
- remove empty string from println call
lint message: empty string literal in `println!`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#println_empty_string
- remove clone() on type than implement Copy
lint message: using `clone` on type `Option<ChecksumValue>` which implements the `Copy` trait
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#clone_on_copy
- remove useless let binding
lint message: this let-binding has unit value
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#let_unit_value
- remove useless len comparison to zero, already test of empty
lint message: length comparison to zero
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero
- remove useless `as_deref` call
lint message: derefed type is same as origin
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_option_as_deref
- remove useless conversion of the same type
lint message: useless conversion to the same type: `replication_mode::ReplicationFactor`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion
- remove useless bool_comparison
lint message: equality checks against false can be replaced by a negation
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#bool_comparison
- remove useless to_string
lint message: unnecessary use of `to_string`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_to_owned
Signed-off-by: Gwen Lg <me@gwenlg.fr >
2026-01-29 20:49:28 +01:00
Gwen Lg
141b3f24f1
chore: clean relative to references and borrows
...
- lint message: the borrowed expression implements the required traits
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrows_for_generic_args
- lint message: this expression creates a reference which is immediately dereferenced by the compiler
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_borrow
- lint message: you don't need to add `&` to all patterns
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_ref_pat
- remove useless taken reference
lint message: needlessly taken reference of left operand
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#op_ref
- use &Path instead of &PathBuf as fn parameters
lint message: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
2026-01-29 20:49:28 +01:00
trinity-1686a
d975960be3
hide keys without any permissions from admin api
2025-08-02 17:28:14 +02:00
Alex Auvolat
7ab1d176d4
Merge branch 'main' into next-v2
2025-05-23 16:33:07 +02:00
Alex Auvolat
2ade8c86f6
more resilience to inconsistent alias states
2025-05-22 19:12:05 +02:00
trinity-1686a
bba9202f31
add test for punycode
2025-05-19 20:36:03 +02:00
trinity-1686a
539af12d21
allow punnycode in bucket name
2025-05-19 18:07:04 +02:00
Alex Auvolat
2f21181ccb
publish bucket creation date in admin api and CLI
2025-04-17 10:29:23 +02:00
Alex Auvolat
5e7307cbf3
admin api: add comments for InspectObject
2025-04-06 14:21:54 +02:00
Alex Auvolat
fd0e23e984
admin api: implement InspectObject ( fix #892 )
2025-04-06 13:23:39 +02:00
Alex Auvolat
6bbdca2e48
admin api: always return latest bucket info
2025-04-06 11:14:42 +02:00
Alex Auvolat
1e13a66b42
rework bucket helper functions to use local access where relevant
2025-03-25 13:00:48 +01:00
Alex Auvolat
eb40475f1e
move bucket search logic from helper to admin api
2025-03-12 09:21:53 +01:00
Alex Auvolat
cef8d75983
admin api: avoid overwriting redirect rules in UpdateBucket
2025-03-07 16:25:55 +01:00
Alex Auvolat
3151695011
Merge branch 'next-v2' into 1686a/s3-redirects
2025-02-14 13:11:33 +01:00
trinity-1686a
f034e834fa
Merge branch 'main' into 1686a/s3-redirects
2025-02-08 16:01:11 +01:00
trinity-1686a
bf0f792418
add redirect_all to WebsiteConfig model
2025-02-08 15:36:48 +01:00
Alex Auvolat
7c8fc04b96
massively speed up compilation of garage_api_admin by not using async_trait
2025-02-05 19:37:38 +01:00
Alex Auvolat
89ff9f5576
admin api: base infrastructure for local endpoints
...
admin api: rename EndpointHandler into RequestHandler to avoid confusion with RPC
wip: infrastructure for local api calls
admin api: fix things
admin api: first local endpoint to work with new scheme
admin api: implement SetWorkerVariable
2025-02-03 18:54:51 +01:00
Alex Auvolat
bdaf55ab3f
cli_v2: migrate cleanupincompleteuploads to Admin API
...
admin api: add CleanupIncompleteUploads spec
2025-02-03 18:54:51 +01:00
Alex Auvolat
fe937c2901
Merge branch 'main' into next-v2
2025-02-01 19:07:17 +01:00
Alex Auvolat
84f1db91c4
fix things up
2025-01-31 18:34:57 +01:00
Alex Auvolat
9fa20d45be
wip: split garage_api into garage_api_{common,s3,k2v,admin}
2025-01-31 18:18:29 +01:00
Alex Auvolat
f37d5d2b08
admin api: convert most bucket operations
2025-01-30 13:36:25 +01:00
Alex Auvolat
420bbc162d
admin api: clearer syntax for AddBucketAlias and RemoveBucketAlias
2025-01-29 19:26:16 +01:00
Alex Auvolat
12ea4cda5f
admin api: merge calls to manage global/local aliases
2025-01-29 19:26:16 +01:00
Alex Auvolat
5fefbd94e9
admin api: rename allow/deny api calls in api v2
2025-01-29 19:26:16 +01:00
Alex Auvolat
ba810b2e81
admin api: rename bucket aliasing operations
2025-01-29 19:26:16 +01:00
Alex Auvolat
ed58f8b0fe
admin api: update semantics of some endpoints, and update doc
2025-01-29 19:26:16 +01:00
Alex Auvolat
c99bfe69ea
admin api: new router_v2 with unified path syntax
2025-01-29 19:26:16 +01:00
Alex Auvolat
831f2b0207
admin api: make all handlers impls of a single trait
2025-01-29 19:26:16 +01:00
Alex Auvolat
c1eb1610ba
admin api: create structs for all requests/responess in src/api/admin/api.rs
2025-01-29 19:26:16 +01:00
trinity-1686a
c9b733a4a6
support redirection on s3 endpoint
2024-12-14 17:46:27 +01:00
Alex Auvolat
59f61c966a
Merge branch 'main' into next-0.10
2024-02-22 15:45:45 +01:00
Alex Auvolat
cff702a951
[lock-createbucket] Add node-global lock for bucket/key operations ( fix #723 )
2024-02-22 12:28:21 +01:00
Alex Auvolat
cf2af186fc
Merge branch 'main' into next-0.10
2024-02-13 11:36:28 +01:00
Alex Auvolat
a22bd31920
[dep-upgrade-202402] migration to http/hyper 1.0 for k2v api
2024-02-05 19:27:12 +01:00
Alex Auvolat
0bb5b77530
[dep-upgrade-202402] wip: port to http/hyper crates v1
2024-02-05 18:49:54 +01:00
Alex Auvolat
4a9c94514f
avoid using layout_watch in System directly
2023-11-08 16:41:00 +01:00
Alex Auvolat
12d1dbfc6b
remove Ring and use ClusterLayout everywhere
2023-11-08 15:41:24 +01:00
Alex Auvolat
412ab77b08
comments and clippy lint fixes
2023-06-09 16:23:37 +02:00
Alex Auvolat
511e07ecd4
fix mpu counter (add missing workers) and report info at appropriate places
2023-06-09 16:23:37 +02:00
Alex Auvolat
8e93d69974
More clippy fixes
2023-01-26 17:26:32 +01:00
Quentin Dufour
dc50fa3b34
Fix typo in admin API on BucketInfo
2022-11-11 16:56:56 +01:00
Alex
77e3fd6db2
improve internal item counter mechanisms and implement bucket quotas ( #326 )
...
- [x] Refactoring of internal counting API
- [x] Repair procedure for counters (it's an offline procedure!!!)
- [x] New counter for objects in buckets
- [x] Add quotas to buckets struct
- [x] Add CLI to manage bucket quotas
- [x] Add admin API to manage bucket quotas
- [x] Apply quotas by adding checks on put operations
- [x] Proof-read
Co-authored-by: Alex Auvolat <alex@adnab.me >
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/326
Co-authored-by: Alex <alex@adnab.me >
Co-committed-by: Alex <alex@adnab.me >
2022-06-15 20:20:28 +02:00
Alex Auvolat
ff06d3f082
Fix Content-Type headers for {admin,k2v} errors and admin responses
...
Fix #315
2022-05-25 17:09:33 +02:00
Alex
382e74c798
First version of admin API ( #298 )
...
**Spec:**
- [x] Start writing
- [x] Specify all layout endpoints
- [x] Specify all endpoints for operations on keys
- [x] Specify all endpoints for operations on key/bucket permissions
- [x] Specify all endpoints for operations on buckets
- [x] Specify all endpoints for operations on bucket aliases
View rendered spec at <https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/admin-api/doc/drafts/admin-api.md >
**Code:**
- [x] Refactor code for admin api to use common api code that was created for K2V
**General endpoints:**
- [x] Metrics
- [x] GetClusterStatus
- [x] ConnectClusterNodes
- [x] GetClusterLayout
- [x] UpdateClusterLayout
- [x] ApplyClusterLayout
- [x] RevertClusterLayout
**Key-related endpoints:**
- [x] ListKeys
- [x] CreateKey
- [x] ImportKey
- [x] GetKeyInfo
- [x] UpdateKey
- [x] DeleteKey
**Bucket-related endpoints:**
- [x] ListBuckets
- [x] CreateBucket
- [x] GetBucketInfo
- [x] DeleteBucket
- [x] PutBucketWebsite
- [x] DeleteBucketWebsite
**Operations on key/bucket permissions:**
- [x] BucketAllowKey
- [x] BucketDenyKey
**Operations on bucket aliases:**
- [x] GlobalAliasBucket
- [x] GlobalUnaliasBucket
- [x] LocalAliasBucket
- [x] LocalUnaliasBucket
**And also:**
- [x] Separate error type for the admin API (this PR includes a quite big refactoring of error handling)
- [x] Add management of website access
- [ ] Check that nothing is missing wrt what can be done using the CLI
- [ ] Improve formatting of the spec
- [x] Make sure everyone is cool with the API design
Fix #231
Fix #295
Co-authored-by: Alex Auvolat <alex@adnab.me >
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/298
Co-authored-by: Alex <alex@adnab.me >
Co-committed-by: Alex <alex@adnab.me >
2022-05-24 12:16:39 +02:00