Skip to content

Conversation

@chlunde
Copy link

@chlunde chlunde commented Mar 7, 2025

  • Avoid setting tags if there are no changes, prevent conflict on every resource creation
  • Simplify tag code by avoiding creating pointer map

I've observed this error message on every resource creation:

  2025-03-06T09:21:58+01:00       DEBUG   provider-aws    Cannot initialize managed resource      {"controller": "managed/ec2.aws.upbound.io/v1beta1, kind=securitygroup",
      "request": {"name":"example4"},
      "uid": "6110a508-2be7-470c-8d00-10302dc9c270",
      "version": "101685",
      "external-name": "",
      "error": "Operation cannot be fulfilled on securitygroups.ec2.aws.upbound.io \"example4\": the object has been modified; please apply your changes to the latest version and try again"}

By avoiding this unneccessary unconditional Update API call, we get rid of this error message.

Description of your changes

Fixes #

I have:

  • Read and followed Upjet's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

chlunde added 2 commits March 7, 2025 14:30
… resource creation

I've observed this error message on every resource creation:

  2025-03-06T09:21:58+01:00       DEBUG   provider-aws    Cannot initialize managed resource      {"controller": "managed/ec2.aws.upbound.io/v1beta1, kind=securitygroup",
      "request": {"name":"example4"},
      "uid": "6110a508-2be7-470c-8d00-10302dc9c270",
      "version": "101685",
      "external-name": "",
      "error": "Operation cannot be fulfilled on securitygroups.ec2.aws.upbound.io \"example4\": the object has been modified; please apply your changes to the latest version and try again"}

By avoiding this unneccessary unconditional Update API call, we get rid of this error message.

Signed-off-by: Carl Henrik Lunde <[email protected]>
While the AWS SDK typically requires this, I don't believe there is any
reason for this here with the kubernetes objects.

Signed-off-by: Carl Henrik Lunde <[email protected]>
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.

1 participant