Skip to content

server-e2e: upgrade fixture at build time, smoke-test before push - #5

Merged
alkk merged 4 commits into
masterfrom
compose-netxms-test-server
Oct 20, 2026
Merged

alkk merged 4 commits into
masterfrom
compose-netxms-test-server

Conversation

@alkk

@alkk alkk commented Oct 20, 2026

Copy link
Copy Markdown
Member

Every server-e2e image after 6.0.3 fails to start. files/db.sqlite3 stayed at schema 60.34 while releases moved on (6.0.4 = 60.36 … 7.0.0 = 70.53), and build-images.yml never runs the image, so broken images were published green. server-e2e:7.0.0 exits in ~4s with "Your database has format version 60.34, but server is compiled for version 70.53".

Changes:

  1. Public fixture key (cc06941). Both old tokens (plaintext lost) are replaced with one token whose key is documented in README. It's for tests only and expires 2038-01-01. All non-token content is unchanged, and the fixture stays at 60.34 so older versions can still be built.
  2. Build-time upgrade (161ac4d). The Dockerfile runs nxdbmgr -c /etc/netxmsd.conf upgrade and background-upgrade on the copied fixture. Each is run a second time to check the result, because nxdbmgr upgrade exits 0 on failure (nxdbmgr: upgrade exits 0 on failure netxms#3794). Adds curl for in-container WebAPI probes.
  3. Smoke test and targeted publish (3940d15):
    • server-e2e is built and loaded locally, then smoke-tested: authenticated GET /v1/server-info, 120s deadline, fails on container exit. Only that tested image is pushed. PRs run the smoke test without pushing. Other components are unchanged.
    • workflow_dispatch now takes component + tag. It builds only that component and pushes only that tag (no latest, no X.Y). The tag must start with $NETXMS_VERSION- and have a non-empty suffix, so release tags can't be overwritten. create-release is skipped on dispatch.

After merge: gh workflow run build-images.yml -R netxms/docker --ref master -f component=server-e2e -f tag=7.0.0-e2e.1 publishes a working 7.0.0 e2e image for netxms/grafana-datasource#21. Starting with the next release, the regular release build produces working e2e images.

alkk added 4 commits October 21, 2026 01:30
netxmsd.conf in deployment-example has DBPassword=netxms, so init failed
authenticating with test_password.
@alkk
alkk merged commit 15dfa28 into master Oct 20, 2026
6 checks passed
@alkk
alkk deleted the compose-netxms-test-server branch October 20, 2026 23:21
alkk added a commit to netxms/grafana-datasource that referenced this pull request Oct 20, 2026
docker compose up now runs ghcr.io/netxms/server-e2e:7.0.0-e2e.1 next to
Grafana and provisions the data source against it, so the development
environment and a plugin catalog review work with no env vars and no
secrets. Defaults for the server address and the public fixture API key
live in the committed .env, which Compose reads for interpolation and
playwright.config.ts loads through process.loadEnvFile, so the e2e tests
see the same values. Shell variables override both. The Grafana version
default (12.4.0) is set in docker-compose.yaml rather than .env, because
@grafana/plugin-e2e prefers GRAFANA_VERSION over the running Grafana's
version.

CI uses the same compose stack: the services: block, the host-network
override in docker-compose.ci.yaml and the E2E_TEST_API_KEY secret are
gone. Without a secret, Dependabot PRs run e2e too; publish-report is
skipped for them because their token is read-only. Logs from both
containers are printed on any failure, including a NetXMS that never
becomes healthy, and cleanup always runs.

The fixture work it depends on (upgrading the seeded database to the
installed server's schema at image build time, the public token and a
pre-push smoke test) landed in netxms/docker#5 and was published as
server-e2e:7.0.0-e2e.1.

Closes #21
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