Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require zarr 3 Bytes Codec configuration key #8282

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug that uploading a zarr dataset with an already existing `datasource-properties.json` file failed. [#8268](https://github.com/scalableminds/webknossos/pull/8268)
- Fixed the organization switching feature for datasets opened via old links. [#8257](https://github.com/scalableminds/webknossos/pull/8257)
- Fixed that uploading an NML file without an organization id failed. Now the user's organization is used as fallback. [#8277](https://github.com/scalableminds/webknossos/pull/8277)
- Fixed that the frontend did not ensure a minium length for annotation layer names. Moreover, names starting with a `.` are also disallowed now. [#8244](https://github.com/scalableminds/webknossos/pull/8244)
- Fixed that the frontend did not ensure a minimum length for annotation layer names. Moreover, names starting with a `.` are also disallowed now. [#8244](https://github.com/scalableminds/webknossos/pull/8244)
- Fixed a bug where in the add remote dataset view the dataset name setting was not in sync with the datasource setting of the advanced tab making the form not submittable. [#8245](https://github.com/scalableminds/webknossos/pull/8245)
- Fix read and update dataset route for versions 8 and lower. [#8263](https://github.com/scalableminds/webknossos/pull/8263)
- Fixed that task bounding boxes are again converted to user bounding boxes when uploading annotations via nmls. [#8280](https://github.com/scalableminds/webknossos/pull/8280)
- Added missing legacy support for `isValidNewName` route. [#8252](https://github.com/scalableminds/webknossos/pull/8252)
- Fixed some layout issues in the upload view. [#8231](https://github.com/scalableminds/webknossos/pull/8231)
- Fixed `FATAL: role "postgres" does not exist` error message in Docker compose. [#8240](https://github.com/scalableminds/webknossos/pull/8240)
- Fixed the Zarr 3 implementation not accepting BytesCodec without "configuration" key. [#8282](https://github.com/scalableminds/webknossos/pull/8282)

### Removed
- Removed support for HTTP API versions 3 and 4. [#8075](https://github.com/scalableminds/webknossos/pull/8075)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,19 @@ object Zarr3ArrayHeader extends JsonImplicits {
val codecSpecs = rawCodecSpecs.map(c => {
for {
spec: CodecConfiguration <- c("name") match {
case JsString(BytesCodecConfiguration.name) => c(configurationKey).validate[BytesCodecConfiguration]
case JsString(BytesCodecConfiguration.legacyName) => c(configurationKey).validate[BytesCodecConfiguration]
case JsString(TransposeCodecConfiguration.name) => c(configurationKey).validate[TransposeCodecConfiguration]
case JsString(GzipCodecConfiguration.name) => c(configurationKey).validate[GzipCodecConfiguration]
case JsString(BloscCodecConfiguration.name) => c(configurationKey).validate[BloscCodecConfiguration]
case JsString(ZstdCodecConfiguration.name) => c(configurationKey).validate[ZstdCodecConfiguration]
// BytesCodec may have no "configuration" key
case JsString(BytesCodecConfiguration.name) =>
(c \ configurationKey).toOption
.map(_.validate[BytesCodecConfiguration])
.getOrElse(JsSuccess(BytesCodecConfiguration(None)))
case JsString(BytesCodecConfiguration.legacyName) =>
(c \ configurationKey).toOption
.map(_.validate[BytesCodecConfiguration])
.getOrElse(JsSuccess(BytesCodecConfiguration(None)))
case JsString(TransposeCodecConfiguration.name) => c(configurationKey).validate[TransposeCodecConfiguration]
case JsString(GzipCodecConfiguration.name) => c(configurationKey).validate[GzipCodecConfiguration]
case JsString(BloscCodecConfiguration.name) => c(configurationKey).validate[BloscCodecConfiguration]
case JsString(ZstdCodecConfiguration.name) => c(configurationKey).validate[ZstdCodecConfiguration]
case JsString(Crc32CCodecConfiguration.name) =>
JsSuccess(Crc32CCodecConfiguration) // Crc32 codec has no configuration
case JsString(ShardingCodecConfiguration.name) => readShardingCodecConfiguration(c(configurationKey))
Expand Down