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

Django Oscar Upgrade to version 3.2.2 #4068

Closed
wants to merge 31 commits into from

Conversation

zubair-ce07
Copy link
Contributor

⛔️ 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 [email protected]

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.

zubair-ce07 and others added 16 commits November 12, 2023 11:06
chore: updated factory dependency

refactor: updated field name

feat: Mgmt Command to create mobile seats for new course runs (#4046)

fix: skipped a failing test. Will fix it in another ticket

fix: updated method

refactor: made changes as per new version of oscar

refactor: updated code to make voucher name unique

fix: removed white spaces

fix: removed white spaces

refactor: changed code as per new version of oscar

refactor: updated code

fix: override Product model in catalogue app

fix: removed extra spaces

fix: updated  code

fix: changes in code to pass checks

fix: changes in code to pass checks
@zubair-ce07 zubair-ce07 marked this pull request as ready for review December 6, 2023 14:26
@zubair-ce07 zubair-ce07 requested a review from a team as a code owner December 6, 2023 14:26
@awais786
Copy link
Contributor

awais786 commented Dec 11, 2023

 Applying basket.0016_alter_lineattribute_value... OK

This migration executed.

@awais786
Copy link
Contributor

  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
    return self.cursor.execute(query, args)
  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
    res = self._query(query)
  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/MySQLdb/cursors.py", line 315, in _query
    db.query(q)
  File "/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/MySQLdb/connections.py", line 239, in query
    _mysql.connection.query(self, query)
django.db.utils.OperationalError: (1054, "Unknown column 'basket_line.tax_code' in 'field list'")

@awais786
Copy link
Contributor

It seems like makemigrations command needs to run on this branch

Migrations for 'basket':
  ecommerce/extensions/basket/migrations/0017_line_tax_code.py
    - Add field tax_code to line
Migrations for 'offer':
  ecommerce/extensions/offer/migrations/0056_auto_20231211_1225.py
    - Add field upload_type to rangeproductfileupload
    - Alter field description on historicalrange
    - Alter field description on range
Migrations for 'order':
  ecommerce/extensions/order/migrations/0028_auto_20231211_1225.py
    - Change Meta options on surcharge
    - Add field tax_code to historicalline
    - Add field shipping_tax_code to historicalorder
    - Add field tax_code to line
    - Add field tax_code to lineprice
    - Add field shipping_tax_code to order
    - Add field tax_code to surcharge
 ```

@awais786
Copy link
Contributor

After running makemigration and migrate following migration rans.

Applying basket.0017_line_tax_code... OK
  Applying offer.0056_auto_20231211_1225... OK
  Applying order.0028_auto_20231211_1225... OK

Copy link
Contributor

@christopappas christopappas left a comment

Choose a reason for hiding this comment

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

These have been QA'd locally and in a (production-like) sandbox environment, and have passed the team's review. 👍

Base automatically changed from zubair-django-oscar32-update to master February 2, 2024 11:53
@feanil feanil closed this Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants