Skip to content

Fix update loop in backup selection resource and add an example - #1793

Merged
turkenf merged 1 commit into
crossplane-contrib:mainfrom
turkenf:z-1007
May 30, 2025
Merged

Fix update loop in backup selection resource and add an example#1793
turkenf merged 1 commit into
crossplane-contrib:mainfrom
turkenf:z-1007

Conversation

@turkenf

@turkenf turkenf commented May 28, 2025

Copy link
Copy Markdown
Collaborator

Description of your changes

This PR adds a custom diff func for fields that cause loops in the selection resource and adds an example.

2025-05-27T22:25:00+03:00	DEBUG	provider-aws	Diff detected	{"uid": "4c7480f8-10f0-47ee-800e-713dc148a8e5", "name": "example-selection", "gvk": "backup.aws.upbound.io/v1beta1, Kind=Selection", "instanceDiff": "*terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{\"condition.0.string_equals.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.0.string_like.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.0.string_not_equals.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.0.string_not_like.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.101782678.string_equals.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.101782678.string_like.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.101782678.string_not_equals.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"condition.101782678.string_not_like.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, RawConfig:cty.NilVal, RawState:cty.NilVal, RawPlan:cty.NilVal, Meta:map[string]interface {}(nil)}"}

I have:

  • Read and followed Crossplane's contribution process.
  • Run make generate and committed the results (ideally in a separate commit).
  • Not made any manual changes to generated files, and verified this with make check-diff.

How has this code been tested

Uptest-examples/backup/v1beta1/selection.yaml

… and add an example

Signed-off-by: Fatih Türken <turkenf@gmail.com>
@turkenf

turkenf commented May 28, 2025

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/backup/v1beta1/selection.yaml"

@turkenf
turkenf marked this pull request as ready for review May 28, 2025 20:31

@sergenyalcin sergenyalcin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @turkenf LGTM!

Comment thread config/backup/config.go
@turkenf
turkenf merged commit 9b804fc into crossplane-contrib:main May 30, 2025
@turkenf
turkenf deleted the z-1007 branch May 30, 2025 12:17
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