Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Conversation

nasirhjafri
Copy link
Contributor

No description provided.

@openedx-webhooks
Copy link

Thanks for the pull request, @nasirhjafri! I've created OSPR-4097 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

Feel free to add as much of the following information to the ticket:

  • supporting documentation
  • edx-code email threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information.

@coveralls
Copy link

coveralls commented Feb 17, 2020

Coverage Status

Coverage remained the same at 98.136% when pulling 2b99933 on nasirhjafri:MCKIN-12934 into 665f0a4 on edx:master.

@nasirhjafri nasirhjafri requested a review from ihtram February 21, 2020 09:37

# Notification type
msg_type = models.ForeignKey(SQLNotificationType, db_index=True)
msg_type = models.ForeignKey(SQLNotificationType, db_index=True, on_delete=models.DO_NOTHING)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use on_delete=models.CASCADE as it was the default value in older versions of Django. Here is the reference: https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
We need to change this for each instance in this PR.

package.json Outdated
"karma-jasmine-jquery": "latest",
"karma-phantomjs-launcher": "latest",
"sinon": "latest",
"sinon": "<=7.5.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason to pin sinon to a specific version? just need some context if there was any conflict or error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sinon 8 was released few weeks back and have some major changes which are causing the tests to break.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nasirhjafri that make sense. A little improvement could be to pin it like "sinon": "<8.0.0". We have already used this for rebase-ironwood branch and it is working for us.

django==1.11.25
git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc86856441bbf0bd9cb#egg=djangorestframework==3.6.3
django>=2.0,<3.0
djangorestframework==3.11.0
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't modify .txt requirement files directly now. We pin the versions is .in file and then use pip-compile to generate .txt file. you can pin your versions in .in file and generate .txt using command make upgrade.
For reference you can view the Makefile in project root.

setup.py Outdated
setup(
name='edx-notifications',
version='1.0.2',
version='1.0.3',
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is a major release change, can you bump it to 1.1.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure!

url(r'^api/', include('edx_notifications.server.api.urls')),
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
path('api/', include('edx_notifications.server.api.urls')),
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I need a little context about removing regex here. we could have used re_path with existing regex.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

path() always matches the complete path, so path('jsi18n/') is equivalent to url('^jsi18n/$')
So no need to use regexes over here.

@nasirhjafri nasirhjafri force-pushed the MCKIN-12934 branch 2 times, most recently from a4a9542 to 1c7e28b Compare February 25, 2020 10:55
@@ -1,10 +1,10 @@
# Django/Framework Packages
django==1.11.25
django>=2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

@nasirhjafri please use django<2.3 instead

package.json Outdated
"karma-jasmine-jquery": "latest",
"karma-phantomjs-launcher": "latest",
"sinon": "latest",
"sinon": "<=7.5.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

@nasirhjafri that make sense. A little improvement could be to pin it like "sinon": "<8.0.0". We have already used this for rebase-ironwood branch and it is working for us.

@nasirhjafri nasirhjafri requested a review from ihtram February 26, 2020 08:29
@nasirhjafri
Copy link
Contributor Author

@ihtram Please review it again, thanks!

@ihtram
Copy link
Contributor

ihtram commented Feb 27, 2020

@nasirhjafri Looks good now. Can you please squash the commits and push a single commit?

@nasirhjafri
Copy link
Contributor Author

@ihtram Squashed the commit to a single commit.

Copy link
Contributor

@ihtram ihtram left a comment

Choose a reason for hiding this comment

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

👍

@ihtram ihtram merged commit ef448f5 into openedx-unsupported:master Feb 27, 2020
@nasirhjafri nasirhjafri deleted the MCKIN-12934 branch June 9, 2020 15:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants