Skip to content

Spapadop/plt 881 volumemount path validation incorrectly uses filepath#25

Merged
spapa013 merged 1 commit intonauticalab:develop/spapadopfrom
spapa013:spapadop/plt-881-volumemount-path-validation-incorrectly-uses-filepath
Mar 6, 2026
Merged

Spapadop/plt 881 volumemount path validation incorrectly uses filepath#25
spapa013 merged 1 commit intonauticalab:develop/spapadopfrom
spapa013:spapadop/plt-881-volumemount-path-validation-incorrectly-uses-filepath

Conversation

@spapa013
Copy link
Collaborator

@spapa013 spapa013 commented Mar 5, 2026

Depends on #24
Stacked logically on #24; will rebase after #24 merges.

Summary

  • replace filepath validation on VolumeMount.localPath and VolumeMount.containerPath with mount_path
  • implement mount_path as syntax-only validation (absolute path shape), with no filesystem checks
  • add regression tests to verify:
    • /mnt is accepted
    • /mnt/data is accepted
    • empty mount paths are rejected

Problem

filepath validation is filesystem-dependent and file-oriented (os.Stat-based), so valid directory mount roots like /mnt were being rejected during devenv generate depending on runtime environment.

Validation

  • automated: go test -v -race -covermode=atomic -coverprofile=./coverage.out ./... (pass)
  • manual: generated config, SSH’d into pod, and confirmed /mnt mounted as expected

@spapa013 spapa013 requested a review from eywalker March 5, 2026 20:37
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/config/validation.go 71.42% 5 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@spapa013 spapa013 changed the base branch from main to develop/spapadop March 6, 2026 19:28
@spapa013 spapa013 force-pushed the spapadop/plt-881-volumemount-path-validation-incorrectly-uses-filepath branch from 4378b81 to f24cbf3 Compare March 6, 2026 19:46
@spapa013 spapa013 merged commit bd8eecf into nauticalab:develop/spapadop Mar 6, 2026
@spapa013 spapa013 mentioned this pull request Mar 6, 2026
@spapa013 spapa013 deleted the spapadop/plt-881-volumemount-path-validation-incorrectly-uses-filepath branch March 6, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant