Skip to content

ci: resolve ipp-usb TCP port via DNS-SD instead of the state file - #135

Merged
tillkamppeter merged 2 commits into
OpenPrinting:masterfrom
rkt0209:dns-sd-port-discovery
Jul 26, 2026
Merged

ci: resolve ipp-usb TCP port via DNS-SD instead of the state file#135
tillkamppeter merged 2 commits into
OpenPrinting:masterfrom
rkt0209:dns-sd-port-discovery

Conversation

@rkt0209

@rkt0209 rkt0209 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What

Resolve ipp-usb's TCP proxy port over DNS-SD instead of scraping the private per-device state file, in both the snap and emulator integration tests.

Both snap-test.yml and emulator-test.yml previously read http-port from ipp-usb's private on-disk state file to reach its TCP listener. This follow-up (per review feedback on the CI PR) switches to the public interface:

  • avahi-browse -rptk _ipp._tcp → take the port from the advertised SRV record.
  • Keeps the localhost curl target so ipp-usb's per-client 302 redirect still resolves.
  • Retries a few seconds (publication can lag daemon start), and keeps the state-file/log scrape as a fallback so it cannot regress where browsing is unavailable.
  • Adds avahi-utils to the workflow deps.

Why

Scraping http-port couples the test to ipp-usb's private on-disk format. DNS-SD is the public discovery interface, and the assertion is strictly stronger: it now verifies that the port ipp-usb advertises is the port it actually serves.

Validation

Both integration tests pass; the run log confirms the DNS-SD path resolved the port (not the fallback):

Resolved port 60000 from DNS-SD (_ipp._tcp SRV record)
OK: client -> ipp-usb -> USB round-trip returned 200 OK.

rkt0209 added 2 commits July 26, 2026 12:08
Both the snap and emulator tests scraped http-port from ipp-usb's
private per-device state file to reach its TCP listener. Resolve it over
DNS-SD (avahi-browse -r on _ipp._tcp) instead: the port comes from the
advertised SRV record, so the test now asserts the port ipp-usb
publishes is the port it serves. Keep the state-file/log scrape as a
fallback so it cannot regress where browsing is unavailable; add
avahi-utils to the deps.
Make the DNS-SD resolution observable in the run so the assertion is
visibly exercised (the resolved port can coincide with the fallback
default, hiding which path won).
@tillkamppeter
tillkamppeter merged commit f167f6a into OpenPrinting:master Jul 26, 2026
17 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