[Django] #35709: Command collectstatic should relay on checksums instead of modify time

25 views
Skip to first unread message

Django

unread,
Aug 27, 2024, 6:03:32 AM8/27/24
to django-...@googlegroups.com
#35709: Command collectstatic should relay on checksums instead of modify time
-------------------------------------+-------------------------------------
Reporter: Grzegorz Przybylik | Type:
| Cleanup/optimization
Status: new | Component: Core
| (Management commands)
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
In our project we mostly relay on containerization and packing code
including their static files into containers. During upgrade we call
`manage.py collectstatic` inside that container and our static files are
uploaded to s3 bucket.

Collectstatic command to make sure if file needs replacement checks
creation timestamp on destination storage and local file storage. But
problem is that creation time of static files inside container are set
during image creation. This causes issues in deploying older images,
because of their create timestamps mentioned earlier.

My idea to fix this is to check files checksums (like md5 or sha) and
using them to compare file identity.
--
Ticket URL: <https://code.djangoproject.com/ticket/35709>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 27, 2024, 2:07:19 PM8/27/24
to django-...@googlegroups.com
#35709: Command collectstatic should relay on checksums instead of modify time
-------------------------------------+-------------------------------------
Reporter: Grzegorz Przybylik | Owner: (none)
Type: New feature | Status: closed
Component: contrib.staticfiles | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* component: Core (Management commands) => contrib.staticfiles
* resolution: => duplicate
* status: new => closed
* type: Cleanup/optimization => New feature

Comment:

Hello Grzegorz Przybylik, thank you for taking the time to create this
ticket.

I understand the goal of your proposal, but please note that this was
already proposed and discussed in ticket #19021, and it was marked as
`wontfix` for the reasons stated in its closing ticket:19021#comment:7.

Closing as duplicate following the
[https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
tickets/#closing-tickets ticket triaging process].
--
Ticket URL: <https://code.djangoproject.com/ticket/35709#comment:1>
Reply all
Reply to author
Forward
0 new messages