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

fix: use whitelisted events to identify known_events #425

Closed
wants to merge 1 commit into from

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented May 31, 2024

Description: This PR fixes a bug introduced by the new setting structure:

Traceback (most recent call last):
  File "./manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/lib/python3.8/site-packages/event_routing_backends/management/commands/transform_tracking_logs.py", line 299, in handle
    transform_tracking_logs(
  File "/openedx/venv/lib/python3.8/site-packages/event_routing_backends/management/commands/transform_tracking_logs.py", line 92, in transform_tracking_logs
    sender.transform_and_queue(line)
  File "/openedx/venv/lib/python3.8/site-packages/event_routing_backends/management/commands/helpers/queued_sender.py", line 68, in transform_and_queue
    if not self.is_known_event(event):
  File "/openedx/venv/lib/python3.8/site-packages/event_routing_backends/management/commands/helpers/queued_sender.py", line 54, in is_known_event
    if event["name"] in processor.registry.mapping:
AttributeError: 'NameWhitelistProcessor' object has no attribute 'registry'

JIRA: Link to JIRA ticket

Dependencies: dependencies on other outstanding PRs, issues, etc.

Merge deadline: List merge deadline (if any)

Installation instructions: List any non-trivial installation
instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.

Author concerns: This may not be the right fix to apply, we should probably send all events to the transformers and let trigger an error.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 31, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @Ian2012! 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.

@openedx-webhooks
Copy link

@Ian2012 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.

3 participants