Skip to content

Fix get iamserviceaccount returning error for unrelated CloudFormation Stack#8350

Merged
cheeseandcereal merged 15 commits intoeksctl-io:mainfrom
naclonts:bug-serviceaccounts-list-error
Apr 17, 2025
Merged

Fix get iamserviceaccount returning error for unrelated CloudFormation Stack#8350
cheeseandcereal merged 15 commits intoeksctl-io:mainfrom
naclonts:bug-serviceaccounts-list-error

Conversation

@naclonts
Copy link
Copy Markdown
Member

@naclonts naclonts commented Apr 16, 2025

Description

Fixes an issue where, if one IAM service account had errors creating, eksctl get iamserviceaccount would fail even when filtering for different service accounts. See issue report for more details: #8314

Closes #8314

The problem was that the manager package's GetIAMServiceAccounts queried all CloudFormation stacks and returned an error for any service account that it finds, before filtering the service account based on the user's CLI filters.

This PR moves the filtering prior to the error returning, meaning errors will only be returned if the error was in a stack that the user is including in their filter.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉 -- A little bit: the iam.go file didn't have any tests previously
  • Refactored something and made the world a better place 🌟

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Can't get iamserviceaccount because of an issue with an unrelated cloud formation stack

2 participants