Skip to content

Commit d87113f

Browse files
authored
Fix regression for legacy (v10) manual upload / publish (#8984)
The old (v10) publish flow uses reserveManualUpload and then relies on the datastore being able to send updates of the dataset to the wk database. That is only allowed if these datasets are not marked as virtual. [This comment](https://github.com/scalableminds/webknossos/blob/a35bbba887e57006a980679199b14399f8fec61c/webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/uploading/UploadService.scala#L57) already explained this, but then the code didn’t do it. ### Steps to test: - Run worker neuron inference, publish task should work. (I did that) ------ - [x] Added changelog entry (create a `$PR_NUMBER.md` file in `unreleased_changes` or use `./tools/create-changelog-entry.py`) - [x] Needs datastore update after deployment
1 parent a35bbba commit d87113f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

app/controllers/WKRemoteDataStoreController.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class WKRemoteDataStoreController @Inject()(
8585
uploadInfo.folderId,
8686
user,
8787
// For the moment, the convert_to_wkw job can only fill the dataset if it is not virtual.
88-
isVirtual = !uploadInfo.needsConversion.getOrElse(false)
88+
isVirtual = uploadInfo.isVirtual.getOrElse(!uploadInfo.needsConversion.getOrElse(false))
8989
) ?~> "dataset.upload.creation.failed"
9090
_ <- datasetService.addInitialTeams(dataset, uploadInfo.initialTeams, user)(AuthorizedAccessContext(user))
9191
additionalInfo = ReserveAdditionalInformation(dataset._id, dataset.directoryName)

unreleased_changes/8984.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Fixed
2+
- Fixed a regression where the old (api v10) manualUpload flow would not correctly register datasets.

webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/DSLegacyApiController.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class DSLegacyApiController @Inject()(
149149
request.body.initialTeamIds,
150150
request.body.folderId,
151151
Some(request.body.requireUniqueName),
152-
None,
152+
Some(false),
153153
needsConversion = None
154154
)
155155
) ?~> "dataset.upload.validation.failed"

0 commit comments

Comments
 (0)