Skip to content

feat(ext-tester): --trace of every RPC call and the querya-headless image - #1490

Merged
ZhuchkaTriplesix merged 15 commits into
devfrom
feat/headless-image
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 15 commits into
devfrom
feat/headless-image

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Part of #1487 (headless dev mode, level L1 and the extension-author side).

The goal: while developing an extension, docker pull a headless image and check, in CI, how the data goes through the driver and whether the RPC works.

What it adds

  1. querya-ext-tester --trace <path>: a JSON file with every RPC round trip: method, time, request and response size and a bounded view of the data (5 items per list, 120 characters per string; secret-looking keys such as password / token / passphrase are ***). A failing call is recorded with its error. Unit tests: bounded rows, redaction of nested keys, an error call.
  2. docker/headless/Dockerfile: the release's tester on Debian (glibc) with bubblewrap, non-root, entry point querya-ext-tester; the build downloads it from the GitHub Release and fails on a checksum mismatch against SHA256SUMS.txt.
  3. .github/workflows/headless-image.yml: after a successful Release (workflow_run, because events made by GITHUB_TOKEN do not start other workflows), or manually for a version, it builds the image, smoke-tests it (--help, an empty directory must exit 1) and pushes ghcr.io/queryahub/querya-headless:<version> and :latest.
  4. docs/extension-testing.md: Following the data, Docker image (with a CI recipe with a services: database) and --sandbox in a container.

Checked locally

  • Built the image for the published 0.4.19 release: 30 s, the checksum check passes, --help works, an empty directory exits 1.
  • Ran a small extension (a compiled Dart executable speaking the JSON-RPC lifecycle) inside the image: 10 checks pass.
  • Built the tester from this branch and ran the same extension with --trace: 9 calls recorded, rows cut to 5, password and ssh.passphrase redacted, no secret anywhere in the file.

Not checked

  • The workflow itself (it needs a Release run on main to fire; workflow_dispatch can run it for an existing version once the file is on the default branch).
  • --sandbox inside the container (user namespaces are usually blocked there; the docs say how to allow them).
  • Only linux-x64 exists as a tester asset, so the image is amd64 only.

Base

This branch contains the back-merge of main (#1489) so that it has the release hotfixes (scripts/ci/build_ext_tester.sh, the tester's exit code). The diff shrinks to this change when #1489 is merged.

ZhuchkaTriplesix and others added 15 commits September 28, 2026 00:19
- pubspec 0.4.19+2 (as on main after the 0.4.18 bump), AUR pkgver 0.4.19
- CHANGELOG: [Unreleased] becomes [0.4.19] - 2026-10-11 with what was merged
  since the last update; a new [Unreleased] keeps the planned items
- release checklist: 0.4.19 product smoke, versioning and docs steps
- roadmap: 0.4.18 shipped, 0.4.19 is this cut
- Flatpak metainfo: 0.4.19 release entry
chore(release): Querya Desktop 0.4.19
…t package

The 0.4.19 Release run failed in two places, both new since 0.4.18 (the
Flutter pin moved from 3.41.6 to 3.47.1 and the tester jobs were added):

- Build macOS: Flutter 3.47's Swift Package Manager integration cannot
  resolve the vendored refresh_rate plugin ('target refresh_rate is outside
  the package root': Package.swift points at ../Classes). The app opts out
  of SwiftPM, so macOS builds use CocoaPods as before.
- Build querya-ext-tester (4 platforms): 'dart compile' does not support
  build hooks, and the app's graph has sqlite3 and objective_c. The tester
  is pure Dart, so scripts/ci/build_ext_tester.sh compiles it from a
  throwaway package that holds lib/core/extensions and depends on path.
fix(release): macOS build without SwiftPM, ext tester from a pure-Dart package
…nored

querya-ext-tester declared Future<int> main and returned 0 / 1 / 2, but
Dart ignores the return value of main: every run exited 0, so CI could
not fail on a broken extension and the release smoke test (an empty
directory must exit 1) failed. The code is now assigned to exitCode.
fix(ext-tester): set the process exit code (main's return value is ignored)
…d its workflow

- querya-ext-tester --trace <path>: every JSON-RPC round trip with timing,
  request and response sizes and a bounded, redacted view of the data
- docker/headless/Dockerfile: the release's tester (SHA-256 checked) with
  bubblewrap on Debian, non-root, entry point querya-ext-tester
- .github/workflows/headless-image.yml: builds, smoke-tests and pushes
  ghcr.io/queryahub/querya-headless:<version> and :latest after a Release
- docs/extension-testing.md: --trace, the image, a CI recipe with a database
  service and --sandbox in a container

Refs #1487
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 9cf63a7 into dev Oct 11, 2026
13 checks passed
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.

2 participants