8000 [pull] master from minio:master by pull[bot] · Pull Request #468 · kokizzu/minio · GitHub
[go: up one dir, main page]

Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Designed for speed and scalability, it powers AI/ML, analytics, and data-intensi
- High Performance – Ideal for demanding storage workloads.

This README provides instructions for building MinIO from source and deploying onto baremetal hardware.
For more complete documentation, see [the MinIO documentation website](https://docs.min.io/community/minio-object-store/index.html)
Use the [MinIO Documentation](https://github.com/minio/docs) project to build and host a local copy of the documentation.

## MinIO is Open Source Software

Expand Down
2 changes: 1 addition & 1 deletion cmd/admin-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func registerAdminRouter(router *mux.Router, enableConfigOps bool) {
adminRouter.Methods(http.MethodPut).Path(adminVersion + "/import-iam").HandlerFunc(adminMiddleware(adminAPI.ImportIAM, noGZFlag))
adminRouter.Methods(http.MethodPut).Path(adminVersion + "/import-iam-v2").HandlerFunc(adminMiddleware(adminAPI.ImportIAMV2, noGZFlag))

// IDentity Provider configuration APIs
// Identity Provider configuration APIs
adminRouter.Methods(http.MethodPut).Path(adminVersion + "/idp-config/{type}/{name}").HandlerFunc(adminMiddleware(adminAPI.AddIdentityProviderCfg))
adminRouter.Methods(http.MethodPost).Path(adminVersion + "/idp-config/{type}/{name}").HandlerFunc(adminMiddleware(adminAPI.UpdateIdentityProviderCfg))
adminRouter.Methods(http.MethodGet).Path(adminVersion + "/idp-config/{type}").HandlerFunc(adminMiddleware(adminAPI.ListIdentityProviderCfg))
Expand Down
2 changes: 1 addition & 1 deletion cmd/metrics-resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func init() {
cpuLoad1: "CPU load average 1min",
cpuLoad5: "CPU load average 5min",
cpuLoad15: "CPU load average 15min",
cpuLoad1Perc: "CPU load average 1min (perentage)",
cpuLoad1Perc: "CPU load average 1min (percentage)",
cpuLoad5Perc: "CPU load average 5min (percentage)",
cpuLoad15Perc: "CPU load average 15min (percentage)",
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/metrics-v3-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (h *metricsV3Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// it's the last part of the path. e.g. /bucket/api/<bucket-name>
bucketIdx := strings.LastIndex(pathComponents, "/")
buckets = append(buckets, pathComponents[bucketIdx+1:])
// remove bucket from pathComponents as it is dyanamic and
// remove bucket from pathComponents as it is dynamic and
// hence not included in the collector path.
pathComponents = pathComponents[:bucketIdx]
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/net_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func TestSortIPs(t *testing.T) {
ipList: []string{"127.0.0.1"},
sortedIPList: []string{"127.0.0.1"},
},
// Non parsable ip is assumed to be hostame and gets preserved
// Non parsable ip is assumed to be hostname and gets preserved
// as the left most elements, regardless of IP based sorting.
{
ipList: []string{"hostname", "127.0.0.1", "192.168.1.106"},
Expand Down
6 changes: 3 additions & 3 deletions cmd/object-api-listobjects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ func _testListObjects(obj ObjectLayer, instanceType string, t1 TestErrHandler, v
{"test-bucket-list-object", "", "", "", -1, resultCases[0], nil, true},
// Testing for very large value of maxKey, this should set maxKeys to listObjectsLimit (20).
{"test-bucket-list-object", "", "", "", 1234567890, resultCases[0], nil, true},
// Testing for trancated value (21-24).
// Testing for truncated value (21-24).
{"test-bucket-list-object", "", "", "", 5, resultCases[1], nil, true},
{"test-bucket-list-object", "", "", "", 4, resultCases[2], nil, true},
{"test-bucket-list-object", "", "", "", 3, resultCases[3], nil, true},
Expand Down Expand Up @@ -1167,7 +1167,7 @@ func testListObjectVersions(obj ObjectLayer, instanceType string, t1 TestErrHand
}
}

// Formualting the result data set to be expected from ListObjects call inside the tests,
// Formulating the result data set to be expected from ListObjects call inside the tests,
// This will be used in testCases and used for asserting the correctness of ListObjects output in the tests.

resultCases := []ListObjectsInfo{
Expand Down Expand Up @@ -1591,7 +1591,7 @@ func testListObjectVersions(obj ObjectLayer, instanceType string, t1 TestErrHand
{"test-bucket-list-object", "", "", "", -1, resultCases[0], nil, true},
// Testing for very large value of maxKey, this should set maxKeys to listObjectsLimit (18).
{"test-bucket-list-object", "", "", "", 1234567890, resultCases[0], nil, true},
// Testing for trancated value (19-22).
// Testing for truncated value (19-22).
{"test-bucket-list-object", "", "", "", 5, resultCases[1], nil, true},
{"test-bucket-list-object", "", "", "", 4, resultCases[2], nil, true},
{"test-bucket-list-object", "", "", "", 3, resultCases[3], nil, true},
Expand Down
2 changes: 1 addition & 1 deletion cmd/signature-v4-parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func parseCredentialHeader(credElement string, region string, stype serviceType)
if creds[0] != "Credential" {
return ch, ErrMissingCredTag
}
credElements := strings.Split(strings.TrimSpace(creds[1]), SlashSeparator)
credElements := strings.Split(strings.TrimRight(strings.TrimSpace(creds[1]), SlashSeparator), SlashSeparator)
if len(credElements) < 5 {
return ch, ErrCredMalformed
}
Expand Down
19 changes: 19 additions & 0 deletions cmd/signature-v4-parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,25 @@ func TestParseCredentialHeader(t *testing.T) {
"aws4_request"),
expectedErrCode: ErrNone,
},
// Test Case - 12.
// Test case with right inputs but trailing `/`. Expected to return a valid CredentialHeader.
// "aws4_request" is the valid request version.
{
inputCredentialStr: generateCredentialStr(
"Z7IXGOO6BZ0REAN1Q26I",
sampleTimeStr,
"us-west-1",
"s3",
"aws4_request/"),
expectedCredentials: generateCredentials(
t,
"Z7IXGOO6BZ0REAN1Q26I",
sampleTimeStr,
"us-west-1",
"s3",
"aws4_request"),
expectedErrCode: ErrNone,
},
}

for i, testCase := range testCases {
Expand Down
2 changes: 1 addition & 1 deletion docs/debugging/inspect/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/minio/minio/docs/debugging/inspect

go 1.23.0

toolchain go1.24.2
toolchain go1.24.8

require (
github.com/klauspost/compress v1.17.11
Expand Down
2 changes: 2 additions & 0 deletions docs/debugging/pprofgoparser/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/minio/minio/docs/debugging/pprofgoparser

go 1.21

toolchain go1.24.8
2 changes: 2 additions & 0 deletions docs/debugging/reorder-disks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ module github.com/minio/minio/docs/debugging/reorder-disks

go 1.21

toolchain go1.24.8

require github.com/minio/pkg/v3 v3.0.1
2 changes: 1 addition & 1 deletion docs/debugging/s3-verify/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/minio/minio/docs/debugging/s3-verify

go 1.23.0

toolchain go1.24.2
toolchain go1.24.8

require github.com/minio/minio-go/v7 v7.0.83

Expand Down
2 changes: 2 additions & 0 deletions docs/debugging/xattr/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/minio/minio/docs/debugging/xattr

go 1.21

toolchain go1.24.8

require (
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/xattr v0.4.9
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/minio/minio

go 1.24.0

toolchain go1.24.2
toolchain go1.24.8

// Install tools using 'go install tool'.
tool (
Expand Down
38 changes: 19 additions & 19 deletions internal/grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ and other connections will be blocked while the large payload is being sent.

## Handlers & Routes

Handlers have a predefined Handler ID.
Handlers have a predefined Handler ID.
In addition, there can be several *static* subroutes used to differentiate between different handlers of the same ID.
A subroute on a client must match a subroute on the server. So routes cannot be used for dynamic routing, unlike HTTP.

Expand All @@ -33,14 +33,14 @@ Handlers should remain backwards compatible. If a breaking API change is require

A **Manager** is used to manage all incoming and outgoing connections to a server.

On startup all remote servers must be specified.
From that individual connections will be spawned to each remote server,
On startup all remote servers must be specified.
From that individual connections will be spawned to each remote server,
or incoming requests will be hooked up to the appropriate connection.

To get a connection to a specific server, use `Manager.Connection(host)` to get a connection to the specified host.
From this connection individual requests can be made.

Each handler, with optional subroutes can be registered with the manager using
Each handler, with optional subroutes can be registered with the manager using
`Manager.RegisterXHandler(handlerID, handler, subroutes...)`.

A `Handler()` function provides an HTTP handler, which should be hooked up to the appropriate route on the server.
Expand Down Expand Up @@ -75,7 +75,7 @@ Sample call:
```go
// Get a connection to the remote host
conn := manager.Connection(host)

payload := []byte("request")
response, err := conn.SingleRequest(ctx, grid.HandlerDiskInfo, payload)
```
Expand All @@ -85,7 +85,7 @@ If the error type is `*RemoteErr`, then the error was returned by the remote ser
Context timeouts are propagated, and a default timeout of 1 minute is added if none is specified.

There is no cancellation propagation for single payload requests.
When the context is canceled, the request will return at once with an appropriate error.
When the context is canceled, the request will return at once with an appropriate error.
However, the remote call will not see the cancellation - as can be seen from the 'missing' context on the handler.
The result will be discarded.

Expand All @@ -102,14 +102,14 @@ In the examples we use a `MSS` type, which is a `map[string]string` that is `msg
// Do something with payload
return NewMSSWith(map[string]string{"result": "ok"}), nil
}

// Create a typed handler.
// Due to current generics limitations, a constructor of the empty type must be provided.
instance := grid.NewSingleHandler[*grid.MSS, *grid.MSS](h, grid.NewMSS, grid.NewMSS)

// Register the handler on the manager
instance.Register(manager, handler)

// The typed instance is also used for calls
conn := manager.Connection("host")
resp, err := instance.Call(ctx, conn, grid.NewMSSWith(map[string]string{"myfield": "myvalue"}))
Expand All @@ -118,7 +118,7 @@ In the examples we use a `MSS` type, which is a `map[string]string` that is `msg
}
```

The wrapper will handle all serialization and de-seralization of the request and response,
The wrapper will handle all serialization and de-serialization of the request and response,
and furthermore provides reuse of the structs used for the request and response.

Note that Responses sent for serialization are automatically reused for similar requests.
Expand All @@ -143,7 +143,7 @@ Sample handler:
case req, ok := <-in:
if !ok {
break
}
}
// Do something with payload
out <- []byte("response")

Expand All @@ -167,7 +167,7 @@ Sample call:
```go
// Get a connection to the remote host
conn := manager.Connection(host).Subroute("asubroute")

payload := []byte("request")
stream, err := conn.NewStream(ctx, grid.HandlerDiskInfo, payload)
if err != nil {
Expand All @@ -183,12 +183,12 @@ Sample call:
})
```

Context cancellation and timeouts are propagated to the handler.
Context cancellation and timeouts are propagated to the handler.
The client does not wait for the remote handler to finish before returning.
Returning any error will also cancel the stream remotely.

CAREFUL: When utilizing two-way communication, it is important to ensure that the remote handler is not blocked on a send.
If the remote handler is blocked on a send, and the client is trying to send without the remote receiving,
If the remote handler is blocked on a send, and the client is trying to send without the remote receiving,
the operation would become deadlocked if the channels are full.

### Typed handlers
Expand All @@ -215,24 +215,24 @@ Typed handlers are handlers that have a specific type for the request and respon
// out is closed by the caller and should never be closed by the handler.
return nil
}

// Create a typed handler.
// Due to current generics limitations, a constructor of the empty type must be provided.
instance := grid.NewStream[*Payload, *Req, *Resp](h, newPayload, newReq, newResp)

// Tweakable options
instance.WithPayload = true // default true when newPayload != nil
instance.OutCapacity = 1 // default
instance.InCapacity = 1 // default true when newReq != nil

// Register the handler on the manager
instance.Register(manager, handler, "asubroute")

// The typed instance is also used for calls
conn := manager.Connection("host").Subroute("asubroute")
stream, err := instance.Call(ctx, conn, &Payload{"request payload"})
if err != nil { ... }

// Read results from the stream
err = stream.Results(func(resp *Resp) error {
fmt.Println("Got result", resp)
Expand Down
Loading
0