Repository navigation
Skip telemetry pings from the docker dev / CI stack - #1604
Merged
Merged
Conversation
The dev stack seeds its DB from data.sql, which ships telemetry.enabled = 1 and the live cf-analytics endpoint. Every web request in the dev container runs Telemetry::tickIfDue() at shutdown, so local `./sbpp.sh up`, the E2E workflow and the CI docs-screenshot capture each sent a ping from a throwaway install with a fresh instance_id, polluting the production dataset. dev-prepend.php (the dev container's auto_prepend_file) now defines SBPP_SKIP_TELEMETRY for web SAPIs, the same per-request opt-out /health.php already uses. The CLI is left alone so PHPUnit inside the container keeps exercising tickIfDue() in TelemetryOptOutTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019E8y1xAnzfbNHQhAkgFyMm
|
Thanks for the PR! This change touches To sign, comment exactly the following line on this PR:
You only need to sign once — your signature applies to every future See I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
docker/php/dev-prepend.php(the dev container'sauto_prepend_file) now definesSBPP_SKIP_TELEMETRYfor web SAPIs. This is the same per-request opt-out/health.phpalready uses:Telemetry::tickIfDue()returns before any DB write or network call.The CLI is deliberately left alone. PHPUnit inside the container (
./sbpp.sh test) also loads the prepend, andTelemetryOptOutTestcallstickIfDue()directly against a dead endpoint to pin the gate. The PHPUnit bootstrap never requiresinit.php, so the CLI never registers a shutdown tick anyway.Also:
web/tests/integration/DevPrependTelemetryTest.php: checks that the prepend defines the constant behind the non-CLI gate and thatdocker/Dockerfilestill wires the prepend in. It also loads the prepend in aphp -nsubprocess and asserts the constant stays undefined under the CLI.Telemetry.php,ARCHITECTURE.mdanddocker/README.md. The README line aboutdev-prepend.phpwas also out of date (it still described the pre-Post-#1332 install-wizard human-flow audit: panel-takeover paths via localhost host-check bypass + /install/ replayable on installed panels, plus 8 UX gaps #1335 HTTP_HOST shim).Motivation and Context
The dev stack seeds its DB from
data.sql, which shipstelemetry.enabled = 1and the live cf-analytics endpoint. Every web request in the dev container runs the shutdown tick. So each of these sent a real ping from a throwaway install with a freshinstance_id, which polluted the production dataset:e2e.yml)docs-screenshots-capture.yml)./sbpp.sh upPHPUnit in
test.ymlwas already safe: it never bootsinit.php, and the telemetry tests point at127.0.0.1:1or''. The prod image workflow only builds and pushes; it never runs the panel. On the cf-analytics side, the Worker tests run against local miniflare, so nothing there needs to change.How Has This Been Tested?
php -lon the changed PHP files.auto_prepend_fileline, and aphp -nsubprocess that requires the prepend reportsundefined. CI's PHPUnit job is the full check.Types of changes
Checklist:
Generated by Claude Code