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

Ignore specific error that returned by expandWildcard function #312

Merged

Conversation

sergenyalcin
Copy link
Member

Description of your changes

Related to crossplane/crossplane-runtime#627

The issue was observed while testing the GCP certificatemanager.Certificate resource. While trying to get the connection details of this resource, we try to read the self_managed[*].certificate_pem attribute of this resource. If the self_managed object is nil, then we observe an error:

cannot get connection details: cannot get connection details: cannot expand wildcards: cannot expand wildcards for segments: "self_managed[*].certificate_pem": "self_managed": unexpected wildcard usage'

If the value of this field is nil, then we do not want to return an error because there is nothing to read in the sensitive attribute. So, after returning a specific error from the nil case, we are handling this in Upjet by ignoring this error type.

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

Tested against to the GCP certificatemanager.Certificate resource.

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

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

Thanks @sergenyalcin, lgtm.

@sergenyalcin sergenyalcin merged commit cf1b346 into crossplane:main Dec 13, 2023
7 checks passed
@sergenyalcin sergenyalcin deleted the handle--notfound-error-type branch December 13, 2023 07: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