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

Use new client invocation with client libs #1704

Merged

Conversation

rileykarson
Copy link
Member

Required for hashicorp/terraform-provider-google#3529, hashicorp/terraform-provider-google-beta#650 to pass Travis, both of those are required for this pass terraform-test I think


[all]

[terraform]

[terraform-beta]

[ansible]

[inspec]

Copy link
Contributor

@chrisst chrisst left a comment

Choose a reason for hiding this comment

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

👍 pending the 1 comment.

@@ -143,161 +143,161 @@ func (c *Config) LoadAndValidate() error {
c.userAgent = userAgent

log.Printf("[INFO] Instantiating GCE client...")
c.clientCompute, err = compute.New(client)
c.clientCompute, err = compute.NewService(context.Background(), option.WithHTTPClient(client))
Copy link
Contributor

Choose a reason for hiding this comment

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

We should instantiate context.Background a single time and pass the shared object to all these clients. This will allow us to create a context tree that can allow cancelling 1 or all requests when the parent is cancelled.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure it does anything- we never cancel the parent anyways, and most requests end pretty soon- but done.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of 2c334c4.

Pull request statuses

No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#651
depends: GoogleCloudPlatform/terraform-google-conversion#70
depends: hashicorp/terraform-provider-google#3532

@rileykarson
Copy link
Member Author

(magician is red because I ran the job by hand after fixing the broken downstream)

rileykarson and others added 3 commits May 1, 2019 21:13
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@modular-magician modular-magician merged commit 4bcf0e3 into GoogleCloudPlatform:master May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants