Skip to content

fix: not enough information to count sequential failures#1614

Merged
rix0rrr merged 6 commits into
mainfrom
huijbers/measure-sequential-failures
Jun 10, 2026
Merged

fix: not enough information to count sequential failures#1614
rix0rrr merged 6 commits into
mainfrom
huijbers/measure-sequential-failures

Conversation

@rix0rrr

@rix0rrr rix0rrr commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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

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.
@rix0rrr rix0rrr requested a review from a team June 8, 2026 11:58
@github-actions github-actions Bot added the p2 label Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@kaizencc kaizencc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved modulo minor thoughts

Comment on lines +39 to +40
// eslint-disable-next-line no-console
console.log(e);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a leftover debug?

/**
* Telemetry state across CLI invocations
*/
export interface TelemetryState {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a test that confirms malformed telemetry state is not passed on?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you under the impression that the whole of TelemetryState gets passed on to the server side automatically?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not today. i am concerned in the future someone adds to TelemetryState a string property that is directly passed on to the server

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.25%. Comparing base (c03ef3e) to head (af01a37).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/telemetry/session.ts 88.00% 3 Missing ⚠️
...kages/aws-cdk/lib/cli/telemetry/telemetry-state.ts 94.33% 3 Missing ⚠️
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              
Flag Coverage Δ
suite.unit 88.25% <93.75%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants