Skip to content

Drop metadata with empty keys #9725

@zubron

Description

@zubron

The API currently accepts and stores metadata with empty keys. lakectl and the UI (after #9650) filter or reject these client-side, but the API should handle this for consistency across all clients and to prevent invalid metadata via direct API calls.

Expected behaviour (matches S3):

  • Accept requests with empty keys (don't error)
  • Drop empty keys (don't store them)
PUT: {'': 'value', 'valid': 'key'}
GET: {'valid': 'key'}              (empty key dropped)

Implementation:

  • Drop keys where key is empty or whitespace only
  • Request succeeds (no validation error)

Note: S3 also includes the x-amz-missing-meta header when handling these keys. I've created a separate issue for this (#9727) as it may requires additional design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIImprovements or additions to the APIarea/gatewayChanges to the gateway

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions