[Django] #30802: Manifest file is updated when running collectstatic with --dry-run

31 views
Skip to first unread message

Django

unread,
Sep 25, 2019, 2:13:24 PM9/25/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: nobody
Type: Bug | Status: new
Component: | Version: 1.11
contrib.staticfiles | Keywords:
Severity: Normal | ManifestStaticFilesStorage,
Triage Stage: | ManifestFilesMixin
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When running `collectstatic --dry-run` using `ManifestStaticFilesStorage`
as your static files storage the manifest file will always be updated.

This can be observed by running `python manage.py collectstatic` and then
`python manage.py collectstatic --dry-run` where you can see the
staticfiles.json file has been modified and the paths key in the json is
now empty.

It looks like the problem occurs in
[https://github.com/django/django/blob/1.11.24/django/contrib/staticfiles/storage.py#L416
ManifestFilesMixin.post_process] due to not checking the passed in value
of `dry_run` before calling `save_manifest`.

--
Ticket URL: <https://code.djangoproject.com/ticket/30802>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 26, 2019, 2:50:44 AM9/26/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: nobody
Type: Bug | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
ManifestStaticFilesStorage, |
ManifestFilesMixin |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* version: 1.11 => master
* easy: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30802#comment:1>

Django

unread,
Sep 26, 2019, 12:41:46 PM9/26/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: paul-
| eclipse
Type: Bug | Status: assigned

Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
ManifestStaticFilesStorage, |
ManifestFilesMixin |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by paul-eclipse):

* owner: nobody => paul-eclipse
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30802#comment:2>

Django

unread,
Sep 26, 2019, 5:31:18 PM9/26/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: Paul
| Stieber

Type: Bug | Status: assigned
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
ManifestStaticFilesStorage, |
ManifestFilesMixin |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Paul Stieber):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/11824

--
Ticket URL: <https://code.djangoproject.com/ticket/30802#comment:3>

Django

unread,
Sep 27, 2019, 5:07:43 PM9/27/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: Paul
| Stieber
Type: Bug | Status: closed
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
ManifestStaticFilesStorage, |
ManifestFilesMixin |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"fa8fe09e4e2b538c5d50a559081861d5c0635d55" fa8fe09e]:
{{{
#!CommitTicketReference repository=""
revision="fa8fe09e4e2b538c5d50a559081861d5c0635d55"
Fixed #30802 -- Prevented manifest creation when running collectstatic in
dry run mode.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30802#comment:4>

Django

unread,
Sep 27, 2019, 5:08:03 PM9/27/19
to django-...@googlegroups.com
#30802: Manifest file is updated when running collectstatic with --dry-run
-------------------------------------+-------------------------------------
Reporter: ryphill | Owner: Paul
| Stieber
Type: Bug | Status: closed
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
ManifestStaticFilesStorage, |
ManifestFilesMixin |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"5d63bf0bc338840cfbb10f3528cc5b5ca3170f9b" 5d63bf0b]:
{{{
#!CommitTicketReference repository=""
revision="5d63bf0bc338840cfbb10f3528cc5b5ca3170f9b"
[3.0.x] Fixed #30802 -- Prevented manifest creation when running


collectstatic in dry run mode.

Backport of fa8fe09e4e2b538c5d50a559081861d5c0635d55 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30802#comment:5>

Reply all
Reply to author
Forward
0 new messages