Page MenuHomePhabricator

WDQS Container GUI constantly loads style.less
Closed, DeclinedPublic

Description

After starting the containers, if I attach to wikibasedocker_wdqs-frontend_1 container, I see log that shows that /style.less is constantly loaded:

72.18.0.1 - - [11/Apr/2018:04:50:22 +0000] "GET /style.less HTTP/1.1" 200 9443 "http://localhost:8282/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3282.94 Safari/537.36 OPR/44.0.2168.124" "-"
172.18.0.1 - - [11/Apr/2018:04:50:24 +0000] "GET /style.less HTTP/1.1" 200 9443 "http://localhost:8282/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3282.94 Safari/537.36 OPR/44.0.2168.124" "-"
172.18.0.1 - - [11/Apr/2018:04:50:25 +0000] "GET /style.less HTTP/1.1" 200 9443 "http://localhost:8282/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3282.94 Safari/537.36 OPR/44.0.2168.124" "-"
172.18.0.1 - - [11/Apr/2018:04:50:27 +0000] "GET /style.less HTTP/1.1" 200 9443 "http://localhost:8282/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3282.94 Safari/537.36 OPR/44.0.2168.124" "-"
172.18.0.1 - - [11/Apr/2018:04:50:28 +0000] "GET /style.less HTTP/1.1" 200 9443 "http://localhost:8282/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3282.94 Safari/537.36 OPR/44.0.2168.124" "-"

Looks like some kind of bug.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev renamed this task from Container GUI constantly loads style.less to WDQS Container GUI constantly loads style.less.Apr 11 2018, 4:53 AM

It’s not a bug, it’s a feature :) for local development, the style.less file is compiled in the browser and automatically reloaded when you edit the file locally, without having to reload the whole page.

But as far as I understand, the docker image is not intended for local development, so I suppose it should build the GUI and then serve the build directory?

Well, as afar as I understand, docker image is for both. But it would be hard to use built GUI there because build GUI has config.js inside minimized files and thus it is not customizeable. We then need to make it live outside (or load some other file that can be customized).

Maybe we should have a 'dev' tagged version of the container that remains as it is now. The new 'vanilla' container should then serve the built build directory.

Addshore triaged this task as Medium priority.Jun 26 2018, 3:57 PM

Maybe we should have a 'dev' tagged version of the container that remains as it is now. The new 'vanilla' container should then serve the built build directory.

As said above in T191953#4127694 that isn't really possible as the config is in the minified JS.
In order to have a nicedocker images some changes probably have to be made to the wdqsgui code itself.
For 3rd party users of the wdqsgui, if they want to use docker the best thing to do would be for them to build their own image with their own config included.