Skip to content

Conversation

@youwalther65
Copy link
Contributor

@youwalther65 youwalther65 commented Oct 27, 2025

Alternate approach to solve #8482 based on ideas from @moko-poi in PR #8547

Fixes #8482

Description
Adds FleetID to Karpenter controller logs in case of InsufficientInstanceCapacity error in EC2 CreateFleet API call.

Moved logging out of pkg/cache/unavailableofferings.go func MarkUnavailable.

After offline discussion with @DerekFrank I moved logging back to pkg/cache/unavailableofferings.go func MarkUnavailable, but now keep log item order backward compatible using approach here.

How was this change tested?

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

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

@youwalther65 youwalther65 requested a review from a team as a code owner October 27, 2025 09:04
@youwalther65 youwalther65 requested a review from rschalo October 27, 2025 09:04
@netlify
Copy link

netlify bot commented Oct 27, 2025

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit 8908c3a
🔍 Latest deploy log https://app.netlify.com/projects/karpenter-docs-prod/deploys/69202484a1001900089f33f3
😎 Deploy Preview https://deploy-preview-8684--karpenter-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@youwalther65 youwalther65 changed the title Alternate approach to solve #8482 based on ideas from moko-poi in PR #8547 Alternate approach to solve #8482 based on ideas from @moko-poi in PR #8547 Oct 27, 2025
@moko-poi
Copy link
Contributor

Thanks @youwalther65 and @DerekFrank for following up on this!

I'm totally fine with continuing this work in #8684 — it keeps the intent of #8547 while making the log order deterministic and preserving backward compatibility.
The main goal from my side was always to surface the FleetID for CloudTrail correlation, without adding noise (like empty fleet-id fields) or changing the existing log structure.

Happy to close #8547 once this PR becomes the final implementation.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Preview deployment ready!

Preview URL: https://pr-8684.d18coufmbnnaag.amplifyapp.com

Built from commit 8908c3a99bcafd59be42637c7f602fe6456f4b0d

@coveralls
Copy link

coveralls commented Nov 6, 2025

Pull Request Test Coverage Report for Build 19564760545

Details

  • 23 of 27 (85.19%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 67.541%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/cache/unavailableofferings.go 10 12 83.33%
pkg/providers/instance/instance.go 9 11 81.82%
Totals Coverage Status
Change from base Build 19552925199: 0.001%
Covered Lines: 7824
Relevant Lines: 11584

💛 - Coveralls

Copy link
Contributor

@DerekFrank DerekFrank left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for picking this up

@DerekFrank DerekFrank enabled auto-merge (squash) November 12, 2025 17:40
@DerekFrank DerekFrank merged commit 12c9e63 into aws:main Nov 21, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log responseElement fleetId from CreateFleet API call to make debugging via AWS CloudTrail easier

4 participants