Skip to content
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

Django 1.11 Upgrade, round 102 #969

Merged
merged 31 commits into from
Oct 1, 2018
Merged

Django 1.11 Upgrade, round 102 #969

merged 31 commits into from
Oct 1, 2018

Conversation

micahscopes
Copy link
Contributor

I had to get rid of the "." in the branch name for the automatic build to work. So... yet another PR!

Hopefully this does it!

A lot of work has been done! This should be ready for the develop branch. Once we get it in there, we can do a collaborative QA round at a Thursday hack session!

Description

Upgrades to Django 1.11

Steps to Test

  • Ensure passing unit tests
  • Run through the QA test sheet and ensure it passes

Implementation Notes (optional)

At a high level, how did you implement this?

Run pip install with the new version, find all the stuff that broke, and fix it!

Does this introduce any tech-debt items?

It actually removes tech-debt!

Checklist

  • Is the code clean and well-commented?
  • Does this introduce a change that needs to be updated in the user docs?
  • Are there tests for this change?
  • Are all user-facing strings translated properly (if applicable)?
  • Are there any new ways this uses user data that needs to be factored into our Privacy Policy?
  • Are there any new interactions that need to be added to the QA Sheet?
  • Are there opportunities for using Google Analytics here (if applicable)?
  • Are the migrations safe for a large db (if applicable)?

Comments

*Thanks to everyone who made this PR possible 🥇 *

kollivier and others added 24 commits September 17, 2018 16:04
… to get the code to the same state as it was before revert.
…ass (#940)

* Add chef method unit tests and ensure that Django views return a HTTP response when they raise errors.

* Add more file upload and add node tests.

* Add finish_commit tests and return a HTTP 500 code instead of raising if an error occurs.

* Get Sentry reports for handled internal server errors in Internal API calls.

* Add yarn run devsetup command (#925)

* add new yarn command to set up dev environment

* change commands to remove redundant pieces to prioritize yarn run devsetup

Streamlines the new dev experience

* Updated translations with epub string

* Fixed default preview styling

* Add caching to the get_user_public_channels endpoint (#939)

* Move view get_public_channels logic to Channel model

* add the Channel.make_public function

* use StudioTestCase to create buckets

* add ChannelCacher class to implement channel caching

* add channel token related convenience functions

* make exporchannel use Channel.make_token()

* add channel specific cache for tokens

Cache that, one less query to make.

* add caching to channel token serializer endpoint

* move serializers.get_resource_count implementation to the Channel model

* use channel.get_thumbnail() function on serializers.py

* remove redefinition of generate_thumbnail_url

* add ChannelCacher.get_resource_count() cache function

Used to cache the channel's get_resource_count

* add caching to get_resource_count API attribute

* add channel.get_date_modified function

* make channelfieldmixin use channel.get_date_modified

* add channel.get_date_modified cache

* Use the channel cache for get_date_modified

* remove redundant generate_thumbnail_url

Already defined in ChannelFieldMixin

* pass cache get_public_channels args to real function

* cache the entire get_user_public_channels view

* fix tests for ChannelCacher.get_public_channels()

by comparing actual channel ids rather than objects

* Create SecretToken.exists() convenience method

* refactor make_token to definitely end after 100 attempts

And use for-else loop construct

* add extra non-public assert on the make_public test

* add test for SecretToken.exists()

* [WIP] Add nginx-level API endpoint caching (#943)

* add long running caching to the get_user_public_channels endpoint

* add caching to the get_user_edit_channels endpoint

* add 4 hour browser caching on all static files (#945)

* add caching to the get_user_edit_channels endpoint (#947)

* Unlock le-utils' version

* have pipenv update all updateable packages

* Added comment

* Made resource count required on storage requests

* Merge in develop

* Return 404s for any files not found in the zip, and have BadZipfile errors report the name, size, mode and download state to help us narrow down problems with opening. Also, tests. (#942)

* Remove the hardcoded server IP in tests so that configuration changes don't break them.

* Apply Micah's changes and also fix some new issues uncovered by tests to get the code to the same state as it was before revert.

* Fix login template name.

* Actually commit the updated dependency versions to requirements.txt...

* use `==` instead of `=` in template `if` statement

* Re-delete requirements.txt as a result of rebasing issues.

* Update Django to 1.11 in pipfile after rebase.

* Actually update the dependencies after accidentally using pip...

* objects.create automatically calls save, so no need to call it again afterwards.

* objects.create automatically calls save, so no need to call it again afterwards.

* Revert removed calls to save as we are creating models directly rather than using objects.create.

* Revert removed calls to save as we are creating models directly rather than using objects.create.

* update django to 1.11.15!

* use the recommended way of declaring our AppConfig

Through our INSTALLED_APPS! See https://docs.djangoproject.com/en/1.11/ref/applications/#configuring-applications

* use FormatPresetSerializer as a PrimaryKeyRelatedField serializer

* disable breakpoints

* attempted fix for file uploading issues

* file uploading works... yay!

* signup form multiselection area is working now

* enable offline_helper

* remove extra debugging leftovers from registration info template

* fixes for several tests... remember: don't manually hardcode constants from le_utils.  they may change some day!

* fixed authentication tests

* add a migration from django 1.11
@micahscopes
Copy link
Contributor Author

I'd like to request that this be squash merged!

micahscopes and others added 2 commits September 18, 2018 12:03
Just return the filename passed in, since the logic is implemented through generate_object_storage_name.
@aronasorman
Copy link
Collaborator

@micahscopes we can ignore the google cloud build.

Copy link
Contributor

@kollivier kollivier left a comment

Choose a reason for hiding this comment

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

My name is Kevin Ollivier and I approve this (commit) message!

@kollivier kollivier merged commit 143d251 into develop Oct 1, 2018
@aronasorman aronasorman deleted the django-1-11 branch October 2, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants