Repository navigation
Bot Screen ships on hosted images via -desktop tags (salvage #112381) - #120914
Merged
Merged
Conversation
The published image had no Xvnc/Xfce because nothing set the Dockerfile's HERMES_BOT_DESKTOP argument, and a hosted instance (unprivileged, no sudo, sealed /opt/hermes) cannot install at run time. The image layer is the only delivery path. - docker.yml: variant axis [slim, desktop]. :latest / :main / :v* stay the image they are today; :latest-desktop / :main-desktop / :v*-desktop carry the packages plus Playwright's headed Chromium. Slim owns the build cache scope; one manifest per variant so a desktop publish failure never skips slim's :latest. - Dockerfile / stage2-hook.sh: XDG_RUNTIME_DIR=/tmp/hermes-runtime seeded 0700 as hermes (containers have no logind; the $HOME/.cache fallback was the shared /opt/data volume), refused when foreign-owned; deterministic Chromium discovery exporting the headless shell for ordinary browsing. - bot_desktop: memory gate reads the cgroup working set (usage minus inactive_file) so it cannot tighten over uptime and refuse to restart a screen idle-stop just stopped; installable() gives three distinct dead-end messages instead of a sudo line nobody there can run; env_for_agent replaces a headless-shell pin so agent and dock share one Chromium. Squash of IAvecilla/hermes-agent:bot-desktop-cloud-image (#112381, 13 commits), which GitHub auto-closed when its base branch merged as #108914. Review fixes from pefontana (cache scope, per-variant merge, red browser test) are included. Co-authored-by: pefontana <pefontana@users.noreply.github.com>
10 of 19 tasks
૮ >ﻌ< ა ci reviewran on 54caf52 — test: allowlist installable()'s sudo probe for the command-r ℹ️ InfoCI-sensitive file review · View jobPR touches sensitive files, but the Sensitive files changed: debug infoCI timingsCI timings · View report · View jobWall time 5m26s vs 5m30s (-1.2%). 11 job(s) slower, 8 faster, 2 unchanged.
|
… ratchet installable() asks whether the gateway host can run the package manager at all (root, or sudo present) so a hosted instance gets 'needs a newer image' instead of a sudo line it cannot run. The probe is on the control host and never installs or starts anything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosted and immutable Hermes deployments get Bot Screen by pulling a
-desktopimage tag: the published image ships without Xvnc/Xfce and cannot install at run time (unprivilegedhermes, no sudo, sealed/opt/hermes), so the image layer is the only delivery path.Salvage of #112381 by @IAvecilla, which GitHub auto-closed when its base branch merged as #108914; none of it had reached main. Applied onto
origin/mainwith authorship preserved, @pefontana's review fixes included.Changes
docker.yml:variant: [slim, desktop]axis.:latest/:main/:v*are the image they are today;:latest-desktop/:main-desktop/:v*-desktopadd the packages and Playwright's headed Chromium. Slim owns the build-cache scope (desktop reads it, writes nothing; the cache is already at the 10 GB cap). One manifest per variant, so a desktop publish failure cannot skip slim's:latest; a short digest set fails the merge instead of publishing a single-arch tag.Dockerfile/docker/stage2-hook.sh:XDG_RUNTIME_DIR=/tmp/hermes-runtimeseeded 0700 ashermesat boot (containers have no logind; the$HOME/.cachefallback was the shared/opt/datavolume, so two instances would contend for one display lock). Refuses a foreign-owned or symlinked directory rather than chowning it. Deterministic Chromium discovery: the headless shell is exported for ordinary browsing, the headed build exists only on desktop images.tools/bot_desktop: memory gate reads the cgroup working set (memory.current − inactive_file) so it stops tightening over uptime and cannot refuse to restart the screen that idle-stop just stopped;installable()yields three distinct dead-end messages instead of asudoline nobody on a hosted instance can run;env_for_agent()replaces a headless-shell pin so agent and dock share one Chromium over one--user-data-dir(otherwise Chromium's singleton swallowed the dock's launch into the windowless process).-desktoptags, measured sizes, and the note that the Cloud provisioner does not select-desktopyet.Nothing starts at boot;
bot_desktop.auto_startstays off. A plaindocker build .stays lean.Validation (live, amd64, both images built from this branch)
Xvnc; onlychromium_headless_shell-1243; 4.06 GBchromium-1243+ shell; 5.45 GB (+1.39 GB)AGENT_BROWSER_EXECUTABLE_PATH→ headless shell;/tmp/hermes-runtimedrwx------ 10000:10000screen startashermes,--memory=4g:20up, RFB Unix socket published, unprivilegedchromium-1243/chrome-linux64/chromescreen start,--memory=1gscreen start--memory=2gmemory.current232→238 MB, gateavailable1881→1879 MB: no tighteningtest_bot_desktop_{runtime,resources,browser},tests/docker/, config defaults: 48 passedOutstanding on the portal side (per @pefontana): the release-target filter must not treat
vX-desktopas the fleet's newest tag, and the provisioner must opt in to-desktopfor the tier that offers a screen. Neither is in this repo.Closes #112381 (superseded, same content). Related: #92524.
Infographic