Skip to content

Conversation

@shafqatfarhan
Copy link

⛔️ MAIN BRANCH WARNING! 2U EMPLOYEES must make branches against the 2u/main BRANCH

  • I have checked the branch to which I would like to merge.

⛔️ DEPRECATION WARNING

This repository is deprecated and in maintainence-only operation while we work on a replacement, please see this announcement for more information.

Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to security@edx.org

Anyone internally merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.

Required Testing

  • Before deploying this change, complete a purchase in the stage environment.
    (^ We can remove that manual check once REV-2624 is done and the corresponding e2e test runs again)

Description

Describe what this pull request changes, and why these changes were made. How will these changes affect other people, installations of edx, etc.?
Please include links to any relevant ADRs, design artifacts, and decision documents. Make sure to document the rationale behind significant changes in the repo, per OEP-19, and can be
linked here.

Useful information to include:

  • Which edX user roles will this change impact? Common user roles are "Learner", "Course Author", "Developer", and "Operator".
  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these changes.

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

Please provide detailed step-by-step instructions for testing this change; how did YOU test this change?

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, OpenEdx vs. edx.org differences, development vs. production environment differences, security, or accessibility.

Copilot AI review requested due to automatic review settings September 18, 2025 01:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a decommissioning feature that makes certain e-commerce endpoints unavailable when a waffle flag is active. The purpose is to gracefully shut down specific endpoints as part of service decommissioning.

  • Adds waffle flag checks to disable endpoints when disable_ecommerce_service flag is active
  • Includes logging for monitoring endpoint usage during decommissioning
  • Returns HTTP 503 Service Unavailable responses when endpoints are disabled

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ecommerce/extensions/iap/api/v1/views.py Adds decommissioning check and logging to MobileBasketAddItemsView
ecommerce/extensions/basket/views.py Adds decommissioning check and logging to BasketAddItemsView and PaymentApiView
ecommerce/coupons/views.py Adds decommissioning check and logging to CouponRedeemView

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@shafqatfarhan shafqatfarhan enabled auto-merge (squash) September 18, 2025 01:55
@shafqatfarhan shafqatfarhan merged commit 8ba4a6f into 2u/main Sep 18, 2025
8 of 10 checks passed
@shafqatfarhan shafqatfarhan deleted the shafqat/mark-endpoints-unavailable branch September 18, 2025 02:44
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.

2 participants