Skip to content

Commit

Permalink
Fix already upload of zarr datasets with already existing `datasource…
Browse files Browse the repository at this point in the history
…-properties.json` file (#8268)

* fix already upload of zarr datasets with alread existing datasource-properties.json

* undo changes to exploreLocalDatasource in upload service

* add changelog entry

---------

Co-authored-by: Michael Büßemeyer <[email protected]>
  • Loading branch information
MichaelBuessemeyer and Michael Büßemeyer authored Dec 10, 2024
1 parent 14737b3 commit 5dc711d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Fixed
- Fixed that listing datasets with the `api/datasets` route without compression failed due to missing permissions regarding public datasets. [#8249](https://github.com/scalableminds/webknossos/pull/8249)
- 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 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 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ class UploadService @Inject()(dataSourceRepository: DataSourceRepository,
}

private def guessTypeOfUploadedDataSource(dataSourceDir: Path): UploadedDataSourceType.Value =
if (looksLikeZarrArray(dataSourceDir, maxDepth = 2).openOr(false)) {
UploadedDataSourceType.ZARR
} else if (looksLikeExploredDataSource(dataSourceDir).openOr(false)) {
if (looksLikeExploredDataSource(dataSourceDir).openOr(false)) {
UploadedDataSourceType.EXPLORED
} else if (looksLikeZarrArray(dataSourceDir, maxDepth = 2).openOr(false)) {
UploadedDataSourceType.ZARR
} else if (looksLikeZarrArray(dataSourceDir, maxDepth = 3).openOr(false)) {
UploadedDataSourceType.ZARR_MULTILAYER
} else if (looksLikeNeuroglancerPrecomputed(dataSourceDir, 1).openOr(false)) {
Expand Down

0 comments on commit 5dc711d

Please sign in to comment.