Skip to content

Conversation

@ANAMASGARD
Copy link

Replace filepath.Join with path.Join for constructing object storage paths to fix issue #8361 where Thanos fails to load blocks from MinIO on Windows.

filepath.Join uses OS-specific path separators (backslash on Windows), but object storage systems require forward slashes in object keys. path.Join always uses forward slashes regardless of OS.

Fixes #8361

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • pkg/block/indexheader/binary_reader.go: Replaced filepath.Join with path.Join for index path construction passed to bucket operations
  • pkg/compact/planner.go: Replaced filepath.Join with path.Join for bucket attribute path construction

Verification

  • Ran make format successfully
  • Ran go build ./pkg/block/indexheader/... ./pkg/compact/... successfully
  • Ran make build successfully
  • Code review confirmed only object storage paths were changed, local filesystem paths remain using filepath.Join

Replace filepath.Join with path.Join for constructing object storage paths
to fix issue thanos-io#8361 where Thanos fails to load blocks from MinIO on Windows.

filepath.Join uses OS-specific path separators (backslash on Windows),
but object storage systems require forward slashes in object keys.
path.Join always uses forward slashes regardless of OS.

Changes:
- pkg/block/indexheader/binary_reader.go: Use path.Join for index path
- pkg/compact/planner.go: Use path.Join for bucket attribute calls

Fixes thanos-io#8361

Signed-off-by: Gauarv Chaudhary <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

thanos store fails to load blocks from MinIO on Windows: “Object name contains unsupported characters”

1 participant