Repository navigation
feat(telemetry): report missing dependencies as a failure category on the command event - #1738
Draft
Lena Forlin (moshimorschi) wants to merge 1 commit into
Draft
Lena Forlin (moshimorschi) wants to merge 1 commit into
Lena Forlin (moshimorschi) wants to merge 1 commit into
Conversation
… the command event The dependency check knew what was missing, but the command event only recorded a failure. Each missing dependency now carries a stable identifier from the place where it is detected, the two reporting sites return a typed error with the list, and the tracker adds failure_category=missing_prerequisite and the sorted identifiers to the event. The typed error joins the root command's exemption list, so the explanation box is no longer followed by a second error line.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Lena Forlin (moshimorschi)
requested a review
from Tomasz Turkowski (tturkowski)
October 26, 2026 15:40
This branch has not been deployed
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.
What changed?
When a command stops because a dependency is missing, the command event now says so. Two tags are added to the existing
shopware_cli.commandevent on such failures; no event name changes, so the telemetry pipeline's allow-list stays as it is.failure_category, with the valuemissing_prerequisite. It is the same word the Dev TUI install event already uses for its own failure categories, and it is the first value of the category the telemetry review ranks highest; later values go into the same tag.missing, a sorted, comma-separated list of what the dependency check found missing, with stable identifiers:docker_not_installed,docker_not_running,compose_plugin_missing,php_not_installed,php_versionandother. The versions found or required are never sent.To make that possible, each missing dependency now carries its identifier from the place where the check detects it, and the check's two reporting sites return a typed error with the list instead of a plain error. Commands that run the check:
project create,project dev, and the proxy commands that need Docker.One visible change: the explanation box on stderr used to be followed by a second line,
ERROR missing required dependencies, because the root command logged the returned error again. Following the convention for errors that were already printed, the typed error is now on the root command's exemption list, so the box is the only output. The exit code stays 1.Tags of the command event after this change, captured from the built binary with a local UDP listener, for
project create --dockeron a machine without Docker on the path:{"command_name": "project.create", "result": "failure", "failure_category": "missing_prerequisite", "missing": "docker_not_installed", "cli_version": "dev"}A failure for any other reason carries neither tag.
docs/TELEMETRY.mddocuments both tags and the identifiers.Why?
The dependency check already knew what was missing, but telemetry only recorded
failure, so a machine without Docker looked like any other failed run. With the Compose plugin check from #1685, people without the plugin are stopped earlier, and without this change they would silently disappear from the data and the problem would look fixed. This keeps them visible, with the reason.How was this tested?
php_not_installed, an unknown dependency falls back toother, the list is sorted and de-duplicated, the typed error survives wrapping, the tracker's tags on a wrapped missing-dependency error versus a plain failure, and the exit code test covers the silent exit.project create --dockerwith Docker absent from its search path. It stopped at the dependency box with no further error line, created no folder, exited 1, and sent the event shown above. The "not running" and Compose plugin cases go through the same code path and are covered by the unit tests; they were not forced on this machine.Related issue or discussion
Part of the DX tools telemetry improvements. This branch is based on #1737, which introduced the tag map the tracker now extends; GitHub retargets this PR to
mainwhen that one is merged, and the branch will be rebased then so only this change remains in the diff.