-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
collectstatic with compiling and remote storage is broken #473
Comments
Even if a compiled css is found in storage when compressing, it might be outdated! In case it was changed and compilation happened just before compressing, a newly compiled version is not yet uploaded to storage! |
@skirsdeda I reported #486 but after analyzing it more realize it's the same issue you were having. Did #475 fix your problem? I see it's failing the test. I would also love to have our expert @cyberdelia speak into this. Surely we are configuring something wrong here -- we can't be the first people who've ever used pipeline+s3+less?! |
And is this related to the fact that our compiled CSS is showing up in same directory as our source tree? That may be an indication that we've configured something wrong which is causing this problem. This was discussed in 202 but it was unclear what the resolution was. |
@jplehmann Well yes, #475 fixed this problem and I'm using it in production. The only problem is compiled CSS showing up in same directory. |
@jplehmann While #475 might not be the best solution, it works because compressors look for local files instead of in remote storage. And compilers (like lessjs) output files to local directories, that's why compressors cannot find compiled js or css in remote storage. But in case no compressors were used, compiled files wouldn't appear in remote storage (at least not until collectstatic is run for a consecutive time and compiled files are found in local directories). So the best solution would be to fix compiler code to output compiled files straight to remote storage while compressors should remain unchanged (look for compiled files in remote storage as they do now). I'll fix the code in #475 (hopefully next week). |
Thanks @skirsdeda! The fix works for me too. Hopefully we can get it passing the test and merged, or get input from @cyberdelia on how this was supposed to work. |
+1 Fix worked for me as well. |
+1 fix worked perfectly |
having this problem as well, atm deployment of our app is stuck here. Stack trace:
|
I wish I had discovered this thread before I have the patch. Regardless, here is my PR: #502. I came to the same conclusion as @skirsdeda regarding the problem. But, I was trying to solve the problem by copying the file to s3. If you would like the intermediate file or if you are not compressing the css, my patch might be helpful. |
I wonder why our leader @cyberdelia would not share wisdom on this issue and the PR contribution after 2 months? Surely he must be delayed be real-life. |
@jplehmann, he is probably not actively working in a related area in the last few weeks. He might want to look at the code before making comments and it is very easy to be carry away by day-to-day busi-ness. |
Also tried many other previous versions (that did not work). 1.4.0-1.5.4, didn't get pipeline to work on any of the versions with S3. |
There is a related problem which is that pipeline tries to write CSS files to the local file system along side the original LESS file, rather than in the
This is using the documented I've verified that when django-pipeline runs without S3 configured, it does not try to write any files outside of Here are my settings:
|
Is there any updates on this? I'm using django-pipeline 1.6.9 with
It copies all the files to S3, but when it gets to compiling and compressing them this error occurs. |
Just noting that three years later, and I'm updating from |
@jplehmann most people have moved on to javascript bundlers like webpack or whatever, this has little use now. |
This tool is great, I would like this to be resolved already because it has been roughly four years. |
6 years and counting. |
@skirsdeda was entirely correct, though I didn't like to hear it at the time. We have finally migrated to webpack fully as of today, and for the first time in forever, local runs as fast as production. I moved my thumb down over to a thumb up. |
So the issue still exists? Is this project dead? |
Which branch do you use? |
I'm using django-pipeline with S3 as storage. Less compiler is used for css.
When running collectstatic this happens:
For every less file:
Maybe static files finders could be used in compressing stage instead of trying to open compiled file path on storage.
The text was updated successfully, but these errors were encountered: