Skip to content

Commit

Permalink
Don't require zarr 3 Bytes Codec configuration key (#8282)
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth authored Dec 18, 2024
1 parent cc75b60 commit fe53375
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
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

0 comments on commit fe53375

Please sign in to comment.