Project

Profile

Help

Task #8488

closed

[EPIC] Upgrade to django 3.2

Added by daviddavis over 3 years ago. Updated about 3 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
(Total: 0:00 h)
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

See the subtasks for the identified work.


Sub-issues 12 (0 open12 closed)

Refactor #8821: Have the content app make all of its ORM calls in another Threadpool executorCLOSED - CURRENTRELEASEdalley

Actions
Task #8975: Provide environment variables to permit Django ORM to work in an async contextCLOSED - CURRENTRELEASEdalley

Actions
Task #9018: Bump the pulpcore requirement to django 3.2CLOSED - CURRENTRELEASEdaviddavis

Actions
Task #9112: Update `contrib.JSONField` to `JSONField`CLOSED - CURRENTRELEASEdaviddavis

Actions
Issue #9120: Deprecation warning for RepositoryVersionContentDetails idCLOSED - CURRENTRELEASEActions
Ansible Plugin - Task #9121: Update `contrib.JSONField` to `JSONField`CLOSED - DUPLICATE

Actions
Issue #9129: Syncing is running out of DB connectionsCLOSED - CURRENTRELEASEgerrodActions
Ansible Plugin - Issue #9260: Syncing is running out of DB connectionsCLOSED - CURRENTRELEASEActions
Migration Plugin - Issue #9283: Syncing is running out of DB connectionsCLOSED - CURRENTRELEASEActions
Task #9171: Remove workaround in RemoteArtifactSaver now that we're on Django 3.2CLOSED - CURRENTRELEASE

Actions
RPM Support - Task #9189: Update `contrib.JSONField` to `JSONField`CLOSED - CURRENTRELEASEdalley

Actions
Migration Plugin - Task #9209: Update `contrib.JSONField` to `JSONField`CLOSED - CURRENTRELEASEipanova@redhat.com

Actions

Related issues

Blocked by Pulp - Task #8853: [EPIC] Drop support for Python 3.6CLOSED - COMPLETE

Actions
Actions #1

Updated by dalley over 3 years ago

  • Related to Refactor #6529: Pulp 3 may be using Django in an unsafe way (with async) added
Actions #2

Updated by daviddavis over 3 years ago

Here's my branch: https://github.com/daviddavis/pulpcore/tree/django3

Most of everything is working aside from the task code (more on this below). The django-guid package has a 3.x version which they recommend using since it supports ASGI. However, it does not support Python 3.6. But it appears that django-guid 2.2 is working for now.

The biggest change will be handling django's ORM in our async code. Django's ORM is not async safe and therefore you have to use sync_to_async()[0] when calling django's ORM (otherwise you get an error[1]).

Alternatively, there is a variable we can set DJANGO_ALLOW_ASYNC_UNSAFE[2] but I don't think we should go this route. From the django docs, it says, "do not use this in production environments".

[0] https://docs.djangoproject.com/en/3.2/topics/async/#sync-to-async

[1] "SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async"

[2] https://docs.djangoproject.com/en/3.2/topics/async/#sync-to-async

Actions #3

Updated by dalley over 3 years ago

The compatibility status of django-guardian is a little unclear still. They have it in their test matrix but there is an unmerged PR addressing some compatibility issue.

Actions #4

Updated by daviddavis over 3 years ago

django-guardian 2.4.0 was released and it claims support for django 3.2.

Actions #5

Updated by bmbouter over 3 years ago

  • Sprint/Milestone set to 3.14.0
Actions #6

Updated by bmbouter over 3 years ago

  • Subject changed from Upgrade to django 3.2 to [Epic] Upgrade to django 3.2
  • Description updated (diff)
Actions #7

Updated by bmbouter over 3 years ago

  • Related to deleted (Refactor #6529: Pulp 3 may be using Django in an unsafe way (with async))
Actions #8

Updated by daviddavis over 3 years ago

  • Related to Task #8853: [EPIC] Drop support for Python 3.6 added
Actions #9

Updated by bmbouter over 3 years ago

  • Related to deleted (Task #8853: [EPIC] Drop support for Python 3.6)
Actions #10

Updated by bmbouter over 3 years ago

  • Blocked by Task #8853: [EPIC] Drop support for Python 3.6 added
Actions #11

Updated by daviddavis over 3 years ago

  • Sprint/Milestone changed from 3.14.0 to 3.15.0
Actions #12

Updated by dalley over 3 years ago

  • Sprint/Milestone deleted (3.15.0)

We don't really need both the epic and the subtask, closing the subtask, making this one the "real" issue.

Actions #13

Updated by dalley over 3 years ago

  • Subject changed from [Epic] Upgrade to django 3.2 to Upgrade to django 3.2
  • Sprint/Milestone set to 3.15.0
Actions #14

Updated by bmbouter over 3 years ago

  • Subject changed from Upgrade to django 3.2 to [EPIC] Upgrade to django 3.2
Actions #15

Updated by daviddavis about 3 years ago

  • Sprint/Milestone deleted (3.15.0)

Removing from 3.15 since the subtask that needs to block 3.15 is already assigned to 3.15.

Actions #16

Updated by dalley about 3 years ago

  • Status changed from NEW to CLOSED - COMPLETE

Also available in: Atom PDF