Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip deletion if rolename is not present #197

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

carlyjiang
Copy link
Contributor

@carlyjiang carlyjiang commented Mar 29, 2024

close #

Could you share the solution in high level?

  • Sometime status role has been removed, but it kept on retrying deletion.
2024-03-29T17:44:30.526Z
INFO
Iamrole
delete request
2024-03-29T17:44:30.526Z
2024-03-29T17:44: 30.526Z
DEBUG
Initiating api call
{" roleName":
ERROR
Unable to list attached managed policies for role
{roleName":“",“error":“InvalidParameter: 1 val idation error(s) found.in- minimum field size of 1, ListAttachedRolePol iciesInput.RoleName.Mn"}
sigs.k8s.io/controller-runtime/pkg/internal/controllen.(*Contnollen) reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@0.9.7/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller)-processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214
2024-03-29T17:44:30.526Z
ERROR
Unable to delete the role
{"ennon":
"Inval idParameter: 1 val idation error(s) found. Sn- minimum field size of 1, ListAttachedRolePol iciesInput.RoleName.Mn"}
  • Skip call aws deletion if rolename is not present as it has been deleted already.

Could you share the test results?

  • deployed to hdev, role deletion works good.
Screenshot 2024-03-29 at 11 46 56 AM

Signed-off-by: Yu Jiang <yu_jiang@intuit.com>
@carlyjiang carlyjiang requested a review from a team as a code owner March 29, 2024 18:32
@carlyjiang carlyjiang self-assigned this Mar 29, 2024
Copy link

@sbadla1 sbadla1 left a comment

Choose a reason for hiding this comment

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

LGTM

@carlyjiang carlyjiang merged commit 0c3ca58 into master Mar 29, 2024
2 checks passed
@carlyjiang carlyjiang deleted the fix-role-name branch March 29, 2024 18:59
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.

2 participants