-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated django-oauth2-provider #11432
Conversation
f18d6b4
to
9f2bd9c
Compare
@nedbat @feanil please review. A diff of the OAuth lib is available at edx/django-oauth2-provider@0.2.7-fork-edx-6a...0.5.0. I'm not quite sure why it includes commits from 2013. |
jenkins run all |
9f2bd9c
to
83da1e8
Compare
New package includes support for client credentials grant.
83da1e8
to
e92802b
Compare
This part of paver, is not run on production builds, is it a requirement for this to get deployed correctly. If the version numbers of the new requirements have been upped, you shouldn't need that right? |
@feanil I assume you're referring to the uninstall code. I don't know if installing the new package atop the previously-editable version will have any side-effects (e.g. the old version take precedence). Do we have the option of building this AMI from scratch instead of the previously-deployed AMI? |
The option to build AMIs from scratch does exist but it means the release master/devops engineer need to be made aware that they need to do it. It seems like the code precedence is something you can check quickly in a local virtualenv. My expectation is that if the packages have the same name, the last |
I installed locally, and the assumption that the last-installed version is used is incorrect. Both packages are installed, but the editable version takes precedence. We will need to build from scratch. edxapp@precise64:~/edx-platform$ python
Python 2.7.10 (default, Jun 29 2015, 22:38:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import provider
>>> provider.__version__
'0.2.7-fork-edx-6' edxapp@precise64:~/edx-platform$ pip freeze | grep oauth2-provider
-e git+https://github.com/edx/django-oauth2-provider.git@764601a74b368a6b7296c229673a23a7e940be3f#egg=django_oauth2_provider-0.2.7-fork-edx-6a
edx-django-oauth2-provider==0.5.0
edx-oauth2-provider==0.5.9 |
@nasthagiri @fredsmith you will be in-charge of the release when this goes out so I want you both to be aware. This change will require building edxapp AMIs from scratch. 👍 @clintonb I want both of them to confirm they have seen this before you merge this. |
if any("django-oauth2-provider==" in line for line in frozen): | ||
sh("pip uninstall --disable-pip-version-check -y django-oauth2-provider") | ||
uninstalled = True | ||
|
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 won't run unless you also update expected_version
on line 186. Are you sure you need to perform an explicit uninstall?
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.
@nedbat it turns out he does, because the egg names are different. django-oauth2-provider
vs edx-django-oauth2-provider
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.
Oh, sorry, I missed the egg-name change.
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.
You need to change the expected_version to get this uninstall to run.
There are commits from 2013 in the diff because @justinabrahms pulled them in with this commit: edx/django-oauth2-provider@c1cbc3b |
How does this change relate to what @jcdyer is doing in his PR https://github.com/edx/edx-platform/pull/11397? We had decided to wait on releasing Cliff's PR until we validated those changes with his next set of changes for django-oauth-toolkit. So there would be only one operational migration hiccup. |
@nasthagiri Cliff's change includes a renaming of the exported package, requiring code changes. I have only changed the name of the package in setup.py (to support PyPI publishing). Merging this will result in one less thing for Cliff to do—uninstall the editable package. |
@nedbat looking at edx/django-oauth2-provider#14, we made an explicit decision to retain the history and properly credit the original author of the implicit grant work. Yes, we are fine with the pre-2015 commits. |
👍 from devops |
Updated django-oauth2-provider
What is the point of my reviewing this and saying (twice) that you need to change a value in the uninstall code to get it to run, if you are going to merge it anyway? :( |
Follow up to #11432. This value needs to be incremented to ensure the old package is uninstalled. ECOM-3647
@clintonb @feanil @nedbat @benpatterson this has broken ansible provisioning for a new jenkins worker. See https://build.testeng.edx.org/job/build-packer-ami/496/consoleText
|
New package includes support for client credentials grant.