Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30802 closed Bug (fixed)

Manifest file is updated when running collectstatic with --dry-run

Reported by: ryphill Owned by: Paul Stieber
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords: ManifestStaticFilesStorage, ManifestFilesMixin
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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 ManifestFilesMixin.post_process due to not checking the passed in value of dry_run before calling save_manifest.

Change History (5)

comment:1 by Claude Paroz, 5 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Version: 1.11master

comment:2 by Paul Stieber, 5 years ago

Owner: changed from nobody to Paul Stieber
Status: newassigned

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In fa8fe09e:

Fixed #30802 -- Prevented manifest creation when running collectstatic in dry run mode.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 5d63bf0b:

[3.0.x] Fixed #30802 -- Prevented manifest creation when running collectstatic in dry run mode.

Backport of fa8fe09e4e2b538c5d50a559081861d5c0635d55 from master

Note: See TracTickets for help on using tickets.
Back to Top