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

Reuse the client if it is already configured in fwprovider #1467

Merged
merged 4 commits into from
Jun 10, 2024

Conversation

tchinmai7
Copy link
Contributor

📝 Description

What does this PR do and why is this change necessary?
Crossplane provider-linode expects to use a single configured instance of the linode client across all invocations. However, due to how upjet operates, the configureProvider() gets invoked on every resource call. To preserve the client, see if the fp.Meta.Client is already initialized, and if so, re-use it.

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?

How do I run the relevant unit/integration tests?
The main thing here should be verifying it doesn't break any usual terraform flows.

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@tchinmai7 tchinmai7 requested a review from a team as a code owner June 7, 2024 01:20
@tchinmai7 tchinmai7 requested review from jriddle-linode and lgarber-akamai and removed request for a team June 7, 2024 01:20
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Everything seems to work as expected on my local machine, thanks for the contribution!

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM thank you!!

@lgarber-akamai lgarber-akamai merged commit 8aba655 into linode:dev Jun 10, 2024
4 checks passed
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.

4 participants