Skip to content

fix: adding a new IAMRoleSelected condition should check for existing IAMRoleSelected condition types - #266

Open
ramasai1 wants to merge 1 commit into
aws-controllers-k8s:mainfrom
ramasai1:fix-roleselector-condition
Open

fix: adding a new IAMRoleSelected condition should check for existing IAMRoleSelected condition types#266
ramasai1 wants to merge 1 commit into
aws-controllers-k8s:mainfrom
ramasai1:fix-roleselector-condition

Conversation

@ramasai1

Copy link
Copy Markdown

The IAMRoleSelected condition setter was matching erroneously on the ReferencesResolved condition to find existing conditions, which would produce a result like:

    conditions:
    - lastTransitionTime: "2026-08-25T13:39:44Z"
      message: Late initialization successful
      reason: Late initialization successful
      status: "True"
      type: ACK.LateInitialized
    - lastTransitionTime: "2026-08-25T13:39:44Z"
      message: Resource synced successfully
      reason: ""
      status: "True"
      type: ACK.ResourceSynced
    - lastTransitionTime: "2026-08-25T13:39:44Z"
      message: Resource synced successfully
      reason: ""
      status: "True"
      type: Ready
    - lastTransitionTime: "2026-08-25T13:39:44Z"
      message: Selected
      reason: 'roleARN: arn:aws:iam::929690601429:role/ack-ec2-controller-cell, selectorName:
        ack-ec2-sre-2, selectorResourceVersion: 120442'
      status: "True"
      type: ACK.IAMRoleSelected
    - message: 'api error DependencyViolation: The vpc ''vpc-0a3ee9e1212075d03'' has
        dependencies and cannot be deleted.'
      status: "True"
      type: ACK.Recoverable
    - lastTransitionTime: "2026-08-26T00:19:50Z"
      message: Selected
      reason: 'roleARN: arn:aws:iam::929690601429:role/ack-ec2-controller-cell, selectorName:
        ack-ec2-sre-2, selectorResourceVersion: 120442'
      status: "True"
      type: ACK.IAMRoleSelected
    - lastTransitionTime: "2026-08-26T00:19:52Z"
      message: Selected
      reason: 'roleARN: arn:aws:iam::929690601429:role/ack-ec2-controller-cell, selectorName:
        ack-ec2-sre-2, selectorResourceVersion: 120442'
      status: "True"
      type: ACK.IAMRoleSelected
    - lastTransitionTime: "2026-08-26T00:19:54Z"
      message: Selected
      reason: 'roleARN: arn:aws:iam::929690601429:role/ack-ec2-controller-cell, selectorName:
        ack-ec2-sre-2, selectorResourceVersion: 120442'
      status: "True"
      type: ACK.IAMRoleSelected
    - lastTransitionTime: "2026-08-26T00:19:57Z"
      message: Selected
      reason: 'roleARN: arn:aws:iam::929690601429:role/ack-ec2-controller-cell, selectorName:
        ack-ec2-sre-2, selectorResourceVersion: 120442'
      status: "True"
... keeps going ...

for a VPC resource (or any other resource that has no references to resolve). Not sure if I should also add in logic to remove extra condition types there might be of the same type - though that should probably generally apply to all condition types.

@ack-prow
ack-prow Bot requested review from jlbutler and knottnt August 26, 2026 01:07
@ack-prow

ack-prow Bot commented Aug 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ramasai1
Once this PR has been reviewed and has the lgtm label, please assign jlbutler for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 26, 2026
@ack-prow

ack-prow Bot commented Aug 26, 2026

Copy link
Copy Markdown

Hi @ramasai1. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@michaelhtm

Copy link
Copy Markdown
Member

/ok-to-test

@ack-prow ack-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 27, 2026
@ramasai1

Copy link
Copy Markdown
Author

/retest

@ramasai1

ramasai1 commented Sep 1, 2026

Copy link
Copy Markdown
Author

@michaelhtm - I am looking at the test logs and the failures seem unrelated to my change. Any ideas on what could be going wrong?

@sapphirew

Copy link
Copy Markdown
Contributor

@ramasai1 looks like a flaky test issue due to resource limit of the test account. Going to rerun them.
/retest

@ack-prow

ack-prow Bot commented Sep 3, 2026

Copy link
Copy Markdown

@ramasai1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
s3-controller-test 6c5cd4f link true /test s3-controller-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants