Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Update 2u/main to modern times #4062

Merged
merged 69 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b782d39
build: Creating a missing workflow file `self-assign-issue.yml`.
Feb 23, 2023
3dfeacb
build: Creating a missing workflow file `add-remove-label-on-comment.…
Feb 23, 2023
62ba107
build: Updating a missing workflow file `add-depr-ticket-to-depr-boar…
Feb 23, 2023
0fc5040
docs: Remove repo specific CONTRIBUTING.rst
Mar 6, 2023
3fb3c4e
fix: account for refunds in exec ed 2u redemption flow (#3920)
adamstankiewicz Mar 8, 2023
64e89b8
chore: add logging to include fulfillment details upon GEAG allocatio…
adamstankiewicz Mar 8, 2023
c74de17
chore: quality
adamstankiewicz Mar 8, 2023
9495e3e
fix: Pick the right purchase from ios response (#3921)
jawad-khan Mar 16, 2023
4e117d0
feat: Added Android refund api (#3922)
jawad-khan Mar 16, 2023
654dfb5
feat: Error if products in basket are already purchased (#3929)
moeez96 Mar 23, 2023
c22db3d
chore: add logging to debug ent-6954 (#3931)
adamstankiewicz Mar 23, 2023
fe975c4
fix: Fix error in checkout api for mobile (#3934)
moeez96 Mar 29, 2023
3ad694a
fix: Return error in case of duplicate transaction_id for mobile (#3936)
moeez96 Apr 3, 2023
c871aee
feat: Added course and expires field in product form on ecommerce das…
jawad-khan Apr 10, 2023
405592f
fix: reorder JWT decoders (#3941)
robrap Apr 11, 2023
99fe140
fix: cached monitoring (#3942)
robrap Apr 11, 2023
a50fd85
feat: add discount_jwt monitoring (#3944)
robrap Apr 11, 2023
ae883c3
feat: Added data_share_consent field to order fullfillment notes (#3939)
irfanuddinahmad Apr 12, 2023
b5fa2e5
chore: Switch from edx-sphinx-theme to sphinx-book-theme
xitij2000 Mar 24, 2023
29e78ed
test: Add tests for Mobile IAP (#3937)
moeez96 Apr 13, 2023
5c605ea
fix: fix codecov error
aht007 Apr 14, 2023
580be67
fix: add an exec ex 2u max application check to the checkout flow. EN…
iloveagent57 Apr 14, 2023
d6924e3
feat: add product entitlement info api (#3945)
aht007 Apr 19, 2023
c27b0fb
fix: Updated format for data_share_consent field
Apr 21, 2023
300c376
docs: Update the contributing guidelines link.
Apr 24, 2023
679a1f7
feat!: remove custom JWT decoding (#3943)
robrap Apr 26, 2023
43b7e87
fix: Course to have multiple seats with certificate_type attribute (#…
moeez96 Apr 28, 2023
274f212
temp: update JWT_DECODE_HANDER in devstack.py
robrap May 1, 2023
b21e122
feat: add native Dockerfile to create ansible free image
iamsobanjaved Apr 25, 2023
68482ce
feat: add additional fields to EnterpriseLearnerOfferApiSerializer (#…
adamstankiewicz May 10, 2023
a0251ba
refactor: add logging to mobile IAP (#3962)
moeez96 May 11, 2023
addfb62
refactor: Improve exception handling for mobile IAP (#3969)
moeez96 May 15, 2023
9cf9d56
feat: Fix capture_context error on Payment MFE (#3965)
JadeyOlivier May 16, 2023
c623201
feat: Add enterprise_customer_name in the event metadata for offer us…
saleem-latif May 17, 2023
3bae030
feat: Embargo check for subscription Programs (#3960)
aht007 May 17, 2023
e987d3d
fix: Enable TrackingMiddleware for Mobile IAP basket (#3977)
moeez96 May 25, 2023
87292e2
chore: updated Python requirements (edx-ecommerce-worker to version 3…
ishahroz May 31, 2023
f805880
fix: schedule upgrade-python-requirements monthly
pshiu Aug 24, 2022
82ae511
fix: add edx-revenue-tasks to user_reviewers & remove team_reviewers
pshiu Sep 8, 2022
e084e2d
feat: add sf line item field to enterprise offers
brobro10000 Jun 6, 2023
110d834
feat: Added ios refund callback (#3967)
jawad-khan Jun 14, 2023
fd492fc
feat: add SDN endpoints (#3985)
christopappas Jun 16, 2023
6b88537
fix: fix 500 on SDN for subscriptions (#3989)
aht007 Jun 19, 2023
2f1437e
fix: pytest-selenium, pytest-variables, pyjwkest dependency issues (#…
pshiu Jun 20, 2023
fd5f0c2
feat: add coupon sf opp line item attribute
iloveagent57 Jun 20, 2023
0730221
feat: Store price and currency for Mobile IAP (#3992)
moeez96 Jun 23, 2023
a4298d2
fix: return 200 on embargo failure to prevent downstream error (#3993)
christopappas Jun 23, 2023
356f2fc
feat: Make mobile IAP execute/ API atomic (#3995)
moeez96 Jul 5, 2023
8095432
chore: added CODEOWNERS file (#3970)
ishahroz Jul 7, 2023
05e9777
refactor: Add logging to mobile IAP checkout/ API (#4000)
moeez96 Jul 7, 2023
a4766a5
chore: django security patch 3.2.20 upgrade (#3999)
UsamaSadiq Jul 7, 2023
3b1fcb0
feat: Updates opportunity line item regex and tests (#3996)
brobro10000 Jul 10, 2023
e233314
feat: unenroll refunded android users daily (#4015)
jawad-khan Aug 3, 2023
b5a96f1
feat: mail mobile team for a mobile course change in publisher (#4014)
jawad-khan Aug 17, 2023
fa4ab4f
fix: readthedocs file renamed (#4024)
zubairshakoorarbisoft Sep 1, 2023
f0e196f
fix: Docker multi-arch images push for linux/amd64, linux/arm64 (#4006)
salman2013 Sep 7, 2023
5ee776c
feat: upgrade edx-drf-extensions and newrelic (#4027)
robrap Oct 20, 2023
83045eb
docs: Update RTD config. (#4042)
feanil Oct 23, 2023
4d275df
Feat: Upgrade django-oscar to version 3.2 (#4023)
zubair-ce07 Oct 24, 2023
0a7a61f
Revert "Feat: Upgrade django-oscar to version 3.2 (#4023)" (#4043)
zubair-ce07 Oct 24, 2023
9483664
fix: Added logs for ios refund exception (#4040)
jawad-khan Oct 26, 2023
fc58dd7
chore: pin social-auth-app-django to 5.2 to prevent unintended hangin…
christopappas Oct 26, 2023
90936d6
docs: Update the security e-mail address.
feanil Oct 23, 2023
7e126dc
feat: upgrade edx-drf-extensions to 8.13.0 (#4047)
robrap Oct 31, 2023
6e601e5
feat: Mgmt Command to create mobile seats for new course runs (#4046)
moeez96 Nov 13, 2023
8209a41
fix: Update SDN CSL URL used for fallback (#4053)
julianajlk Nov 14, 2023
7aa3886
docs: Update security e-mail address correctly.
feanil Nov 16, 2023
e53555c
feat: Publish mobile skus to lms (#4057)
moeez96 Nov 23, 2023
59968f4
feat: upgrade edx-drf-extensions to 9.0.0 (#4060)
robrap Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/add-depr-ticket-to-depr-board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
secrets:
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/add-remove-label-on-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "label: " it tries to apply
# the label indicated in rest of comment.
# If the comment starts with "remove label: ", it tries
# to remove the indicated label.
# Note: Labels are allowed to have spaces and this script does
# not parse spaces (as often a space is legitimate), so the command
# "label: really long lots of words label" will apply the
# label "really long lots of words label"

name: Allows for the adding and removing of labels via comment

on:
issue_comment:
types: [created]

jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ jobs:
architecture: x64
- name: Report coverage
if: matrix.testname == 'test-python'
run: |
pip install codecov
codecov
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: false

docs:
runs-on: ubuntu-latest
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Push Docker Images

on:
push:
branches:
- master
- open-release/**
jobs:
push:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

# Use the release name as the image tag if we're building an open release tag.
# Examples: if we're building 'open-release/olive.master', tag the image as 'olive.master'.
# Otherwise, we must be building from a push to master, so use 'latest'.
- name: Get tag name
id: get-tag-name
uses: actions/github-script@v5
with:
script: |
const branchName = context.ref.split('/').slice(-1)[0];
const tagName = branchName === 'master' ? 'latest' : branchName;
console.log('Will use tag: ' + tagName);
return tagName;
result-encoding: string

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Dev Docker image
uses: docker/build-push-action@v4
with:
push: true
target: dev
repository: edxops/ecommerce-dev
tags: |
edxops/ecommerce-dev:${{ steps.get-tag-name.outputs.result }}
edxops/ecommerce-dev:${{ github.sha }}
platforms: linux/amd64,linux/arm64

# The current priority is to get the devstack off of Ansible based Images. Once that is done, we can come back to this part to get
# suitable images for smaller prod environments.
# - name: Build and push prod Docker image
# uses: docker/build-push-action@v4
# with:
# push: true
# target: prod
# repository: edxops/ecommerce-prod
# tags: |
# edxops/ecommerce-prod:${{ steps.get-tag-name.outputs.result }}
# edxops/ecommerce-prod:${{ github.sha }}
# platforms: linux/amd64,linux/arm64
12 changes: 12 additions & 0 deletions .github/workflows/self-assign-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "assign me" it assigns the author to the
# ticket (case insensitive)

name: Assign comment author to ticket if they say "assign me"
on:
issue_comment:
types: [created]

jobs:
self_assign_by_comment:
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master
7 changes: 4 additions & 3 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Upgrade Requirements

on:
schedule:
- cron: "15 1 * * 4"
- cron: "15 1 1 * *"
workflow_dispatch:
inputs:
branch:
Expand All @@ -13,8 +13,9 @@ jobs:
call-upgrade-python-requirements-workflow:
with:
branch: ${{ github.event.inputs.branch }}
team_reviewers: "revenue-squad"
email_address: [email protected]
user_reviewers: edx-revenue-tasks
team_reviewers: ""
email_address: [email protected]
send_success_notification: false
secrets:
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
Expand Down
7 changes: 6 additions & 1 deletion .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ sphinx:
configuration: docs/conf.py
fail_on_warning: true

# Set the version of python needed to build these docs.
build:
os: "ubuntu-22.04"
tools:
python: "3.8"

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- requirements: requirements/docs.txt
5 changes: 5 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Team @openedx/revenue-squad will be the default owners for
# everything in this repo. Unless a later match takes
# precedence, @openedx/revenue-squad will be requested for
# review when someone opens a pull request.
* @openedx/revenue-squad
4 changes: 0 additions & 4 deletions CONTRIBUTING.rst

This file was deleted.

89 changes: 89 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
FROM ubuntu:focal as app

ENV DEBIAN_FRONTEND noninteractive
# System requirements.
RUN apt update && \
apt-get install -qy \
curl \
git \
language-pack-en \
build-essential \
python3.8-dev \
python3-virtualenv \
python3.8-distutils \
libmysqlclient-dev \
libssl-dev \
libcairo2-dev && \
rm -rf /var/lib/apt/lists/*

# Use UTF-8.
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

ARG COMMON_APP_DIR="/edx/app"
ARG COMMON_CFG_DIR="/edx/etc"
ARG SERVICE_NAME="ecommerce"
ARG ECOMMERCE_APP_DIR="${COMMON_APP_DIR}/${SERVICE_NAME}"
ARG ECOMMERCE_VENV_DIR="${COMMON_APP_DIR}/${SERVICE_NAME}/venvs/${SERVICE_NAME}"
ARG ECOMMERCE_CODE_DIR="${ECOMMERCE_APP_DIR}/${SERVICE_NAME}"
ARG ECOMMERCE_NODEENV_DIR="${ECOMMERCE_APP_DIR}/nodeenvs/${SERVICE_NAME}"

ENV ECOMMERCE_CFG "${COMMON_CFG_DIR}/ecommerce.yml"
ENV ECOMMERCE_CODE_DIR "${ECOMMERCE_CODE_DIR}"
ENV ECOMMERCE_APP_DIR "${ECOMMERCE_APP_DIR}"

# Add virtual env and node env to PATH, in order to activate them
ENV PATH "${ECOMMERCE_VENV_DIR}/bin:${ECOMMERCE_NODEENV_DIR}/bin:$PATH"

RUN virtualenv -p python3.8 --always-copy ${ECOMMERCE_VENV_DIR}

RUN pip install nodeenv

RUN nodeenv ${ECOMMERCE_NODEENV_DIR} --node=16.14.0 --prebuilt && npm install -g [email protected]

# Set working directory to the root of the repo
WORKDIR ${ECOMMERCE_CODE_DIR}

# Install JS requirements
COPY package.json package.json
COPY package-lock.json package-lock.json
COPY bower.json bower.json
RUN npm install --production && ./node_modules/.bin/bower install --allow-root --production

# Expose canonical ecommerce port
EXPOSE 18130

FROM app as prod

ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.production"

COPY requirements/production.txt ${ECOMMERCE_CODE_DIR}/requirements/production.txt

RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/production.txt

# Copy over rest of code.
# We do this AFTER requirements so that the requirements cache isn't busted
# every time any bit of code is changed.
COPY . .

CMD gunicorn --bind=0.0.0.0:18130 --workers 2 --max-requests=1000 -c ecommerce/docker_gunicorn_configuration.py ecommerce.wsgi:application

FROM app as dev

ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.devstack"

COPY requirements/dev.txt ${ECOMMERCE_CODE_DIR}/requirements/dev.txt

RUN pip install -r ${ECOMMERCE_CODE_DIR}/requirements/dev.txt

# Devstack related step for backwards compatibility
RUN touch ${ECOMMERCE_APP_DIR}/ecommerce_env

# Copy over rest of code.
# We do this AFTER requirements so that the requirements cache isn't busted
# every time any bit of code is changed.
COPY . .

CMD while true; do python ./manage.py runserver 0.0.0.0:18130; sleep 2; done
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
⛔️ DEPRECATION WARNING
⛔️ DEPRECATION WARNING
======================
This repository is deprecated and in maintainence-only operation while we work on a replacement, please see `this announcement <https://discuss.openedx.org/t/deprecation-removal-ecommerce-service-depr-22/6839>`__ for more information.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to `security@edx.org <mailto:[email protected]>`__
Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to security@openedx.org

edX E-Commerce Service |CI|_ |Codecov|_
============================================
Expand Down Expand Up @@ -32,12 +32,12 @@ How To Contribute

Anyone merging to this repository is expected to `release and monitor their changes <https://openedx.atlassian.net/wiki/spaces/RS/pages/1835106870/How+to+contribute+to+our+repositories>`__; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.

Please also read `How To Contribute <https://github.com/openedx/edx-platform/blob/master/CONTRIBUTING.rst>`__. Even though it was written with ``edx-platform`` in mind, these guidelines should be followed for Open edX code in general.
Please also read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`__.

Reporting Security Issues
-------------------------

Please do not report security issues in public. Please email security@edx.org.
Please do not report security issues in public. Please email security@openedx.org.

Get Help
--------
Expand Down
7 changes: 7 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ def django_db_setup(django_db_setup, django_db_blocker, django_db_use_migrations
type='text',
required=False
)
ProductAttribute.objects.create(
product_class=coupon,
name='Salesforce Opportunity Line Item',
code='salesforce_opportunity_line_item',
type='text',
required=False
)
ProductAttribute.objects.create(
product_class=coupon,
name='Is Public Code?',
Expand Down
6 changes: 6 additions & 0 deletions docs/additional_features/gate_ecommerce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Waffle offers the following feature gates.
- Switch
- Allow a missing LMS user id without raising a MissingLmsUserIdException. For background, see
`0004-unique-identifier-for-users <https://github.com/openedx/ecommerce/blob/master/docs/decisions/0004-unique-identifier-for-users.rst>`_
* - disable_redundant_payment_check_for_mobile
- Switch
- Enable returning an error for duplicate transaction_id for mobile in-app purchases.
* - mail_mobile_team_for_change_in_course
- Switch
- Alert mobile team for a change in a course having mobile seats, so that they can adjust prices on mobile platforms.
* - enable_stripe_payment_processor
- Flag
- Ignore client side payment processor setting and use Stripe. For background, see `frontend-app-payment 0005-stripe-custom-actions <https://github.com/openedx/frontend-app-payment/blob/master/docs/decisions/0005-stripe-custom-actions.rst>`_.
Expand Down
Loading
Loading