Skip to content

Skip telemetry pings from the docker dev / CI stack - #1604

Merged
rumblefrog merged 1 commit into
mainfrom
claude/loving-thompson-5lalpn
Oct 25, 2026
Merged

rumblefrog merged 1 commit into
mainfrom
claude/loving-thompson-5lalpn

Conversation

@rumblefrog

Copy link
Copy Markdown
Member

Description

docker/php/dev-prepend.php (the dev container's auto_prepend_file) now defines SBPP_SKIP_TELEMETRY for web SAPIs. This is the same per-request opt-out /health.php already 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, and TelemetryOptOutTest calls tickIfDue() directly against a dead endpoint to pin the gate. The PHPUnit bootstrap never requires init.php, so the CLI never registers a shutdown tick anyway.

Also:

Motivation and Context

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 the shutdown tick. So each of these sent a real ping from a throwaway install with a fresh instance_id, which polluted the production dataset:

  • the E2E workflow (e2e.yml)
  • the docs screenshot capture (docs-screenshots-capture.yml)
  • every local ./sbpp.sh up

PHPUnit in test.yml was already safe: it never boots init.php, and the telemetry tests point at 127.0.0.1:1 or ''. 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 -l on the changed PHP files.
  • I couldn't run PHPUnit in this sandbox because composer can't fetch GitHub dists here. Instead I ran the new test's three assertions by hand with plain PHP: the regex matches the prepend source, the Dockerfile still has the auto_prepend_file line, and a php -n subprocess that requires the prepend reports undefined. CI's PHPUnit job is the full check.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Generated by Claude Code

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
@rumblefrog
rumblefrog requested a review from a team October 25, 2026 16:33
@github-actions

Copy link
Copy Markdown

Thanks for the PR! This change touches web/** (the SourceBans++ web panel),
which is covered by the project's Contributor License Agreement.

To sign, comment exactly the following line on this PR:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once — your signature applies to every future
web-panel PR you open against this repo. Plugin-only PRs
(game/addons/sourcemod/**) don't need a signature.

See CONTRIBUTING.md
for the rationale.


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.

@rumblefrog
rumblefrog merged commit 4d09e4d into main Oct 25, 2026
4 of 5 checks passed
@rumblefrog
rumblefrog deleted the claude/loving-thompson-5lalpn branch October 25, 2026 16:35
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants