Commit 3ca3bb2
authored
[analytics] propagate env to sub-tools (#8976)
Follow-up from #8966 which introduced support for propagating the
standard JetBrains telemetry environment variables (`DASH__*` and
`FLUTTER_HOST`) via the `Analytics.updateEnvironment(commandLine)`
utility, this updates four additional spots where standalone processes
are spawned manually using the `GeneralCommandLine` class, ensuring
environment variables are propagated correctly in those contexts as
well.
Fixes: #8975
---
### Changes
#### 1. Device Daemon Spawning
(`src/io/flutter/run/daemon/DeviceDaemon.java`)
* **Modification**: Invoked `Analytics.updateEnvironment(result)` inside
the `toCommandLine()` helper before returning the `GeneralCommandLine`
instance. This ensures the background `flutter daemon` process runs with
propagated telemetry parameters.
#### 2. Bazel Test Execution
(`src/io/flutter/run/bazelTest/BazelTestFields.java`)
* **Modification**: Invoked `Analytics.updateEnvironment(commandLine)`
in the `getLaunchCommand(...)` method before returning the constructed
command line, allowing the Bazel test runner process to receive the
telemetry variables.
#### 3. Bazel Flutter Doctor Execution
(`src/io/flutter/actions/FlutterDoctorAction.java`)
* **Modification**: Invoked `Analytics.updateEnvironment(cmdLine)` in
`runWorkspaceFlutterDoctorScript(...)` before spawning the
workspace-specific doctor script.
#### 4. Bazel File Synchronization
(`src/io/flutter/run/FlutterReloadManager.java`)
* **Modification**: Invoked `Analytics.updateEnvironment(commandLine)`
in the `syncFiles()` helper to propagate the environment variables to
the Bazel file synchronization script during reload events.
---
Review the contribution guidelines below:
- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [x] I've included the required information in the description above.
- [x] My up-to-date information is in the `AUTHORS` file.
- [x] I've updated `CHANGELOG.md` if appropriate.
<details>
<summary>Contribution guidelines:</summary><br>
- See
our [contributor guide](../CONTRIBUTING.md) and
the [Flutter organization contributor
guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use
`dart format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best
practices
([discussion](#8098)).
</details>1 parent 34960e8 commit 3ca3bb2
4 files changed
Lines changed: 10 additions & 0 deletions
File tree
- src/io/flutter
- actions
- run
- bazelTest
- daemon
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| 319 | + | |
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| |||
0 commit comments