Commit Graph
75684 Commits
Author SHA1 Message Date
davelopez f083768fd9 Add galaxy_url mapped column to notification model 2024-04-16 17:31:54 +02:00
davelopez 89d5af413b Add db migration for galaxy_url column in notifications table 2024-04-16 17:31:53 +02:00
davelopez 123904aced Adapt notification integration tests to work w/o tasks 2024-04-16 17:31:53 +02:00
davelopez 11ca5473ea Allow to force_sync for creating internal notifications
This is useful when we know in advance the list of recipient users and that no group or roles need to be resolved. Like when we share an item with a list of users.
2024-04-16 17:31:52 +02:00
davelopez ba0a0abcfc Refactor GenericModel for reusability 2024-04-16 17:31:52 +02:00
davelopez 452669d272 Fix generic types in notifications schema
Workaround issues with generics auto-generated names when building the client schema.
2024-04-16 17:31:51 +02:00
David LópezandJohn Davis f43b3856f2 Remove redundant nullable in dispatched column
Co-authored-by: John Davis <jdavcs@gmail.com>
2024-04-16 17:31:50 +02:00
davelopez 1e94458461 Handle channel settings depending on server config
External notification channels (like email) are processed in Celery tasks. When Celery is not enabled in the server, we cannot show those channels to the user and we have to indicate in the API that those will be ignored.
2024-04-16 17:31:50 +02:00
davelopez 871ccc685d Update client schema 2024-04-16 17:06:21 +02:00
davelopez 8b4b3858b5 Revert utcnow refactoring
Is not yet deprecated in Python 3.7
2024-04-16 17:06:21 +02:00
davelopez 349c373a99 Run notification integration tests without celery 2024-04-16 17:06:20 +02:00
davelopez bb6f68852f Schedule periodic notifications tasks only when enabled 2024-04-16 17:06:20 +02:00
davelopez 9c2d569774 Add dispatch_pending_notifications to periodic tasks 2024-04-16 17:06:19 +02:00
davelopez dbdd5bca81 Add dispatch_notifications_interval config option 2024-04-16 17:06:19 +02:00
davelopez a4e22b4f41 Add celery task to dispatch pending notifications 2024-04-16 17:06:18 +02:00
davelopez 8a62db2b29 Refactor notifications manager to send via other channels
This will still create the notifications and associations in the database on request, but will defer sending emails (or any other channel) to a different function called `dispatch_pending_notifications_via_channels`.
2024-04-16 17:06:18 +02:00
davelopez 1ec4d428a0 Ignore some inaccurate types from model mappings 2024-04-16 17:06:17 +02:00
davelopez dda46db7d3 Adapt notification model mapped types
Unfortunately I thought the default for columns was "non-nullable" so these columns are nullable in the database, but they will never be in the app.

This change matches the type expected in the app with the real nullable state in the database.
2024-04-16 17:06:17 +02:00
davelopez 3fe77fb2a9 Add dispatched column to notification model 2024-04-16 17:06:16 +02:00
davelopez fd7bd1b6da Add db revision for notifications dispatched column 2024-04-16 17:06:16 +02:00
davelopez 81ae5f4cbc Add EmailNotificationChannelPlugin and basic email sending 2024-04-16 17:06:15 +02:00
davelopez a6ba1a8cbb Add email templates for shared item notifications 2024-04-16 17:06:15 +02:00
davelopez f2641d12e5 Add email templates for message notifications 2024-04-16 17:06:15 +02:00
davelopez d29f6db83c Update NotificationCreateRequest definition
Make sure the API endpoint supports the asynchronous mode too.
2024-04-16 17:06:14 +02:00
davelopez 13d9fef42a Use NotificationService instead of manager in other services
Allows to use the asynchronous sending of notifications from other services.
2024-04-16 17:06:14 +02:00
davelopez e551e60ae6 Allow to send notifications from Celery
Adds a new task to Celery called `send_notification_to_recipients_async`
2024-04-16 17:06:13 +02:00
Marius van den Beek 0a68b5df25 Merge pull request #17991 from nsoranzo/warn_unused_ignores
Enable ``warn_unused_ignores`` mypy option
2024-04-16 10:26:11 +02:00
Nicola Soranzo 053ca5198e Enable `warn_unused_ignores` mypy option 2024-04-16 01:12:58 +01:00
Nicola Soranzo dcb6f061f6 Don't install Galaxy packages in editable mode when testing them
When enabling the `warn_unused_ignores = True` option of mypy, this
was making the `test_galaxy_packages` tests fail with:

