Opened 9 years ago

Closed 4 weeks ago

#26583 closed Cleanup/optimization (fixed)

Increase the vebosity at which collectstatic warns for conflicting destination paths

Reported by: Justin McCammon Owned by: blighj
Component: contrib.staticfiles Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Due to the changes introduced in #24890 in 1.9, if you use an app like Grappelli which overwrites portions of the admin you get numerous warnings every time you run collectstatic. There should be an option to silence these warnings since there are times where you would knowingly want to overwrite files and don't wish to see the warnings.

Example of warnings:

Found another file with the destination path 'admin/js/jquery.init.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/calendar.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/prepopulate.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/inlines.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/actions.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/actions.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/core.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/collapse.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/inlines.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/prepopulate.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/collapse.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/timeparse.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/urlify.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/SelectFilter2.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/SelectBox.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/admin/RelatedObjectLookups.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/admin/DateTimeShortcuts.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/vendor/xregexp/xregexp.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/vendor/xregexp/LICENSE-XREGEXP.txt'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/vendor/jquery/jquery.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/vendor/jquery/jquery.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.

Change History (11)

comment:1 by Tim Graham, 9 years ago

Description: modified (diff)
Summary: Silence Static File Warnings added in #24890Add an option to silence collectstatic clashing files warnings
Triage Stage: UnreviewedAccepted

Switching management commands to use logging (#21429) might be one way to solve this.

comment:2 by Claude Paroz, 9 years ago

You can silence those with verbosity=0, can't you?

comment:3 by Chris Frisina, 7 years ago

Version: 1.92.1

Yes, but doing so with ./manage.py collectstatic -v 0

also would not provide the final print of the status of the collectstatic, such as

0 static files copied to '/Users/dejanew/Dropbox/dev/MST/server/static', 833 unmodified.

There is a potential to change the level of the display to 2, but that would also be likely hidden for the majority of the users.

comment:4 by Ryan Hunter, 5 years ago

Owner: changed from nobody to Ryan Hunter
Status: newassigned

comment:5 by Ryan Hunter, 5 years ago

Has patch: set

comment:6 by Mariusz Felisiak, 5 years ago

Patch needs improvement: set

comment:7 by Mariusz Felisiak, 4 years ago

Owner: Ryan Hunter removed
Status: assignednew

comment:8 by blighj, 2 months ago

Owner: set to blighj
Patch needs improvement: unset
Status: newassigned

I don't know if after 9 years we want to change the behaviour still but if we do, I've done up a patch that moves the messages to a higher verbosity and includes a summary of conflicts as per Simon's suggestion.
If we don't want to change the behaviour we should probably mark this as wontfix

comment:9 by Clifford Gama, 5 weeks ago

Summary: Add an option to silence collectstatic clashing files warningsIncrease vebosity at collectstatic warns for conflicting destination paths
Triage Stage: AcceptedReady for checkin

comment:10 by Clifford Gama, 5 weeks ago

Summary: Increase vebosity at collectstatic warns for conflicting destination pathsIncrease the vebosity at which collectstatic warns for conflicting destination paths

comment:11 by Sarah Boyce <42296566+sarahboyce@…>, 4 weeks ago

Resolution: fixed
Status: assignedclosed

In 6142e3f:

Fixed #26583 -- Silenced individual clashing name warnings in collectstatic's default verbosity.

Made collectstatic report individual destination conflicts only at verbosity 2+.
Made verbosity level 1 report a summary count of skipped files.

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