ara icon indicating copy to clipboard operation
ara copied to clipboard

Ara is not buildable in Debian Sid with new django

Open keuko opened this issue 2 years ago • 4 comments

Hi,

Ara can't be build against new django and other plugins, can you please adapt ara for new django and release new version so I can build a packages ?

Thank you

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013506

keuko avatar Jul 11 '22 13:07 keuko

Hello, it's not possible to update the django version (at least on ara side) as ealier versions doesn't support python3.6. The latest django version to support it is 3.2.. I don't think it's planned soon to update ara with a python =>3.8 (which should support django 4.). It's already fairly new that ara dropped support on python3.5.

DataHearth avatar Jul 15 '22 09:07 DataHearth

Hi @keuko and thanks for the issue.

I looked through the logs included in the bug and saw that it tries to build against django 4.x:

Get:89 http://127.0.0.1:12990/debian sid/main amd64 python3-django all 2:4.0.5-2 [2894 kB]

The latest stable release of ara (1.5.8) runs with django 2.2 LTS but there is an unreleased commit that updates to django 3.2 TLS: https://github.com/ansible-community/ara/commit/ac9ceffeacac2e29ef35ecf3cbd8ae599820e33e

There are no plans to upgrade beyond 3.2 LTS at this time, though the expectation is that we will eventually update to 4.2 LTS once it is available: release-roadmap 4cf783b31fbe (via djangoproject.com)

It could be that we are lucky and django 4.x is backwards compatible with 3.2 LTS but we don't have the bandwidth to keep up with the non-LTS versions of django at this time.

I've been busy and sidetracked elsewhere but we are overdue for a release. I should be able to take care of it sometime soon and we can find out if it works with the version of django in debian you are trying to build with.

dmsimard avatar Jul 20 '22 14:07 dmsimard

quickly checked the error, django.conf.urls.url() was deprecrated in 3.1 and removed in 4.0: https://docs.djangoproject.com/en/4.1/releases/4.0/#features-removed-in-4-0.

Because it is only an alias it could be simple replaced with django.urls.re_path()(https://docs.djangoproject.com/en/3.2/ref/urls/#url).

No guarantee that with this ara will be compatible with Django 4.0 but because it is a no brainer we could include it in ara 1.6.0.

hille721 avatar Oct 02 '22 13:10 hille721

I had time to look into this just now, it turns out the issue is not between ara and django4 -- in the case of the trace from Debian packaging, it's from django-health-check:

>   File "/usr/lib/python3/dist-packages/health_check/urls.py", line 1, in <module>
>     from django.conf.urls import url
> ImportError: cannot import name 'url' from 'django.conf.urls' (/usr/lib/python3/dist-packages/django/conf/urls/__init__.py)
> E: pybuild pybuild:369: test: plugin custom failed with: exit code=1: python3.10 manage.py test -v 2 ara

Digging through the logs, we find that it was trying with version 3.12.1:

Get:92 http://127.0.0.1:12990/debian sid/main amd64 python3-django-health-check all 3.12.1-3 [18.4 kB]

3.12.1 was released in January 2020 and it looks like the issue was fixed in October 2020: https://github.com/KristianOellegaard/django-health-check/commit/93e9cdd1e881f255166df2d1189fcae838a077a9

So the version from Debian wouldn't have the fix.

@keuko, I see 3.17 (released in September 2022) in sid: https://packages.debian.org/sid/python3-django-health-check It looks like the earliest version that would work is 3.14.2: https://github.com/KristianOellegaard/django-health-check/releases/tag/3.14.2

Could you try again with a newer version and let us know if that works ?

dmsimard avatar Oct 16 '22 23:10 dmsimard