```
mypy .
Traceback (most recent call last):
  File "/tmp/gxpkgtestenvu3fgDr/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
  File "/tmp/gxpkgtestenvu3fgDr/lib/python3.10/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
  File "mypy/main.py", line 100, in main
  File "mypy/main.py", line 182, in run_build
  File "mypy/build.py", line 192, in build
  File "mypy/build.py", line 266, in _build
  File "mypy/build.py", line 2942, in dispatch
  File "mypy/build.py", line 3333, in process_graph
  File "mypy/build.py", line 3414, in process_fresh_modules
  File "mypy/build.py", line 2110, in fix_cross_refs
  File "mypy/fixup.py", line 52, in fixup_module
  File "mypy/fixup.py", line 127, in visit_symbol_table
  File "mypy/lookup.py", line 49, in lookup_fully_qualified
AssertionError: Cannot find component 'util' for 'galaxy.util'
make: *** [Makefile:96: mypy] Error 1
```

Moreover, installing packages in editable mode was hiding some issues
with how files from other packages were accessed.
2024-04-16 01:12:57 +01:00
Nicola Soranzo c286930449 Consolidate use of `galaxy.util.resources` 2024-04-15 23:43:49 +01:00
Nicola Soranzo 2317db70c6 Move `test_vault.py` unit tests to correct package directory 2024-04-15 23:43:49 +01:00
Dannon d5458b012d Merge pull request #17931 from guerler/visualizations_activity
Revises visualizations activity
2024-04-15 13:48:51 -04:00
Dannon 1794da6c5f Merge pull request #17925 from guerler/pages_activity
Adds pages to the activity bar
2024-04-15 13:48:45 -04:00
John Davis 372b8d673a Merge pull request #17902 from jmchilton/dev_model_newbase
Outline use of type_annotation_map to fix mypy issues
2024-04-15 12:59:56 -04:00
Dannon 450e48af88 Merge pull request #17968 from jmchilton/error_reporting_unit_tests
Error reporting unit tests
2024-04-15 12:39:34 -04:00
Dannon 7344b1d181 Merge pull request #17804 from itisAliRH/dataset-information-refactors
Dataset information refactors
2024-04-15 12:05:55 -04:00
John Chilton 873ade5aaa More explicit optionals? 2024-04-15 11:40:09 -04:00
John Chilton 7afc088ea0 Fix mypy sqla errors around Dataset.transform. 2024-04-15 11:36:31 -04:00
John Chilton 0a47a2322a Outline use of type_annotation_map to fix mypy issues? 2024-04-15 11:35:43 -04:00
Alireza Heidari 9c9bf57763 🛠️: update postJobErrorReport and ShowFullJobResponse type usage 2024-04-15 14:04:51 +02:00
Alireza Heidari 5e6cc7991f 🛠️: move API endpoint postJobErrorReport and ShowFullJobResponse type from DatasetInformation/services to api/jobs 2024-04-15 14:04:51 +02:00
Alireza Heidari 901966be03 🎨: remove unnecessary flushPromises call on DatasetAttributes test 2024-04-15 14:04:06 +02:00
Alireza Heidari 00753995c7 🛠️: add DatasetTransform to API index and use it in DatasetSource, DatasetSources and DatasetSourceTransform components 2024-04-15 14:04:06 +02:00
Alireza Heidari aea91e02c4 🛠️: update DatasetHash and DatasetHashes components to use DatasetHash type from API 2024-04-15 14:04:05 +02:00
Alireza Heidari 71f9ae0d62 🛠️: Add DatasetHash type to API index 2024-04-15 14:04:05 +02:00
Alireza Heidari a8afec611f 🛠️: update DatasetDetails type usage to HDADetailed 2024-04-15 14:04:05 +02:00
Alireza Heidari ff33001391 🎨: use try/catch in DatasetAttributes 2024-04-15 14:04:04 +02:00
Alireza Heidari cb2e8e4a15 🎨: fix typo in mountDatasetAttributes function name in DatasetAttributes 2024-04-15 14:04:04 +02:00
Alireza HeidariandDavid López d6c52ba101 Update client/src/components/DatasetInformation/DatasetError.test.ts
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2024-04-15 14:04:03 +02:00
Alireza Heidari 91269d0403 🔥: remove unused DatasetInformation/testData/datasetResponse.json file 2024-04-15 14:04:03 +02:00