Skip to content
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

Integrate operations from the Notification API #472

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

heisner-tillman
Copy link

@heisner-tillman heisner-tillman commented Jun 6, 2023

This is a part of #471

Summary

  • Add all operations
  • Add tests for all operations
  • Add NotificationClient to GalaxyClient
  • Update the template_galaxy.yml and template_galaxy.ini to enable notifications for testing

How to test the changes

Run the corresponding test file:
bioblend/_tests/TestGalaxyNotifications.py

@heisner-tillman heisner-tillman changed the title Integrate get_notification_status operation from the Notification API Integrate operations from the Notification API Jun 27, 2023
@bgruening bgruening requested a review from nsoranzo July 1, 2023 07:10
Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to rebase? Maybe this solves the test problems.

bioblend/_tests/TestGalaxyNotifications.py Outdated Show resolved Hide resolved
bioblend/galaxy/notifications/__init__.py Outdated Show resolved Hide resolved
bioblend/_tests/template_galaxy.ini Outdated Show resolved Hide resolved
@heisner-tillman
Copy link
Author

heisner-tillman commented Aug 29, 2023

try to rebase

Done.

@bernt-matthias
Copy link
Contributor

Tests fail. Guess you need to add typing-extensions to

install_requires =

@bgruening
Copy link
Member

Green! 🍏

bioblend/galaxyclient.py Outdated Show resolved Hide resolved
bioblend/galaxy/notifications/__init__.py Show resolved Hide resolved
bioblend/galaxy/notifications/__init__.py Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@bernt-matthias
Copy link
Contributor

The root of the problem seems to be that from 24.1 notifications are handled by celery and a POST request to /api/notifications returns AsyncTaskResultSummary (or NotificationCreatedResponse)

To make these tests pass I could disable celery (is it possible to disable certain tasks only?) .. but this breaks many other tests.

@davelopez
Copy link

Instead of disabling Celery, I suggest using the async flow. When sending a notification, we just need to poll on api/tasks/{task_id}/state until we get a SUCCESS to check when the notification has been dispatched and then you can check if the user received the notification, etc.

@bernt-matthias bernt-matthias force-pushed the integrate-notification-system branch 2 times, most recently from a915e5d to bdce6a8 Compare October 28, 2024 14:37
@bernt-matthias
Copy link
Contributor

I changed the tests accordingly (therefor I added the tasks API). I tested manually that the tests also work for a non-celery setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants