-
Notifications
You must be signed in to change notification settings - Fork 29
SEAB-7285: Make "missing dockstore.yml" user notifications happen less #6168
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
SEAB-7285: Make "missing dockstore.yml" user notifications happen less #6168
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## hotfix/1.18.1 #6168 +/- ##
===================================================
+ Coverage 74.02% 74.07% +0.04%
- Complexity 5712 5724 +12
===================================================
Files 397 397
Lines 20543 20571 +28
Branches 2112 2116 +4
===================================================
+ Hits 15207 15238 +31
+ Misses 4332 4326 -6
- Partials 1004 1007 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thought to ponder, should these be user-spaced? For example, recently we saw users requiring assistance from an admin to configure our app. The admin installs the app, triggers the notification to their account. The original user starts back up, doesn't see the notification for the admin, doesn't see their own notification. Alternatively, job turn-over, multiple staff on a team, the heuristic that the first user to interact with us gets a notification is decent, but GitHub itself doesn't work that way for example (i.e. we all get a notification stuff happens usually, unless we've configured it differently) |
...ore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java
Show resolved
Hide resolved
Might make sense to issue multiple notifications, one per user, etc, as above. There's some subtle failure modes that we'd need to ponder. However, given that this is a hotfix, would prefer to stick with the simpler solution, which works good enough for now. |
denis-yuen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure about cases, will discuss on devs
|
Per the discussion on devs, I modified the notification generation code so that it now considers the user when determining if a notification has already been issued. That is, the "needs a |
| @Schema(description = "The recommended action for the repository", requiredMode = RequiredMode.REQUIRED) | ||
| private Action action; | ||
|
|
||
| @Column(nullable = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes needed, but looking through the various migration guides (6.0 -> 6.1, 6.1->6.2, through 6.6) Hibernate added soft delete
https://docs.jboss.org/hibernate/orm/6.4/userguide/html_single/Hibernate_User_Guide.html#soft-delete
Could be tried later to standardize things when the upgrade is worked out.
Sweet! |
Description
This PR changes the webservice so that it:
.dockstore.yml-based entries corresponding to the github repository, indicating that there must be a.dockstore.ymlon one of the branches..dockstore.ymlis detected on a branch in the repository.To accomplish the above, we add a
hiddenfield to theUserNotificationentity. When a user notification is hidden, it is no longer visible to the user, but remains in the database, so the push processing code can find it and prevent additional notifications from being created.There was a bit of redundant stuff in the notification DAOs that has been deleted.
Testing has been added. Note that the references in the previous tests were broken, meaning that we were testing the failure of the endpoints/methods, rather than what we thought. This has been fixed.
I would prefer that all types of notifications had an expiration date (currently, public notifications can be) and could be hidden (after this pr, user notifications can be), but that's an uncomfortably large change for a hotfix.
Review Instructions
On staging, install our Github app on a repository that contains a WDL but no
.dockstore.yml, and confirm that the notification is created. Delete the notification in the UI, and then add a file to the repo, and push again. Confirm that no notification is created.Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-7285
https://ucsc-cgl.atlassian.net/browse/SEAB-7287
Security and Privacy
If there are any concerns that require extra attention from the security team, highlight them here and check the box when complete.
e.g. Does this change...
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install@RolesAllowedannotation