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

refactor: adding a Base Client #4253

Merged
merged 2 commits into from
Sep 12, 2019
Merged

refactor: adding a Base Client #4253

merged 2 commits into from
Sep 12, 2019

Conversation

tombuildsstuff
Copy link
Contributor

This PR continues the refactoring into Service Packages by introduces a Base Client and moves the StopContext into it (since this is used everywhere)

Since this BaseClient is nested within the ArmClient, all of the fields should be available both at the top level and the inner level, e.g.

type Client struct {
  StopContext context.Context
}

type ArmClient struct {
  common.Client
}

func foo() {
  client := ArmClient{}

  client.StopContext // available
  client.Client.StopContext // available
}

.. which means that we should be able to move fields into the Base class gradually, leave the references pointing to the top-level meta.(*ArmClient).StopContext and then find & replace the meta.(*ArmClient) to meta.(*common.Client) later on

@tombuildsstuff tombuildsstuff added this to the v1.34.0 milestone Sep 5, 2019
@ghost ghost added the size/L label Sep 5, 2019
@tombuildsstuff
Copy link
Contributor Author

Since the tests for this will affect all resources in the same manner, it should be sufficient to run one set of tests to confirm this change is fine - so the App Service tests pass:

Screenshot 2019-09-12 at 07 27 22

@tombuildsstuff tombuildsstuff merged commit e3b66e0 into master Sep 12, 2019
@tombuildsstuff tombuildsstuff deleted the refactor/base-client branch September 12, 2019 05:28
@ghost
Copy link

ghost commented Sep 18, 2019

This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.34.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants