-
Notifications
You must be signed in to change notification settings - Fork 254
Feat: Upgrade django-oscar to version 3.2 #4023
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this work! Question - are the template changes included in this PR part of the upgrade? Were you able to see the changes locally/do they make sense?
ecommerce/templates/oscar/dashboard/catalogue/product_update.html
Outdated
Show resolved
Hide resolved
i see that the tests are failing with somenthing related to not sure if you've been digging into this yet, but, in my local ecommerce i see OPTIONAL as an attribute of the
looks like optional was deleted in this commit: django-oscar/django-oscar@dd5a151#diff-6101f645bcf6dd2482680b01d02acf8a6010004e7a7730a9513e9cdc41165aff i think for backwards compatibility, we may want to add OPTIONAL with text of |
Yes Otherwise whole pages alignment were out of order. We need to upgrade template pages as per new upgraded version. |
8040119
to
3fee834
Compare
@@ -32,5 +32,35 @@ class Migration(migrations.Migration): | |||
] | |||
|
|||
operations = [ | |||
migrations.AddField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this the old migration we're adding to? why do we need to do this? this seems odd to me... i'm worried that changing a migration that has already been applied 1) would not have any effect 2) break the application of migrations
@@ -537,8 +537,9 @@ def create_new_voucher(code, end_datetime, name, start_datetime, voucher_type): | |||
if not isinstance(end_datetime, datetime.datetime): | |||
end_datetime = dateutil.parser.parse(end_datetime) | |||
|
|||
name = name[:128 - len(voucher_code)] + voucher_code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all this work Zubair. Before I 👍 , I'd like to understand the update to the old migration file and why that is necessary
@@ -0,0 +1,19 @@ | |||
# Generated by Django 3.2.20 on 2023-08-24 10:28 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it's definitely weird that this migration and other other one are not gettign covered by codecov. these were also made a few months back. i wonder if there's somtehing about changes we have made along the way that has prevented these migrations from being relevant? i honestly am not sure. if we delete this migrations from you branch, re run makemigrations, and these appear again , and then you push them up this branch and we still see this coverage issue, then i think it might be fine. i just want to make sure there isn't anything extra that was created along the way that is no longer relevant 🤷 -- honestly though, i'm not certain why this is the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the case for so many of the migrations 🤔 -- that's so odd...
@@ -4,21 +4,20 @@ | |||
from django.db import migrations, models | |||
from oscar.core.loading import get_model | |||
|
|||
Option = get_model('catalogue', 'Option') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this change still necessary based on the latest approach you described?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hy @christopappas. Yes this is necessary otherwise it will load the latest Option model (One created after running all the migrations) giving error "required field is not defined" because at this point required column is not created in our db.
you may need to squash your commits btw. looks like there's a commitlint error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm giving you a 👍 because i think you have done enough due diligence and QA here so far. if none of the most recent comments I make you feel like something to change, and if you are comfortable with the stage of this, i would like to see us merge this and test extensively on stage 🚀
a417de8
to
7d6a998
Compare
This reverts commit 4d275df.
* feat: changes to upgrad django-oscar to version 3.2 * chore: upgraded django oscar to version 3.2
Description
Changes related to upgrade ecommerce application to django-oscar version 3.2 from 2.2
Required Testing
Thoroughly test ecommerce dashboard. (Every flow needs to be tested)
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.
Other information
Ticket: https://2u-internal.atlassian.net/browse/REV-3639