Repository navigation
Disable diagnostic data reporting in the test installation - #738
Merged
GermanBluefox merged 1 commit intoSep 29, 2026
Merged
Conversation
The integration test controller keeps system.config.common.diag at 'extended' from setup, so whether @iobroker/plugin-sentry reports errors of a local test run depends on the plugin state the setup leaves behind. Set diag to 'none' after the controller setup, like @iobroker/dev-server and @iobroker/legacy-testing do; the plugin then stays off. CI runs are unchanged (the plugin already stops on CI). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
@iobroker/plugin-sentryswitches itself off only whenCI/TRAVIS/APPVEYORis set, when the instance or host hasdisableDataReporting, or whensystem.config.common.diagis'none'. The integration test controller keepsdiag: 'extended'fromsetup first, and@iobroker/testingchanges nothing about it. On a developer machine (noCI), whether the plugin of the adapter under test is active therefore depends on theplugins.sentry.enabledstate the controller setup happens to leave behind — and when it is active, errors of the test run (for exampleDB closedwhile the harness shuts the databases down) end up in the adapter's Sentry project.Measured on one machine across twelve local test installations: the adapter's
plugins.sentry.enabledwastruein 9 of the 11 that had the state (js-controller 8.0.0-alpha and one 7.2.2 install) andfalsein two (7.2.2) — it varies with the setup, not with the adapter.The rest of the ecosystem already turns diagnostics off for its throwaway installations:
@iobroker/dev-server(src/commands/Setup.ts,diag = 'none'),@iobroker/legacy-testing(engineHelper.ts), and the create-adapter dev container (iob plugin disable sentry+ diagnostics off). Thediag === 'none'rule in the plugin exists at least since 1.2.1 (checked 1.2.1, 2.0.4, 3.1.4, 3.2.1).What
ControllerSetup.disableDiagnosticReporting(dbConnection): setssystem.config.common.diag = 'none'; writes nothing when it is already'none'or when there is nosystem.configobject.prepareTestsright afterdisableAdminInstances(), i.e. before the DB backup — every test and every suite starts with it.CI). Only adapters that readdiagthemselves to decide on sending usage statistics behave differently, and in a test run that is the point.WORK IN PROGRESS) updated;build/rebuilt as in the other commits.Tests
src/tests/integration/lib/controllerSetup.test.ts: setsdiagto'none'and keeps the rest of the object, writes nothing when it is already'none', writes nothing withoutsystem.config.npm run check,npm run lint,npm run build,npm test(62 passing) — all green.dev,CIunset: with 6.2.2 the test controller haddiag: extendedandplugins.sentry.enabled=true; with this changediag: noneandplugins.sentry.enabled=false. The adapter log of both runs is identical apart from timestamps and PIDs — no new warning or error.🤖 Generated with Claude Code