Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2128 +/- ##
=======================================
Coverage 92.05% 92.06%
=======================================
Files 82 82
Lines 13195 13199 +4
Branches 1894 1897 +3
=======================================
+ Hits 12146 12151 +5
+ Misses 1011 1010 -1
Partials 38 38
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:
|
This branch is waiting to be 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.
Fixes #
TelemetrySession.emit()incrementsthis.count, then for DEPLOY events awaitstrackDeployStatistics()(a read and write of the telemetry state file), and only then buildseventIdfromthis.count. With--concurrency, other events are emitted during that await, so several DEPLOY events read the same final count and are sent with the sameeventId.We saw this in the telemetry data as repeated event IDs on CLI versions after the subprocess sender, mostly DEPLOY events in the same request with different contents.
This takes the event id and timestamp at the start of
emit(), before the await. The timestamp had the same problem, it recorded when the state file write finished.withTelemetryStateis also an unlocked read and write, so concurrent DEPLOY events can lose updates tosequentialDeploymentFailures. Not changed here.Added a unit test that emits two DEPLOY events at once and checks they get
:1and:2. On main both get:2. Ran thesession.test.tssuite and eslint foraws-cdk.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license