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

feat: use event producer config #32874

Closed

Conversation

navinkarkera
Copy link
Contributor

@navinkarkera navinkarkera commented Jul 28, 2023

Description

Replace openedx_event signal handlers with new producer config to push to event bus.

Supporting information

Testing instructions

  • Setup master devstack.
  • Get lms and cms up using make {lms,cms}-up
  • Go to cms shell using make cms-shell
  • Run pip install -r requirements/edx/development.txt to install new openedx_events version.
  • Exit from cms-shell and see cms logs using make cms-logs.
  • Go to studio and delete an xblock or publish a section/subsection.
  • This should push the corresponding event to event bus and print below message:
    edx.devstack.cms  | 2023-07-28 13:43:57,201 INFO 515 [edx_event_bus_redis.internal.producer] [user 3] [ip 172.18.0.1] producer.py:82 - Message delivered to Redis event bus: topic=dev-content-authoring-xblock-lifecycle, message_id=cccfef82-2d4c-11ee-9c7a-0242ac12000c, signal=<OpenEdxPublicSignal: org.openedx.content_authoring.xblock.published.v1>, redis_msg_id=b'1690551837201-0'
    
  • Play with the EVENT_BUS_PRODUCER_CONFIG by toggling the flag and triggering the event.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

@navinkarkera navinkarkera marked this pull request as ready for review July 28, 2023 13:56
Replace openedx_event signal handlers with new producer config to push to event bus
@navinkarkera navinkarkera force-pushed the navin/use-producer-config branch from cc6b931 to b46d149 Compare July 28, 2023 13:59
@@ -905,7 +905,7 @@ openedx-django-require==2.1.0
# via -r requirements/edx/base.txt
openedx-django-wiki==2.0.0
# via -r requirements/edx/base.txt
openedx-events==8.3.0
openedx-events @ git+https://github.com/open-craft/openedx-events@navin/configurable-handler
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: update this requirement once openedx/openedx-events#249 is merged

Copy link
Contributor

@tecoholic tecoholic left a comment

Choose a reason for hiding this comment

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

@navinkarkera 👍 LGTM. Good to see some code go away :)

  • I tested this: Followed the testing instructions and verified that the events are getting published as per the configuration
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation - inline docs present

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 3, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Aug 3, 2023

Thanks for the pull request, @navinkarkera! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@mphilbrick211
Copy link

Hi @navinkarkera! Flagging the new tests per the recent update: https://discuss.openedx.org/t/minor-change-to-edx-platform-check-statuses/11131

@rgraber
Copy link
Contributor

rgraber commented Sep 14, 2023

@navinkarkera how would we feel about leaving events disabled by default until we figure out openedx/openedx-events#265 ?
I can take on that work if you're ok with it.

@navinkarkera
Copy link
Contributor Author

I can take on that work if you're ok with it.

@rgraber Sure, feel free to create a new PR with the commits or however you see fit.

@rgraber
Copy link
Contributor

rgraber commented Sep 15, 2023

I got git into a weird state and ended up just opening another PR here: #33269 . The only things that changed were openedx-events was set to 8.6.0 rather than a branch and all events start disabled in common.py

@rgraber rgraber closed this Sep 15, 2023
@openedx-webhooks
Copy link

@navinkarkera Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

1 similar comment
@openedx-webhooks
Copy link

@navinkarkera Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants