Skip to content

Conversation

@AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Nov 27, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

CAPA would constantly call CreateTags on instances and volumes because it didn't actually write the "these are the tags I've set" annotation back to the AWSMachine object. The code didn't do anything if the annotations map is nil. This probably only applies to AWSMachinePool machines – they currently get created without any annotations. Other AWSMachine objects normally have annotations like cluster.x-k8s.io/cloned-from-groupkind: AWSMachineTemplate.infrastructure.cluster.x-k8s.io and therefore, I believe, weren't affected.

We detected this issue from very verbose logs and a high rate of AWS requests.

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fix constant re-applying of tags if `AWSMachine.metadata.annotations` is nil

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 27, 2025
Copy link
Contributor

@fiunchinho fiunchinho left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e8454eefd3a81972f9492c2c22eca133a0aef064

@AndiDog
Copy link
Contributor Author

AndiDog commented Nov 28, 2025

/test pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Member

damdo commented Nov 28, 2025

@AndiDog I suggest you to rebase on top of the most recent main. A couple of PRs to fix E2E flakes have recently merged so there is a higher chance for the presubmit to pass on this one too. TY

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

@AndiDog AndiDog force-pushed the avoid-constant-tagging branch from f122d7c to a203e17 Compare December 1, 2025 07:38
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2025
@AndiDog
Copy link
Contributor Author

AndiDog commented Dec 1, 2025

Rebased onto latest E2E test fixes without any changes

/test pull-cluster-api-provider-aws-e2e

@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@AndiDog
Copy link
Contributor Author

AndiDog commented Dec 1, 2025

Another flake maybe?

/test pull-cluster-api-provider-aws-e2e

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants