Support non-headless mode for autowebcompat-repro - #6689
Conversation
6b334ff to
e472205
Compare
f36b21f to
b9a8db0
Compare
8c5b6c0 to
2837a4a
Compare
2837a4a to
f9dd5d1
Compare
f9dd5d1 to
cdaf5c6
Compare
| && chown agent:agent /workspace /app/repro | ||
| && chown agent:agent /workspace /app/repro \ | ||
| && usermod -a -G sudo agent \ | ||
| && echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers |
There was a problem hiding this comment.
Wonder if there's a reason to give the agent passwordless root? fwiw I tried it without that, dropped the sudo package, the usermod/sudoers lines, and the two sudo prefixes in start_xvfb() and the display works fine (took a screenshot from inside the container to confirm).
There was a problem hiding this comment.
Apparently not! I thought this was needed, but now removed since it doesn't seem to be.
| ), | ||
| ] | ||
| ) | ||
| self.start(["sudo", "fluxbox", "-display", os.environ["DISPLAY"]]) |
There was a problem hiding this comment.
This won't be a problem on production, only for development, but I've noticed if the container is reused (docker compose up on a stopped-but-not-removed container rather than a fresh one), the second run fails to get a display:
autowebcompat-repro-agent-1 | (EE)
autowebcompat-repro-agent-1 | Fatal server error:
autowebcompat-repro-agent-1 | (EE) Server is already active for display 99
autowebcompat-repro-agent-1 | If this server is no longer running, remove /tmp/.X99-lock
autowebcompat-repro-agent-1 | and start again.
autowebcompat-repro-agent-1 | (EE)
autowebcompat-repro-agent-1 | Warning: Failed to open file(fluxbox.cat)
autowebcompat-repro-agent-1 | for translation, using default messages.
autowebcompat-repro-agent-1 | Error: Couldn't connect to XServer:99.0
There was a problem hiding this comment.
I've tried to make the shutdown cleaner, I think this will help.
cdaf5c6 to
5297eac
Compare
This uses fluxbox running in Xvfb as the WM/display, similar to the configuration we have for web-platform-tests
5297eac to
dd9a6ec
Compare
This uses fluxbox running in Xvfb as the WM/display, similar to the configuration we have for web-platform-tests