Skip to content

S3CSI-225: Port prefix parsing fix from upstream PR #658#324

Draft
anurag4DSB wants to merge 2 commits intomainfrom
improvement/S3CSI-225-prefix-parsing-fix
Draft

S3CSI-225: Port prefix parsing fix from upstream PR #658#324
anurag4DSB wants to merge 2 commits intomainfrom
improvement/S3CSI-225-prefix-parsing-fix

Conversation

@anurag4DSB
Copy link
Copy Markdown
Collaborator

@anurag4DSB anurag4DSB commented Feb 16, 2026

Summary

  • Fix S3 bucket prefix parsing that could silently mount the wrong prefix or fail
  • Root cause: old parser always tried = split first, corrupting prefixes with = characters
  • New parser finds both separator positions, uses whichever appears first

Changes

  • pkg/mountpoint/args.go: Replace ParseArgs() parsing logic with upstream fix
  • pkg/mountpoint/args_test.go: Add 4 new regression test cases for prefixes with =

Test Plan

  • 14/14 TestParsingMountpointArgs unit tests pass (including 4 new)
  • Regression case: "prefix kwk3-di/sub=vault/" correctly parses to --prefix=kwk3-di/sub=vault/
  • E2E test: New test verifies prefix values containing = signs (e.g., prefix=env=prod/) work correctly end-to-end — files stored under the full prefix in S3
  • CI E2E: Mount options suite has 3 existing prefix tests: isolation, prefix usage, and bidirectional S3 API visibility.

Issue: S3CSI-225

Fix S3 bucket prefix parsing that could mount wrong prefix or fail
entirely when prefix values contain equals signs. Uses whichever
separator (space or equals) appears first.

Issue: S3CSI-225
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.92%. Comparing base (75ee0ef) to head (f46bc9b).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
pkg/mountpoint/args.go 100.00% <100.00%> (ø)
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
+ Coverage   71.89%   71.92%   +0.02%     
==========================================
  Files          47       47              
  Lines        2669     2671       +2     
==========================================
+ Hits         1919     1921       +2     
  Misses        622      622              
  Partials      128      128              

Adds an E2E test that verifies the --prefix mount option works correctly
when the prefix value contains equals signs (e.g., prefix=env=prod/).
This is a regression test for the parser fix that ensures the first
separator (space vs equals) is used, preventing value truncation.

Issue: S3CSI-225
@anurag4DSB anurag4DSB marked this pull request as draft February 16, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant