Skip to content

chore: counts of non hotswappable resources#1373

Open
ShadowCat567 wants to merge 5 commits intomainfrom
hotswap=telemetry
Open

chore: counts of non hotswappable resources#1373
ShadowCat567 wants to merge 5 commits intomainfrom
hotswap=telemetry

Conversation

@ShadowCat567
Copy link
Copy Markdown

@ShadowCat567 ShadowCat567 commented Apr 14, 2026

Adds counts for resource types that are not hotswappable that were attempted to be hotswapped.
We want to track this as a part of our initiative to improve the speed of hotswap deployments since having non hotswappable resources in a hotswap deployment with fallback slows down the hotswap deployment.
Payload would look like this:

{
  "event": {
    "state": "FAILED",
    "eventType": "HOTSWAP",
    "duration": 456,
    "error": {
      "name": "UnknownError"
    },
    "counters": {
      "hotswapped": 0,
      "hotswappableChanges": 1,
      "nonHotswappableChanges": 3,
      "hotswapFallback:AWS::Some::Resource:Id": 2,
      "hotswapFallback:AWS::Other::Resource:Name": 1,
    }
  }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Apr 14, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team April 14, 2026 19:46
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.31%. Comparing base (ec973c9) to head (34e7b01).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1373   +/-   ##
=======================================
  Coverage   88.31%   88.31%           
=======================================
  Files          74       74           
  Lines       10430    10443   +13     
  Branches     1427     1434    +7     
=======================================
+ Hits         9211     9223   +12     
- Misses       1191     1192    +1     
  Partials       28       28           
Flag Coverage Δ
suite.unit 88.31% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

      "AWS::Some::Resource": 2,
      "AWS::Other::Resource": 1,

This list of counters goes into a huge grab bag. So just a resource type by itself is not going to be meaningful. Let's name it something like

hotswapfallback:AWS::Other::Resource

But also don't do that literally! I'm pretty sure we already emit counters with resource identifiers in there somewhere. I forget where, but I'm sure you can find it. Probably something about error tracking. Don't invent a new format, just follow what the other location is doing.

And also: I'm pretty sure the top-level property that is causing the fallback should be in there as well.

@ShadowCat567
Copy link
Copy Markdown
Author

      "AWS::Some::Resource": 2,
      "AWS::Other::Resource": 1,

This list of counters goes into a huge grab bag. So just a resource type by itself is not going to be meaningful. Let's name it something like

hotswapfallback:AWS::Other::Resource

But also don't do that literally! I'm pretty sure we already emit counters with resource identifiers in there somewhere. I forget where, but I'm sure you can find it. Probably something about error tracking. Don't invent a new format, just follow what the other location is doing.

And also: I'm pretty sure the top-level property that is causing the fallback should be in there as well.

It is error tracking, that does errorAnn:[errorCode] - so we would want to also use a : delimiter for hotswap resources

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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