-
Notifications
You must be signed in to change notification settings - Fork 81
AAP-51350 Support Django 5.2 as well as Django 4.y #855
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
base: devel
Are you sure you want to change the base?
Conversation
Documenting:
|
Link #213 |
@ttuffin asking for your advisement on SonarCloud coverage data here. This reports that the new method isn't covered. This is somewhat obvious, because it is added for compatibility, and whatever the existing config is doing seems to only get coverage from one run. But clearly different runs in the matrix will cover different lines in code - otherwise why would we have a matrix?! This is where a coverage requirement becomes very murky, as it gets highly highly configuration dependent. Do you want coverage to be gathered from all runs and combined? We have a clear preference, which is that we only "care" about Django 5, as the compatibility stuff is temporary, but cannot be avoided. Getting coverage for version-specific stuff is extra work and doesn't necessarily provide any value. |
DVCS PR Check Results: PR appears valid (JIRA key(s) found) |
|
Tests I added meaningfully covered the non-trivial code related to processing of multiple querysets passed in. This seems pretty solid now. |
Description
Looking to get DAB CI passing with Django 5 & 4 for the compatibility phase.
Type of Change
Note
Add Django 5.2 support with Django 4 compatibility, updating CI/tox matrices, relaxing/pinning requirements, adding a help_text migration, and adapting resource prefetch logic with new tests.
ansible_base/resource_registry/fields.py
: implementget_prefetch_querysets(...)
and add a Django 4-compatibleget_prefetch_queryset(...)
shim for the custom one-to-one descriptor.ansible_base/rbac/migrations/0009_objectrole_help_text_change.py
: migration updatingObjectRole
users
/teams
ManyToManyhelp_text
..github/workflows/ci.yml
: add matrix envspy310-django4
,py311-django4
,py312-django4
.pyproject.toml
(tox): add corresponding envs and include them in thetest
label.requirements/requirements.in|all.txt|dev.txt
: relax toDjango>=4.2.21,<6.0
and pin todjango==5.2.7
in compiled/dev.requirements/updater.sh
: add safety check to run fromrequirements/
and minor script hardening.test_app/tests/resource_registry/models/test_resource_field.py
: add prefetch tests acrossorganization__resource
viaInventory
and toresource__content_type__resource_type
; update imports.Written by Cursor Bugbot for commit 59c8734. This will update automatically on new commits. Configure here.