fix: not enough information to count sequential failures#1614
Conversation
We would like to know how many sequential failures a user encounters. Count them up in a state file and send that information along when we send deployment statistics.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kaizencc
left a comment
There was a problem hiding this comment.
approved modulo minor thoughts
| // eslint-disable-next-line no-console | ||
| console.log(e); |
| /** | ||
| * Telemetry state across CLI invocations | ||
| */ | ||
| export interface TelemetryState { |
There was a problem hiding this comment.
can we enforce that TelemetryState only ever includes properties of type boolean or number (or enum i guess). my worry is that a user can modify their telemetry file however they want and TelemetryState is the only gate we have to enforce that the data is what we expect. If we in the future add previousInstallationIds: string[] (we definitely shouldn't do this but I digress) then we open the doors to collecting customer content in these strings
There was a problem hiding this comment.
can we add a test that confirms malformed telemetry state is not passed on?
There was a problem hiding this comment.
Are you under the impression that the whole of TelemetryState gets passed on to the server side automatically?
There was a problem hiding this comment.
not today. i am concerned in the future someone adds to TelemetryState a string property that is directly passed on to the server
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1614 +/- ##
==========================================
+ Coverage 88.21% 88.25% +0.03%
==========================================
Files 76 77 +1
Lines 11064 11149 +85
Branches 1528 1536 +8
==========================================
+ Hits 9760 9839 +79
- Misses 1275 1281 +6
Partials 29 29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
We would like to know how many sequential failures a user encounters. Count them up in a state file and send that information along when we send deployment statistics.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license