Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select2 dependency in DAL v3.9.5 breaks collectstatic with Whitenoise in production #1224

Open
mikkonie opened this issue May 11, 2023 · 2 comments
Assignees
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc. ongoing Ongoing issue, needs observation or pending on other projects

Comments

@mikkonie
Copy link
Collaborator

mikkonie commented May 11, 2023

django-autocomplete-light v3.9.5 came out yesterday. It causes collecstatic to fail in production with Whitenoise, at least when using CompressedManifestStaticFilesStorage. I believe this is caused by an update to the select2 dependency within DAL.

This may be midigated by switching to a different storage backend in Whitenoise. Alas, missing files are bad and I don't want to do workarounds just for this broken update.

For now, I'm pinning DAL to v3.9.4. I'll observe how further updates behave.

Full error dump in comments. See also bihealth/sodar-server#1666.

@mikkonie mikkonie added bug Something isn't working environment Issues of dependencies, CI, deployment etc. labels May 11, 2023
@mikkonie mikkonie added this to the v0.13.0 milestone May 11, 2023
@mikkonie mikkonie self-assigned this May 11, 2023
@mikkonie mikkonie changed the title Collectstatic failure with select2 CSS file Whitenoise collectstatic failure in production with select2 CSS file May 11, 2023
@mikkonie mikkonie changed the title Whitenoise collectstatic failure in production with select2 CSS file Select2 dependency in DAL 3.9.5. breaks collectstatic with Whitenoise in production May 11, 2023
@mikkonie mikkonie changed the title Select2 dependency in DAL 3.9.5. breaks collectstatic with Whitenoise in production Select2 dependency in DAL v3.9.5 breaks collectstatic with Whitenoise in production May 11, 2023
@mikkonie
Copy link
Collaborator Author

Error dump from SODAR:

Post-processing 'vendor/select2/docs/plugins/highlight/css/brown-paper.css' failed!

Traceback (most recent call last):
  File "manage.py", line 28, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
    collected = self.collect()
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 134, in collect
    raise processed
whitenoise.storage.MissingFileError: The file 'vendor/select2/docs/plugins/highlight/css/brown-papersq.png' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7ff0f836cfa0>.

The CSS file 'vendor/select2/docs/plugins/highlight/css/brown-paper.css' references a file which could not be found:
  vendor/select2/docs/plugins/highlight/css/brown-papersq.png

Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.

@mikkonie mikkonie removed this from the v0.13.0 milestone May 11, 2023
@mikkonie mikkonie added the ongoing Ongoing issue, needs observation or pending on other projects label May 11, 2023
@mikkonie
Copy link
Collaborator Author

mikkonie commented Mar 4, 2024

I've now upgraded the dependency to 3.11.0. In local development all seems fine, but I'll have to see how this behaves with Whitenoise and debug accordingly. If all else fails, I'll revert back to an older version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc. ongoing Ongoing issue, needs observation or pending on other projects
Projects
None yet
Development

No branches or pull requests

1 participant