Skip to content

Conversation

kaustavb12
Copy link
Contributor

@kaustavb12 kaustavb12 commented Aug 23, 2025

Description

This PR brings two changes to all the management commands based on SendEmailBaseCommand:

  1. Adds the ability to pass a list of middlewares to override the default list of middlewares used to emulate HTTP requests in the async message tasks - This would be very helpful for instances running custom middlewares that they want to apply to recurring messages.
  2. Adds the ability to run the management commands for all sites by not passing any site domain. This would be helpful for instances running lots of sites that would otherwise need to run the same command individually for each site.

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

  1. Set up this branch in a sandbox.
  2. Set up two or more sites with course_org_filter setup for each site to map it to a unique org.
  3. Create courses for each site/org and enroll in them.
  4. Make sure date conditions for recurring nudges are satisfied for the enrollments and run the send_recurring_nudge command without passing any site domain name.
  5. Make sure emails from each site/org are triggered.

Deadline

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

Other information

Private Ref : BB-9883

@openedx-webhooks
Copy link

Thanks for the pull request, @kaustavb12!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 23, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Aug 23, 2025
@kaustavb12 kaustavb12 force-pushed the kaustav/upstream_use_custom_middlewares_recurring_nudges branch from 2ee1a7a to 8348783 Compare August 23, 2025 05:23
@kaustavb12 kaustavb12 changed the title feat: add ability to override middlewares for recurring nudges (#790) feat: add ability to override middlewares for recurring nudges Aug 23, 2025
Copy link

@samuelallan72 samuelallan72 left a comment

Choose a reason for hiding this comment

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

👍

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Aug 27, 2025
@mphilbrick211 mphilbrick211 added the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Aug 27, 2025
@farhaanbukhsh farhaanbukhsh self-requested a review September 6, 2025 16:29
@farhaanbukhsh
Copy link
Member

@kaustavb12 can you rebase the PR please :)

Copy link
Member

@farhaanbukhsh farhaanbukhsh left a comment

Choose a reason for hiding this comment

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

The code looks good why is the code coverage no passing? Can we fix that?

@kaustavb12 kaustavb12 force-pushed the kaustav/upstream_use_custom_middlewares_recurring_nudges branch from 8348783 to b42ae34 Compare September 17, 2025 13:18
* feat: add ability to override middlewares for recurring nudges

* feat: add ability to run command for all sites
@kaustavb12 kaustavb12 force-pushed the kaustav/upstream_use_custom_middlewares_recurring_nudges branch from b42ae34 to 15bda91 Compare September 17, 2025 13:57
@kaustavb12
Copy link
Contributor Author

kaustavb12 commented Sep 17, 2025

@farhaanbukhsh

PR rebased. Not sure why code coverage was failing then, perhaps it was just being flaky.
All checks have passed now though. Please take a look. :)

Copy link
Member

@farhaanbukhsh farhaanbukhsh left a comment

Choose a reason for hiding this comment

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

👍

  • ✅ I tested this on the devstack and it ran gracefully.
  • ✅ I read through the code
  • ❌ I checked for accessibility issues
  • ❌ Includes documentation

@farhaanbukhsh farhaanbukhsh merged commit 6b48ff9 into openedx:master Sep 17, 2025
65 checks passed
@farhaanbukhsh farhaanbukhsh deleted the kaustav/upstream_use_custom_middlewares_recurring_nudges branch September 17, 2025 16:22
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Contributions Sep 17, 2025
@openedx-webhooks openedx-webhooks removed the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Sep 17, 2025
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

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
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants