Skip to content

fix(storage): add ValidateDiskKey to validate disk key format - #2785

Open
AruneshDwivedi wants to merge 2 commits into
openyurtio:masterfrom
AruneshDwivedi:fix/validatekey-format-2775
Open

fix(storage): add ValidateDiskKey to validate disk key format#2785
AruneshDwivedi wants to merge 2 commits into
openyurtio:masterfrom
AruneshDwivedi:fix/validatekey-format-2775

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Fixes #2775

Add ValidateDiskKey function that validates the internal format of
disk storage keys (component, GVR, namespace/name segments).

Update disk storage Create/Delete/Get/List to call both ValidateKey
(type check) and ValidateDiskKey (format check) before operations.
This catches malformed keys early instead of failing later with
cryptic errors during file system operations.

Add ValidateDiskKey to validate the internal format of disk storage
keys (path structure, GVR format, namespace/name segments).

Update disk storage Create/Delete/Get/List to use ValidateDiskKey
instead of ValidateKey, catching malformed keys before file system
operations instead of failing later with cryptic errors.

Fixes openyurtio#2775

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@AruneshDwivedi
AruneshDwivedi requested a review from a team as a code owner August 29, 2026 08:05
Add ValidateDiskKey function that validates the internal format of
disk storage keys (component, GVR, namespace/name segments).

Update disk storage Create/Delete/Get/List to call both ValidateKey
(type check) and ValidateDiskKey (format check) before operations.
This catches malformed keys early instead of failing later with
cryptic errors during file system operations.

Fixes openyurtio#2775

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@AruneshDwivedi
AruneshDwivedi force-pushed the fix/validatekey-format-2775 branch from 99d22a8 to 1a094a7 Compare August 29, 2026 08:07
@sonarqubecloud

Copy link
Copy Markdown

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.

ValidateKey does not validate the internal format of storage keys

1 participant