Skip to content

Upgrade FMD Server to 0.17.1 and modernize packaging and tests - #3

Open
cyberb wants to merge 1 commit into
masterfrom
upgrade-0.17.1
Open

cyberb wants to merge 1 commit into
masterfrom
upgrade-0.17.1

Conversation

@cyberb

@cyberb cyberb commented Nov 29, 2026

Copy link
Copy Markdown
Member

Upstream 0.16.0 → 0.17.1

  • version pin bumped in .drone.jsonnet.
  • UserIdLength dropped from config/fmd-server.yml (removed upstream in 0.17.0, now only a warning); new LogLevel: "info" set.
  • 0.17 adds a v2 crypto protocol. v1 accounts (created by the released snap and by the e2e helper) are still accepted, and the upgrade chain covers that.

Modernizations (porting guide 2026)

  • Platform test image 26.08.01 → 26.10.02, which ships the store's snapd (snapd 671).
  • bin/wait-for-configure.sh: both service launchers wait for configure, as the guide's install/refresh ordering section requires.
  • nginx launcher resolves ld-linux*.so* per the guide; nginx/build.sh uses cp -a for the merged-usr tree.
  • Playwright: single desktop project (drops the e2e mobile step), list reporter only, no trace/video/html/global teardown, shoot() → artifact/screenshots/<name>.png, failure fixture, fail-fast env() helper, run.sh <spec> only, navigation by clicks with data-testid on our token page, Authelia passkey "Not now" handling, retried npm ci, wait-app.sh uses curl -skL.
  • pytest: test/snapd.py (settle, assert_no_restarts), and NRestarts == 0 is checked after install, reinstall and upgrade. The wrapper moves to ci/test.sh <spec> <distro> <arch>, and deps.sh now uses apt.sh plus retried pip.
  • snapd_hold is now a named jsonnet variable. Code comments are removed.

Already compliant: store-publisher single publish step (SYNCLOUD_TOKEN only, stable), no version CI step, package.sh writes ./version (checked locally: version = build number), bookworm+buster matrix on multi-arch images, no confinement/plugs, state in $SNAP_DATA, retried apt/downloads, GPL-3.0.

Local validation (docker)

  • nginx/build.sh + nginx/test.sh on bookworm and buster: pass
  • fmd/build.sh 0.17.1 + fmd/test.sh on bookworm and buster: pass. fmd-server 0.17.1 also starts on buster with our config and binds fmd.sock.
  • cli/build.sh (vet + tests) + cli/test.sh on both distros: pass
  • package.sh: pass, and ./version is written
  • e2e tsc + playwright --list; pytest collection: pass
  • Device tests (pytest/e2e against the platform service) were not run locally; CI runs them.

Remaining

  • The .or() fallbacks for the token page selectors can go once a release with data-testid is in the store.

Upstream 0.17.1: UserIdLength was removed in 0.17.0 and now only logs a
warning, so drop it; LogLevel is new, pin it to info. Accounts created with
the v1 crypto protocol keep working, which the upgrade chain exercises.

Platform test image 26.10.02 ships the store's snapd, so the daily snapd
upgrade job no longer restarts snapd mid-test.

Runtime: snapd starts services before configure on install and refresh, so
both launchers wait until $SNAP_DATA/version matches $SNAP/version. The nginx
launcher globbed the loader as ld-*.so, which only matched images with
ld-2.xx.so; resolve ld-linux*.so* and copy the merged-usr tree with cp -a.

Playwright: one desktop project, list reporter, no trace, video, html report
or global teardown; shoot() writes artifact/screenshots/<name>.png and a
failure fixture adds failed-<spec>-line-<n>.png; every variable goes through
an env() helper that fails fast; run.sh takes only the spec. Specs open the
app once and move by clicks, using data-testid on the token page we own with
.or() fallbacks while the released snap lacks them, and dismiss the Authelia
passkey nudge. npm ci is retried.

pytest: settle snapd and assert NRestarts == 0 after install, reinstall and
upgrade via test/snapd.py; the CI wrapper moves to ci/test.sh; deps.sh uses
apt.sh and retried pip. Name the snapd hold entrypoint in the jsonnet and
drop code comments.
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