Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scalableminds/webknossos into ant…
Browse files Browse the repository at this point in the history
…d-v4.24

* 'master' of github.com:scalableminds/webknossos:
  Implement http range requests for HttpsSeekableByteChannel (#6869)
  new GH action for adding issues to project board
  Fix links in Changelog (#6881)
  adds dedicated explore method for zarr datasets with a datasource-properties.json (#6879)
  Release 23.03.0 (#6880)
  Fix superUser being wrongly marked as organization owners (#6876)
  Followups for OME-TIFF export (#6874)
  Fix reload-precomputed-mesh functionality (#6875)
  Adds OME-TIFF export (#6838)
  Add evolutions 99,100 to migration guide (#6871)
  Add link to imprint and privacy to help menu (#6870)
  Annotation Locking Mechanism (#6819)
  • Loading branch information
hotzenklotz committed Mar 2, 2023
2 parents 0bc7d59 + 4e672e0 commit 8320f9d
Show file tree
Hide file tree
Showing 67 changed files with 1,823 additions and 813 deletions.
42 changes: 5 additions & 37 deletions .github/workflows/assign_issue_project.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
name: Auto Assign Issues to Project
# From: https://www.cloudwithchris.com/blog/automate-adding-gh-issues-projects-beta/
on:
issues:
types: [opened]
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_GITHUB_TOKEN }}

jobs:
assign_issue_to_project:
runs-on: ubuntu-latest
steps:
- name: Get project data
env:
ORGANIZATION: scalableminds
PROJECT_NUMBER: 6
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to project
env:
ISSUE_ID: ${{ github.event.issue.node_id }}
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
projectNextItem {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
- name: Add to GitHub projects
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/scalableminds/projects/6
github-token: ${{ secrets.PROJECT_GITHUB_TOKEN }}
38 changes: 37 additions & 1 deletion CHANGELOG.released.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Calendar Versioning](http://calver.org/) `0Y.0M.MICRO`.
For upgrade instructions, please check the [migration guide](MIGRATIONS.released.md).

## [23.03.0](https://github.com/scalableminds/webknossos/releases/tag/23.03.0) - 2023-02-28
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.1...23.03.0)

### Highlights
- Remote datasets can now also be streamed from Google Cloud Storage URIs (`gs://`). [#6775](https://github.com/scalableminds/webknossos/pull/6775)
- Remote volume datasets in the neuroglancer precomputed format can now be viewed in WEBKNOSSOS. [#6716](https://github.com/scalableminds/webknossos/pull/6716)
- Added new mesh-related menu items to the context menu when a mesh is hovered in the 3d viewport. [#6813](https://github.com/scalableminds/webknossos/pull/6813)

### Added
- If an annotation that others are allowed to edit is opened, it will now be automatically locked. This prevents conflicts when multiple users try to edit it at the same time. [#6819](https://github.com/scalableminds/webknossos/pull/6819)
- Highlight 'organization owner' in Admin>User page. [#6832](https://github.com/scalableminds/webknossos/pull/6832)
- Added OME-TIFF export for bounding boxes. [#6838](https://github.com/scalableminds/webknossos/pull/6838) [#6874](https://github.com/scalableminds/webknossos/pull/6874)
- Added functions to get and set segment colors to the frontend API (`api.data.{getSegmentColor,setSegmentColor}`). [#6853](https://github.com/scalableminds/webknossos/pull/6853)

### Changed
- Limit paid team sharing features to respective organization plans. [#6767](https://github.com/scalableminds/webknossos/pull/6776)
- Rewrite the database tools in `tools/postgres` to JavaScript and adding support for non-default Postgres username-password combinations. [#6803](https://github.com/scalableminds/webknossos/pull/6803)
- Added owner name to organization page. [#6811](https://github.com/scalableminds/webknossos/pull/6811)
- Remove multiline <TextArea> support from <InputComponent>. [#6839](https://github.com/scalableminds/webknossos/pull/6839)
- Improved the performance of the dataset table in the dashboard. [#6834](https://github.com/scalableminds/webknossos/pull/6834)
- Updated the styling and background of login, password reset/change and sign up pages. [#6844](https://github.com/scalableminds/webknossos/pull/6844)
- Replaced date handling and formatting library momentjs with dayjs. [#6849](https://github.com/scalableminds/webknossos/pull/6849)

### Fixed
- Fixed saving allowed teams in dataset settings. [#6817](https://github.com/scalableminds/webknossos/pull/6817)
- Fixed log streaming in Voxelytics workflow reports. [#6828](https://github.com/scalableminds/webknossos/pull/6828) [#6831](https://github.com/scalableminds/webknossos/pull/6831)
- Fixed some layouting issues with line breaks in segment list/dataset info tab. [#6799](https://github.com/scalableminds/webknossos/pull/6799)
- Fixed basic auth for exploring remote http datasets. [#6866](https://github.com/scalableminds/webknossos/pull/6866)
- Fixed the layouting in the connectome tab. [#6864](https://github.com/scalableminds/webknossos/pull/6864)
- Fixed that the quick-select and floodfill tool didn't update the segment list. [#6867](https://github.com/scalableminds/webknossos/pull/6867)
- Fixed deprecation warnings for antd' <Menu> component in Navbar. [#6860](https://github.com/scalableminds/webknossos/pull/6860)
- Fixed that trying to reload a precomputed mesh via context menu could crash webKnossos. [#6875](https://github.com/scalableminds/webknossos/pull/6875)

### Removed
- Removed the old Datasets tab in favor of the Dataset Folders tab. [#6834](https://github.com/scalableminds/webknossos/pull/6834)

## [23.02.1](https://github.com/scalableminds/webknossos/releases/tag/23.02.1) - 2023-02-07
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.0...23.02.1)

Expand Down Expand Up @@ -498,7 +534,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Breaking Change
- When using the front-end API, functions that accept a layer name, such as `api.data.getDataValue`, won't interpret the name "segmentation" as the current volume tracing if it exists. Instead, "segmentation" can only be used if the current dataset has a layer which is named "segmentation". If you want to interact with the volume tracing layer, use `api.data.getVolumeTracingLayerIds()` instead. Also see `api.data.getSegmentationLayerNames` and `api.data.getVisibleSegmentationLayer`. [#5771](https://github.com/scalableminds/webknossos/pull/5771)
- The datastore server routes `/datasets/reserveUpload` and `/datasets/finishUpload` now expect the additional field `layersToLink`, which should be an empty list by default. [#5863](https://github.com/scalableminds/webknossos/pull/5863
- The datastore server routes `/datasets/reserveUpload` and `/datasets/finishUpload` now expect the additional field `layersToLink`, which should be an empty list by default. [#5863](https://github.com/scalableminds/webknossos/pull/5863)


## [21.11.2](https://github.com/scalableminds/webknossos/releases/tag/21.11.2) - 2021-12-21
Expand Down
24 changes: 2 additions & 22 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,16 @@ and this project adheres to [Calendar Versioning](http://calver.org/) `0Y.0M.MIC
For upgrade instructions, please check the [migration guide](MIGRATIONS.released.md).

## Unreleased
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.1...HEAD)
[Commits](https://github.com/scalableminds/webknossos/compare/23.03.0...HEAD)

### Added
- Remote datasets can now also be streamed from Google Cloud Storage URIs (`gs://`). [#6775](https://github.com/scalableminds/webknossos/pull/6775)
- Remote volume datasets in the neuroglancer precomputed format can now be viewed in WEBKNOSSOS. [#6716](https://github.com/scalableminds/webknossos/pull/6716)
- Added new mesh-related menu items to the context menu when a mesh is hovered in the 3d viewport. [#](https://github.com/scalableminds/webknossos/pull/6813)
- Highlight 'organization owner' in Admin>User page. [#6832](https://github.com/scalableminds/webknossos/pull/6832)
- Added functions to get and set segment colors to the frontend API (`api.data.{getSegmentColor,setSegmentColor}`). [#6853](https://github.com/scalableminds/webknossos/pull/6853)

- Added support for remote Zarr datasets with a `datasource-properties.json` as created by the WEBKNOSSOS Python library. [#6879](https://github.com/scalableminds/webknossos/pull/6879)

### Changed
- Limit paid team sharing features to respective organization plans. [#6767](https://github.com/scalableminds/webknossos/pull/6776)
- Rewrite the database tools in `tools/postgres` to JavaScript and adding support for non-default Postgres username-password combinations. [#6803](https://github.com/scalableminds/webknossos/pull/6803)
- Added owner name to organization page. [#6811](https://github.com/scalableminds/webknossos/pull/6811)
- Remove multiline <TextArea> support from <InputComponent>. [#6839](https://github.com/scalableminds/webknossos/pull/6839)
- Improved the performance of the dataset table in the dashboard. [#6834](https://github.com/scalableminds/webknossos/pull/6834)
- Updated the styling and background of login, password reset/change and sign up pages. [#6844](https://github.com/scalableminds/webknossos/pull/6844)
- Replaced date handling and formatting library momentjs with dayjs. [#6849](https://github.com/scalableminds/webknossos/pull/6849)
- Upgraded antd UI library to v4.24.8 [#6865](https://github.com/scalableminds/webknossos/pull/6865)

### Fixed
- Fixed saving allowed teams in dataset settings. [#6817](https://github.com/scalableminds/webknossos/pull/6817)
- Fixed log streaming in Voxelytics workflow reports. [#6828](https://github.com/scalableminds/webknossos/pull/6828) [#6831](https://github.com/scalableminds/webknossos/pull/6831)
- Fixed some layouting issues with line breaks in segment list/dataset info tab. [#6799](https://github.com/scalableminds/webknossos/pull/6799)
- Fixed basic auth for exploring remote http datasets. [#6866](https://github.com/scalableminds/webknossos/pull/6866)
- Fixed the layouting in the connectome tab. [#6864](https://github.com/scalableminds/webknossos/pull/6864)
- Fixed that the quick-select and floodfill tool didn't update the segment list. [#6867](https://github.com/scalableminds/webknossos/pull/6867)
- Fixed deprecation warnings for antd' <Menu> component in Navbar. [#6860](https://github.com/scalableminds/webknossos/pull/6860)

### Removed
- Removed the old Datasets tab in favor of the Dataset Folders tab. [#6834](https://github.com/scalableminds/webknossos/pull/6834)

### Breaking Changes
2 changes: 1 addition & 1 deletion DEV_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For non-localhost deployments, check out the [installation guide in the document

### Dependencies

* [Oracle JDK 8 to 14](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or [Open JDK 8 to 14](http://openjdk.java.net/) (full JDK, JRE is not enough)
* [Oracle JDK 11 to 14](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or [Open JDK 11 to 14](http://openjdk.java.net/) (full JDK, JRE is not enough)
* [sbt](http://www.scala-sbt.org/)
* [PostgreSQL 10+](https://www.postgresql.org/)
* [Redis 5+](https://redis.io/)
Expand Down
14 changes: 13 additions & 1 deletion MIGRATIONS.released.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ See `MIGRATIONS.unreleased.md` for the changes which are not yet part of an offi
This project adheres to [Calendar Versioning](http://calver.org/) `0Y.0M.MICRO`.
User-facing changes are documented in the [changelog](CHANGELOG.released.md).

## [23.03.0](https://github.com/scalableminds/webknossos/releases/tag/23.03.0) - 2023-02-28
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.1...23.03.0)

- WEBKNOSSOS now requires Node.js not only for development and building, but also for execution. The prebuilt Docker images already contain this dependency. If you're using these, nothing needs to be changed. [#6803](https://github.com/scalableminds/webknossos/pull/6803)
- Requires Voxelytics worker version 23.02.xx for long-running jobs. [#6838](https://github.com/scalableminds/webknossos/pull/6838)

### Postgres Evolutions:

- [099-rename-credential-types.sql](conf/evolutions/099-rename-credential-types.sql)
- [100-annotation-mutexes.sql](conf/evolutions/100-annotation-mutexes.sql)


## [23.02.1](https://github.com/scalableminds/webknossos/releases/tag/23.02.1) - 2023-02-07
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.0...23.02.1)

Expand Down Expand Up @@ -517,4 +529,4 @@ No migrations necessary.
## [18.07.0](https://github.com/scalableminds/webknossos/releases/tag/18.07.0) - 2018-07-05
First release
First release
5 changes: 2 additions & 3 deletions MIGRATIONS.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ This project adheres to [Calendar Versioning](http://calver.org/) `0Y.0M.MICRO`.
User-facing changes are documented in the [changelog](CHANGELOG.released.md).

## Unreleased
[Commits](https://github.com/scalableminds/webknossos/compare/23.02.1...HEAD)

- WEBKNOSSOS now requires Node.js not only for development and building, but also for execution. The prebuilt Docker images already contain this dependency. If you're using these, nothing needs to be changed. [#6803](https://github.com/scalableminds/webknossos/pull/6803)
[Commits](https://github.com/scalableminds/webknossos/compare/23.03.0...HEAD)
- WEBKNOSSOS now requires at least Java 11 (up from Java 8). [#6869](https://github.com/scalableminds/webknossos/pull/6869)

### Postgres Evolutions:
3 changes: 2 additions & 1 deletion app/WebKnossosModule.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.google.inject.AbstractModule
import controllers.InitialDataService
import models.analytics.AnalyticsSessionService
import models.annotation.AnnotationStore
import models.annotation.{AnnotationMutexService, AnnotationStore}
import models.binary.DataSetService
import models.job.{JobService, WorkerLivenessService}
import models.storage.UsedStorageService
Expand All @@ -26,6 +26,7 @@ class WebKnossosModule extends AbstractModule {
bind(classOf[UserDataSetConfigurationDAO]).asEagerSingleton()
bind(classOf[UserCache]).asEagerSingleton()
bind(classOf[AnnotationStore]).asEagerSingleton()
bind(classOf[AnnotationMutexService]).asEagerSingleton()
bind(classOf[DataSetService]).asEagerSingleton()
bind(classOf[TimeSpanService]).asEagerSingleton()
bind(classOf[TempFileService]).asEagerSingleton()
Expand Down
23 changes: 22 additions & 1 deletion app/controllers/AnnotationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import models.team.{TeamDAO, TeamService}
import models.user.time._
import models.user.{User, UserDAO, UserService}
import oxalis.mail.{MailchimpClient, MailchimpTag}
import oxalis.security.{URLSharing, WkEnv}
import oxalis.security.{URLSharing, UserAwareRequestLogging, WkEnv}
import oxalis.telemetry.SlackNotificationService
import play.api.i18n.{Messages, MessagesProvider}
import play.api.libs.json.Json.WithDefaultValues
import play.api.libs.json._
Expand Down Expand Up @@ -54,6 +55,7 @@ class AnnotationController @Inject()(
dataSetDAO: DataSetDAO,
dataSetService: DataSetService,
annotationService: AnnotationService,
annotationMutexService: AnnotationMutexService,
userService: UserService,
teamService: TeamService,
projectDAO: ProjectDAO,
Expand All @@ -64,10 +66,12 @@ class AnnotationController @Inject()(
provider: AnnotationInformationProvider,
annotationRestrictionDefaults: AnnotationRestrictionDefaults,
analyticsService: AnalyticsService,
slackNotificationService: SlackNotificationService,
mailchimpClient: MailchimpClient,
conf: WkConf,
sil: Silhouette[WkEnv])(implicit ec: ExecutionContext, bodyParsers: PlayBodyParsers)
extends Controller
with UserAwareRequestLogging
with FoxImplicits {

implicit val timeout: Timeout = Timeout(5 seconds)
Expand Down Expand Up @@ -559,6 +563,7 @@ class AnnotationController @Inject()(
sil.SecuredAction.async { implicit request =>
for {
annotation <- provider.provideAnnotation(typ, id, request.identity)
_ <- bool2Fox(annotation.typ == AnnotationType.Explorational || annotation.typ == AnnotationType.Task) ?~> "annotation.othersMayEdit.onlyExplorationalOrTask"
_ <- bool2Fox(annotation._user == request.identity._id) ?~> "notAllowed" ~> FORBIDDEN
_ <- annotationDAO.updateOthersMayEdit(annotation._id, othersMayEdit)
} yield Ok(Json.toJson(othersMayEdit))
Expand Down Expand Up @@ -601,4 +606,20 @@ class AnnotationController @Inject()(
}
} yield annotationLayer.copy(tracingId = newTracingId)

@ApiOperation(hidden = true, value = "")
def tryAcquiringAnnotationMutex(id: String): Action[AnyContent] =
sil.SecuredAction.async { implicit request =>
logTime(slackNotificationService.noticeSlowRequest, durationThreshold = 1 second) {
for {
idValidated <- ObjectId.fromString(id)
annotation <- provider.provideAnnotation(id, request.identity) ~> NOT_FOUND
_ <- bool2Fox(annotation.othersMayEdit) ?~> "notAllowed" ~> FORBIDDEN
restrictions <- provider.restrictionsFor(AnnotationIdentifier(annotation.typ, idValidated)) ?~> "restrictions.notFound" ~> NOT_FOUND
_ <- restrictions.allowUpdate(request.identity) ?~> "notAllowed" ~> FORBIDDEN
mutexResult <- annotationMutexService.tryAcquiringAnnotationMutex(annotation._id, request.identity._id) ?~> "annotation.mutex.failed"
resultJson <- annotationMutexService.publicWrites(mutexResult)
} yield Ok(resultJson)
}
}

}
Loading

0 comments on commit 8320f9d

Please sign in to comment.