Skip to content

Accept filter specs that omit id or name when creating datasets - #484

Merged
mattjala merged 1 commit into
masterfrom
fix/filter-spec-normalization
Oct 2, 2026
Merged

mattjala merged 1 commit into
masterfrom
fix/filter-spec-normalization

Conversation

@mattjala

@mattjala mattjala commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

HSDS 1.0.0 rejects any dataset filter that doesn't spell out class, id and name, because creation properties now go straight to h5json's validateFilter. Its own OpenAPI spec doesn't require id or name, and 0.9.x filled them in.

Multiple clients rely on that behavior. The HDF5 REST VOL sends every filter as {"class": ..., "id": ...} with no name, and h5pyd 0.21 sends gzip as {"class": "H5Z_FILTER_DEFLATE", "id": 1, "level": N} and other compressors as {"class": "H5Z_FILTER_USER", "name": ...}, so creating a filtered dataset from either fails. (h5pyd 1.0 builds complete specs with h5json's getFilterItem and isn't affected.)

Dataset creation now runs the filter list through h5json's normalizeFilters before validating it. That fills in a missing id or name from h5json's filter table, and gives a H5Z_FILTER_USER spec whose id or name is a registered filter that filter's class.

normalizeFilters is new in h5json 2.0.1, so this raises the h5json requirement to 2.0.1 and can't merge until that release is published.

HSDS 1.0.0 rejects any dataset filter that doesn't spell out class, id
and name, because creation properties now go straight to h5json's
validateFilter. Its own OpenAPI spec doesn't require id or name, and
0.9.x filled them in.

Multiple clients rely on that behavior. The HDF5 REST VOL sends every
filter as {"class": ..., "id": ...} with no name, and h5pyd 0.21 sends
gzip as {"class": "H5Z_FILTER_DEFLATE", "id": 1, "level": N} and other
compressors as {"class": "H5Z_FILTER_USER", "name": ...}, so creating a
filtered dataset from either fails. (h5pyd 1.0 builds complete specs
with h5json's getFilterItem and isn't affected.)

Dataset creation now runs the filter list through h5json's
normalizeFilters before validating it. That fills in a missing id or
name from h5json's filter table, and gives a H5Z_FILTER_USER spec whose
id or name is a registered filter that filter's class.

normalizeFilters is new in h5json 2.0.1, so this raises the h5json
requirement to 2.0.1 and can't merge until that release is published.
@mattjala mattjala added this to the HSDS 1.1.0 milestone Oct 2, 2026
@mattjala mattjala added the bug label Oct 2, 2026
@mattjala
mattjala merged commit 5028724 into master Oct 2, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from To be triaged to Done in HSDS - TRIAGE & TRACK Oct 2, 2026
@mattjala
mattjala deleted the fix/filter-spec-normalization branch October 2, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

1 participant