Skip to content

fix: allow empty comment to clear volume comment - #1728

Open
waterWang wants to merge 1 commit into
unitycatalog:mainfrom
waterWang:main
Open

waterWang wants to merge 1 commit into
unitycatalog:mainfrom
waterWang:main

Conversation

@waterWang

Copy link
Copy Markdown

Fix

Allow setting an empty comment to clear volume comments in UpdateVolumeRequestContent.

Problem

The UpdateVolumeRequestContent OpenAPI schema has comment with minLength: 1, which generates a Pydantic model that rejects empty strings. This prevents users from deleting/clearing a volume comment after it has been set.

Reproduction

update_volume_request_content = UpdateVolumeRequestContent(comment=None)

Fails with:

pydantic_core._pydantic_core.ValidationError: 1 validation error for UpdateVolumeRequestContent
comment
  String should have at least 1 character [type=string_too_short, input_value=, input_type=str]

Fix

Changed minLength: 1 to minLength: 0 on the comment field in UpdateVolumeRequestContent in the OpenAPI spec (api/all.yaml). This allows empty strings and null values to be accepted.

Closes #1727

@waterWang
waterWang requested review from dennyglee and tdas as code owners July 28, 2026 16:58
@yili-db

yili-db commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Please remove the token/hash in the PR title.

@yili-db
yili-db self-requested a review August 6, 2026 18:58

@yili-db yili-db left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the hash/token in the title

@yili-db yili-db changed the title fix: allow empty comment to clear volume comment [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] fix: allow empty comment to clear volume comment Sep 4, 2026

This branch has not been deployed

No deployments
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.

Unable to delete volume comment

2 participants