Commit Graph

608 Commits

Author SHA1 Message Date
Alex Auvolat 03e6020c6b admin api: report avilable space numerically in GetClusterStatistics 2026-03-17 17:44:29 +00:00
milouz1985 836657565e s3: fix DeleteObjects XML parsing with pretty-printed bodies (#1374)
## Summary

This PR fixes S3 `DeleteObjects` XML parsing when the request body is pretty-printed (contains indentation/newlines as whitespace text nodes).

Although PR #1324 already tried to address this, parsing could still fail with:

`InvalidRequest: Bad request: Invalid delete XML query`

because non-element nodes were validated but not actually skipped in the parsing loop.

## What changed

- In `src/api/s3/delete.rs`:
  - Properly skip non-element whitespace text nodes while iterating over `<Delete>` children.
  - Keep rejecting non-whitespace stray text content.
  - Parse the root `<Delete>` element more robustly by selecting the first element child.

## Tests added

New unit tests in `src/api/s3/delete.rs`:

- `parse_delete_objects_xml_with_formatting`
  - pretty-printed valid XML is accepted.
- `parse_delete_objects_xml_accepts_compact_valid_xml`
  - compact valid XML is accepted.
- `parse_delete_objects_xml_rejects_non_whitespace_text_node`
  - compact XML with stray text is rejected.
- `parse_delete_objects_xml_rejects_pretty_print_with_stray_text`
  - pretty-printed XML with stray text is rejected.

## Validation

Executed:

```bash
cargo test -p garage_api_s3 parse_delete_objects_xml -- --nocapture
```

Result: all parser tests pass.
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1374
Co-authored-by: milouz1985 <francois.hoyez@gmail.com>
Co-committed-by: milouz1985 <francois.hoyez@gmail.com>
2026-03-15 10:40:50 +00:00
trinity-1686a 76592723de don't send empty 404 on GetBucketCORS/GetBucketLifecycle (#1378)
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1378
Reviewed-by: Alex <lx@deuxfleurs.fr>
Co-authored-by: trinity-1686a <trinity@deuxfleurs.fr>
Co-committed-by: trinity-1686a <trinity@deuxfleurs.fr>
2026-03-10 09:41:08 +00:00
Ira Iva d2f033641e Suppress log noise from /metrics and /health endpoints [#1292]. Change log level for 'netapp: incomming connection ...' message [#1310] (#1361)
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1361
Co-authored-by: Ira Iva <xatikopro@gmail.com>
Co-committed-by: Ira Iva <xatikopro@gmail.com>
2026-03-03 15:52:53 +00:00
Roman Ivanov 2cfd92e0c3 Use error NoSuchAccessKey in get info request processing (#1293) (#1356)
Fix for https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/1293

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1356
Reviewed-by: Alex <lx@deuxfleurs.fr>
Co-authored-by: Roman Ivanov <xatikopro@gmail.com>
Co-committed-by: Roman Ivanov <xatikopro@gmail.com>
2026-02-27 18:11:57 +00:00
Quentin Dufour f796df8c34 Support streaming of gzip content involving multiple Content-Encoding headers (#1369)
## Problem

`hugo deploy` is broken with Garage on recent hugo versions when using gzip matchers

## Why?

We don't support multi-value headers correctly, in this case this specific headers combination:

```
Content-Encoding: gzip
Content-Encoding: aws-chunked
```

is interpreted as:

```
Content-Encoding: gzip
```

instead of:

```
Content-Encoding: gzip,aws-chunked
```

It fails both 1. the signature check and 2. the streaming check.

## Proposed fix

 - Taking into account multi-value headers when building Canonical Request (validated with hugo deploy + AWS SDK v2)
 - Taking into account multi-value headers (both comma separated and HeaderEntry separated) when removing `aws-chunked` (validated with hugo deploy + AWS SDK v2)

## Full explanation

Currently, `hugo deploy` on version `hugo v0.152.2` or more recent uses AWS SDK v2 only and supports for sending gzipped content.
That's configured with a matcher like that:

```yaml
deployment:
  matchers:
    - pattern: "^.+\\.(woff2|woff|svg|ttf|otf|eot|js|css)$"
      cacheControl: "max-age=31536000, no-transform, public"
      gzip: true  # <-------- here
```

Also, with SDK v2, hugo is streaming all of its files.
Thus, it sends that kind of requests:

```python
Request {
  method: PUT,
  uri: /sebou/pagefind/pagefind.js?x-id=PutObject,
  version: HTTP/1.1,
  headers: {
    "host": "localhost",
    "user-agent": "aws-sdk-go-v2/1.39.2 ua/2.1 os/linux lang/go#1.25.6 md/GOOS#linux md/GOARCH#amd64 api/s3#1.84.0 ft/s3-transfer m/E,G,Z,g",
    "content-length": "10026",
    "accept-encoding": "identity",
    "amz-sdk-invocation-id": "aed6df34-a67c-4bab-b63b-2b3777b751a0",
    "amz-sdk-request": "attempt=1; max=3",
    "authorization": "AWS4-HMAC-SHA256 Credential=GKxxxxx/20260227/garage/s3/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;amz-sdk-request;cache-control;content-encoding;content-length;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-md5chksum;x-amz-trailer, Signature=76cd9b77f693ca89c2e6dd2a4dc55f83d4a82eca0f563d9d095ff96076f7b057",
    "cache-control": "max-age=31536000, no-transform, public",
    "content-encoding": "gzip",                                           # <---- see here 1st instance of Content-Encoding
    "content-encoding": "aws-chunked",                                    # <---- 2nd instance of Content-Encoding
    "content-type": "text/javascript",
    "via": "2.0 Caddy",
    "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
    "x-amz-date": "20260227T132212Z",
    "x-amz-decoded-content-length": "9982",
    "x-amz-meta-md5chksum": "aad88ac0bf704e91584b8d9ad9796670",
    "x-amz-trailer": "x-amz-checksum-crc32",
    "x-forwarded-for": "::1",
    "x-forwarded-host": "localhost",
    "x-forwarded-proto": "https"
  },
  body: Body(Streaming)
}
```

But our canonical request function only calls `HeaderMap.get()` that returns only the 1st value and not `HeaderMap.get_all()` that returns all the values for a header.
Leading to the following invalid `CanonicalRequest` value:

```python
PUT
/sebou/pagefind/pagefind.js
x-id=PutObject
accept-encoding:identity
amz-sdk-invocation-id:aed6df34-a67c-4bab-b63b-2b3777b751a0
amz-sdk-request:attempt=1; max=3
cache-control:max-age=31536000, no-transform, public
content-encoding:gzip                                                             # <----- see here, we kept only gzip and dropped aws-chunked
content-length:10026
content-type:text/javascript
host:localhost
x-amz-content-sha256:STREAMING-UNSIGNED-PAYLOAD-TRAILER
x-amz-date:20260227T132212Z
x-amz-decoded-content-length:9982
x-amz-meta-md5chksum:aad88ac0bf704e91584b8d9ad9796670
x-amz-trailer:x-amz-checksum-crc32

accept-encoding;amz-sdk-invocation-id;amz-sdk-request;cache-control;content-encoding;content-length;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-meta-md5chksum;x-amz-trailer
```

Amazon is crystal clear that, instead of dropping the other values, we should concatenate them with a comma:

![20260227_17h26m20s_grim](/attachments/e3edf7bf-7dff-43d7-80d9-cf276ae94ed5)

https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#create-canonical-request
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1369
Reviewed-by: Alex <lx@deuxfleurs.fr>
Co-authored-by: Quentin Dufour <quentin@deuxfleurs.fr>
Co-committed-by: Quentin Dufour <quentin@deuxfleurs.fr>
2026-02-27 18:02:31 +00:00
Gwen Lg 290a7f5ab6 fix: VersioningConfiguration xml reference
empty element handling is set as expanded and be consistant.
2026-02-20 21:29:26 +00:00
Gwen Lg 2576626240 fix: configure xmk serializer to expand empty elements 2026-02-20 21:29:26 +00:00
Gwen Lg 6591044c2e fix: set quote level to full for xml serialization
also remove use of intermediate String
2026-02-20 21:29:26 +00:00
Gwen Lg 1ae4e5d438 fix: mark to skip serialization of Option when None
mark with `skip_serializing_if = "Option::is_none"`
2026-02-20 21:29:26 +00:00
Gwen Lg d80096de92 fixup: fix xml attibute xmlns serialization
rename var with "@xmlns"
2026-02-20 21:29:26 +00:00
Gwen Lg 674c2c1cb1 chore: update quick-xml dep
rework associated error, and fixup error for XML serialization.
Should be InternalError/INTERNAL_SERVER_ERROR not MalformedXML/BAD_REQUEST
2026-02-20 21:29:26 +00:00
Gwen Lg 3c5018bd6b refactor: use str trim result to parse xml
- use `trim` method of `str` instead of manual implementation with `trim_matches(char::is_whitespace)`
- use result of `trim` for xml parsing instead of use the `str` before trim.
2026-02-20 21:29:26 +00:00
Gwen Lg 93cd71eb72 test: add unprettify_xml helper and use it
this replace previous cleanup which remove space between `element` and `attribute` name in xml
2026-02-20 21:29:26 +00:00
Gwen Lg 780f389973 test: replace some unwrap with expect in tests
this add more information in case of failure
2026-02-20 21:29:26 +00:00
Roman Ivanov ce1ea79bf1 Implement error 409 BucketAlreadyOwnedByYou (#1352)
Fix for Deuxfleurs/garage#1322

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1352
Co-authored-by: Roman Ivanov <xatikopro@gmail.com>
Co-committed-by: Roman Ivanov <xatikopro@gmail.com>
2026-02-18 11:20:24 +00:00
Gwen Lg 9b3e4716bf refactor: rework uri_encode to limit allocation
add add some related tests.

catched from clippy lint `format_collect`
message: use of `format!` to build up a string from an iterator
  --> src/api/common/encoding.rs:12:17
   |
12 |                   let value = format!("{}", c)
   |  _____________________________^
13 | |                     .bytes()
14 | |                     .map(|b| format!("%{:02X}", b))
15 | |                     .collect::<String>();
   | |________________________________________^
   |
help: call `fold` instead
  --> src/api/common/encoding.rs:14:7
   |
14 |                     .map(|b| format!("%{:02X}", b))
   |                      ^^^
help: ... and use the `write!` macro here
  --> src/api/common/encoding.rs:14:15
   |
14 |                     .map(|b| format!("%{:02X}", b))
   |                              ^^^^^^^^^^^^^^^^^^^^^
   = note: this can be written more efficiently by appending to a `String` directly
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#format_collect
2026-02-17 18:38:44 +00:00
Gwen Lg 83f8bdbacd refactor: remove unnecessarily wrap value into a Result
this simplify code and remove some unwrap.
warning: this function's return value is unnecessarily wrapped by `Result`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_wraps
2026-02-17 18:38:44 +00:00
Gwen Lg b060a7e0f1 fix: remove func call from alternative value.
this avoid useless allocation or non-trivial work, if the default value
is not needed/used.

add a line in Cargo.toml to easly enable or_fun_call lint
help: https://rust-lang.github.io/rust-clippy/master/index.html?search=or_fun_call
2026-02-17 18:38:44 +00:00
Gwen Lg f59a8b7f62 style: corrects the use of ';' to improve readability
- remove unnecessary semicolon
and enable lint warning: unnecessary semicolon
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_semicolon
- add `;` to the last statement for consitent formatting
and enable lint `clippy::semicolon_if_nothing_returned`
warning: consider adding a `;` to the last statement for consistent formatting
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#semicolon_if_nothing_returned
2026-02-17 18:38:44 +00:00
Gwen Lg 08fd6e659f docs: add missing backticks in documentation
this improve readability of documentation.
enable associated clippy lint `doc_markdown`
2026-02-17 18:38:44 +00:00
Gwen Lg 6cde00073f chore: enable workspace configuration of lints in Cargo.toml
and use workspace configuration in each package.
This allow to customize clippy and rust lint configuration for project.
No particular configuration in this commit.
2026-02-17 18:38:44 +00:00
trinity-1686a b0840ab256 emit headers on Not Modified per RFC-9110, fix #1330 (#1340)
also fix a small information disclosure where a client with valid token, but no encryption keys, can use Not Modified has an oracle to know if etag matches or not

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1340
Co-authored-by: trinity-1686a <trinity@deuxfleurs.fr>
Co-committed-by: trinity-1686a <trinity@deuxfleurs.fr>
2026-02-15 11:00:31 +00:00
Gwen Lg c82015f6cf chore: update nom dependency to 0.8
update syntax with :
- add explicit call of `parse` method
- add ref slice management for `tag` fn
2026-02-14 19:25:49 +00:00
Gwen Lg 6f511fc149 style: replace wildcard import of garage model in website
this avoid rust-analyzer indicate invalid field error on `Redirect` for
`replace_prefix` and `replace_full` because of a conflict between struct :
`api::s3::website::Redirect` and `model::bucket_table::Redirect`
2026-02-14 18:21:31 +00:00
bytechunk b012431df0 S3 api DeleteObject fix invalid XML (#1324)
linked to #1323

Do only check element nodes when validating XML content (skip text
nodes).

If text nodes are skipped then the validation fails when providing
formatted XML content as body of the request.

Co-authored-by: frederic vroman <fred@lesmouths.net>
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1324
Co-authored-by: bytechunk <bytechunk.a52b055@track-it.pw>
Co-committed-by: bytechunk <bytechunk.a52b055@track-it.pw>
2026-02-09 13:05:58 +00:00
Gwen Lg b0ee7dd3c9 chore: localy disable some lints
- clippy::nonminimal_bool disabled for check_size_filter function
clippy message: this boolean expression can be simplified
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#nonminimal_bool
- clippy::large_enum_variant for `DecryptStreamState` and `State`
- clippy::too_many_arguments for `put_block_and_meta` and
  `test_read_encrypted`
- clippy::deref_addrof for specific unsafe code
- clippy::doc_overindented_list_items and clippy::doc_lazy_continuation
2026-01-29 20:49:28 +01:00
Gwen Lg 4a0be692b3 docs: various fixes in Rust code documentation
- add backticks on struct doc comments
lint message: unclosed HTML tag `M`
- add a blanck line for proper doc formating
lint message: doc list item without indentation
help: if this is supposed to be its own paragraph, add a blank line
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation
- fix hyperlink in doc + one url invalid
lint message: this URL is not a hyperlink
note: bare URLs are not automatically turned into clickable links
- ajust space in doc
lint message: doc list item overindented
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
2026-01-29 20:49:28 +01:00
Gwen Lg 24e11e99ee style: some small fixes
- remove invalid struct pattern
lint message: struct pattern is not needed for a unit variant
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unneeded_struct_pattern
- remove call to default() on unit struct
lint message: use of `default` to create a unit struct
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#default_constructed_unit_structs
- replace if/else by direct affectation
lint message: this if-then-else expression assigns a bool literal
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_bool_assign
- replace assert_eq on unit by `unwrap` + let typed binding
2026-01-29 20:49:28 +01:00
Gwen Lg bddd23136b refactor: reduce number of arguments by use struct
- create and use HandleInfo and DestInfo to reduce number of arguments
lint message: warning: this function has too many arguments (9/7)
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#too_many_arguments
2026-01-29 20:49:28 +01:00
Gwen Lg a426b00e87 style: collapse nested if block
lint message: this `if` statement can be collapsed
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
2026-01-29 20:49:28 +01:00
Gwen Lg 8772db8228 refactor: rename method to avoid confusion
- rename SqliteDb::new to `_::open` as it's not return Self
lint message: methods called `new` usually return `Self`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self
- rename method `add` to `add_calgorithm`
The semantics of this has nothing to do with an `add` operation in the sense of the `Add` trait.
And method `add` can be confused for the standard trait method std::ops::Add::add
lint https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#should_implement_trait
2026-01-29 20:49:28 +01:00
Gwen Lg 6dbcdcd784 style: improve use of std api
- replace get(0) by first()
lint message: accessing first element with `objs.get(0)`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#get_first
- use io::Error::other method available since Rust 1.87
lint message: this can be `std::io::Error::other(_)`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#io_other_error
- implement From<_> instead of Into<_>
lint message: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
            https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#from_over_into
- use next_back instead of rev + next
lint message: manual backwards iteration
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#manual_next_back
- use saturating_sub instead of manual implement it
lint message: manual arithmetic check found
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#implicit_saturating_sub
- add Default implementation for Checksummer
use derived Default ans use it in new, as new set all value to None
lint message: you should consider adding a `Default` implementation for `Checksummer`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_without_default
- use `any` instead of `find` + `is_some`
lint message: called `is_some()` after searching an `Iterator` with `find`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#search_is_some
- replace `and_then` + `Some(_)` with `map`
lint message: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#bind_instead_of_map
- replace `skip_while` + `next` with `find`
lint message: called `skip_while(<p>).next()` on an `Iterator`
help: this is more succinctly expressed by calling `.find(!<p>)` instead
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#skip_while_next
- use `matches!` instead of manual implementation
lint message: match expression looks like `matches!` macro
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_like_matches_macro
- use `keys` and `values methods insteads of iterating and ignoring either the keys or values.
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#iter_kv_map
2026-01-29 20:49:28 +01:00
Gwen Lg f2f6669bf0 style: clean use for question_mark
- remove useless `Ok` enclosing with `?`
lint message: enclosing `Ok` and `?` operator are unneeded
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_question_mark
- use question mark instead of manual implementation
lint message: this `match` expression can be replaced with `?`
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
2026-01-29 20:49:28 +01:00
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 ea9597819c refactor: clean perf related
- use array instead of vec when it's useless
clippy lint message: useless use of `vec!` help: you can use an array directly.
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_vec
- call as_bytes before slicing
lint message: calling `as_bytes` after slicing a string
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#sliced_string_as_bytes

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
Gwen Lg 295c850380 chore: add taplo.toml and resave Cargo.toml
Signed-off-by: Gwen Lg <me@gwenlg.fr>
2026-01-29 20:49:28 +01:00
Gwen Lg 014bebfa1f chore: improve code readability by rename pn var in part_number 2026-01-29 14:53:27 +01:00
Gwen Lg e331f88c85 chore: fix typos in rust code comment or error message 2026-01-29 14:53:27 +01:00
Alex Auvolat 582b168b6a bump version to v2.2.0 2026-01-24 12:32:22 +01:00
Alex Auvolat cd641a9ed2 Merge branch 'main-v1' into merge-v1 2026-01-24 09:56:02 +01:00
joeanderson 77ef3c85ea Merge branch 'main-v2' into fix/presigned-post-bucket 2026-01-18 15:38:28 +00:00
Joe Anderson 79c7126b67 Allow bucket to be missing from presigned post params 2026-01-18 15:08:59 +00:00
Alex Auvolat cf2f058f60 openapi: work around issue for flattenned untagged enum (fix #1249) 2026-01-06 10:11:12 +01:00
perrynzhou@gmail.com e3a5ec6ef6 rename put_blocks_max_parallel to block_max_concurrent_writes_per_request and update configuration.md 2025-12-12 07:09:38 +08:00
perrynzhou@gmail.com 4d124e1c76 Add the parameter, which replaces . This is to accommodate different storage media such as HDD and NVMe. 2025-12-10 06:43:51 +08:00
Alex 58bc65b9a8 Merge pull request 'migrate to this error, garage-v1' (#1218) from thiserror into main-v1
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1218
Reviewed-by: Alex <lx@deuxfleurs.fr>
2025-11-12 08:05:32 +00:00
trinity-1686a ef913843f7 fmt 2025-11-01 19:35:11 +01:00
trinity-1686a ac851d6dee fmt 2025-11-01 18:04:54 +01:00