Skip to content

repro: re-run no-email login spec after upgrade#1

Open
cyberb wants to merge 10 commits into
masterfrom
upgrade-repro
Open

repro: re-run no-email login spec after upgrade#1
cyberb wants to merge 10 commits into
masterfrom
upgrade-repro

Conversation

@cyberb
Copy link
Copy Markdown
Member

@cyberb cyberb commented May 17, 2026

Summary

  • Add a test-ui-after-upgrade Drone step that re-runs no-email-login.spec.ts against the device left behind by test-upgrade (snap-refreshed from latest/stable 0.8.9 to the local build). Existing test-ui-desktop only exercises the fresh-install login path, which passes — but Dan's forum thread (https://syncloud.discourse.group/t/616/6) reports non-admin users still hit the "no permission" banner after the 0.8.9 → 0.9.2 upgrade. This step is the minimum CI signal for that scenario.
  • Disable snap auto-refresh in the device service via the same entrypoint trick nextcloud and photoprism already use (drop in /etc/systemd/system/snapd.service.d/disable-refresh.conf setting refresh.hold=2099-01-01T00:00:00Z before /sbin/init). Two prior builds on this branch flaked on test_activate_device with snap "platform" has "auto-refresh" change in progress — 21×10s retries weren't enough.
  • Collapse platforms = { bookworm, buster } dict into a single platform = '26.04.9' string; buster image now uses the same tag.
  • Move inlined cli go-build commands into cli/build.sh.

Test plan

  • Build 152 (or later) reaches test-ui-after-upgrade (amd64 step 18) without flaking on activation.
  • If the step fails: Playwright auto-captures the "no permission" screenshot under web/test-results/... and ci/ui.sh ships it to ci.syncloud.org:8081/files/openwebui/<build>-amd64/bookworm/desktop-after-upgrade/ — confirming CI reproduces Dan's banner.
  • If the step passes: the upgrade boundary alone doesn't repro; need to add a pre-upgrade login step to populate openwebui's DB on 0.8.9 first. Track as a follow-up.

cyberb added 10 commits May 17, 2026 11:58
Add test-ui-after-upgrade step running no-email-login.spec.ts against
the device left by test-upgrade (snap-refreshed from 0.8.9 to local
build). Forum t/616 says non-admin users still hit "no permission"
after the 0.9.2 upgrade — confirming whether the upgrade boundary
itself (not fresh install) is what differentiates Dan's device from CI.

ci/ui.sh now takes an optional artifact-dir tag and spec filter so this
step's results don't overwrite test-ui-desktop's.
Build 149 and 150 both flaked on test_activate_device with 'snap platform
has auto-refresh change in progress' — 21 retries × 10s isn't enough when
the platform snap is mid-refresh. `snap watch --last=auto-refresh` blocks
until the latest auto-refresh change finishes, then activation can
proceed.
…on; extract cli build.sh

- Device service entrypoint now drops a systemd drop-in that holds
  snap refresh until 2099 before snapd starts auto-refreshing, mirroring
  the pattern already used in nextcloud/photoprism. Removes the
  test_activate_device flake under "snap platform has auto-refresh change
  in progress" without needing snap watch --last=auto-refresh.
- Collapse platforms = { bookworm, buster } dict into a single
  platform = '26.04.9' string; buster image now uses the same tag.
- Move inline cli go-build commands into cli/build.sh.
…ster), lift dind to global

Build 152 errored on 'ollama test buster' with manifest unknown:
syncloud/platform-buster-amd64:26.04.9 doesn't exist — bookworm and
buster are released independently and 26.04.9 only shipped for
bookworm. 26.04.10 is the latest tag published for both arches and
both distros, so the unified version works.

Also lifts dind from a per-build parameter to a global, matching the
style of the other version locals.
…orm_image helper

Mirror photoprism's pattern:
- platform_image(distro, arch) returns the syncloud/platform-* image tag.
- ollama test / ollama test buster -> 'ollama test ' + distro in a for-comprehension.
- openwebui test / openwebui test buster -> same.
- Device service uses platform_image() too.

Also tidies the inherited stray indentation in the steps array.
…efresh; drop PR trigger

Build 154 ran no-email-login.spec.ts after snap-remove + install-old + local-install-new
and passed cleanly. Dan reports the failure on a real upgrade, so the missing
ingredient is openwebui DB state that pre-dates the refresh.

- Split upgrade.py test_upgrade into test_install_old (snap remove + install
  store) and test_refresh_to_new (local_install + wait).
- New test-ui-on-old step runs login.spec.ts against 0.8.9 so the admin account
  is provisioned in openwebui's DB before the refresh.
- test-ui-after-upgrade still runs no-email-login.spec.ts post-refresh; with
  the admin row already in the DB the OAUTH path now has prior state to
  reconcile, which more closely mirrors Dan's device.
- Drop pull_request trigger event so PR sync no longer queues duplicate builds.
snap install openwebui pulls latest/stable which is rev 147 = 0.9.2 (our
build) — making test-upgrade-install-old → test-upgrade-refresh-new a
0.9.2 → 0.9.2 no-op, not a real upgrade. That's why test-ui-after-upgrade
in build 154 passed cleanly while Dan's actual 0.8.9 → 0.9.2 path still
breaks.

Download the rev 121 .snap directly from the store mirror and snap install
--dangerous it. Also bypasses the slow store-channel download path
(build 154 spent ~2hr on it).
Build 159 step 17 hit a 404 from apps.syncloud.org (S3 round-robin
transient — the URL returns 200 from outside, just unlucky timing
inside the device). syncloudlib's retries=5 fires retries with no
delay so they all hit the same transient state.

curl --retry 10 --retry-delay 10 --retry-all-errors covers transient
4xx and 5xx with a real backoff. Also switch http -> https for a more
modern S3 endpoint.
Build 160's curl ended up requesting openwebui_121_.snap — \${ARCH} from
\$(dpkg --print-architecture) expanded to empty (either eaten by the
double-quoted ssh wrapping or dpkg missing from the path in use).
test-upgrade-install-old only runs on amd64 (test_ui=false on arm64),
so just hardcode amd64 — no need for runtime detection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant