-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add support for Google Cloud Bigtable. #177
Conversation
…ng object properties.
Assuming nothing's changed since the other reviews, 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments but overall I approve
"num_nodes": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
ForceNew: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value can't be updated? Seems like a natural thing to want to adjust later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't update it with the client as-is, or even read it for that matter. When the client supports updating this value, we can remove ForceNew
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
google/bigtable_client_factory.go
Outdated
TokenSource oauth2.TokenSource | ||
} | ||
|
||
func (s *BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable.InstanceAdminClient, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the pointer on the receiver in the signature (e.g.
func (s BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable.InstanceAdminClient, error) {
), then this function is much more explicit that it is immutable (and is therefore thread safe, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
google/bigtable_client_factory.go
Outdated
return bigtable.NewInstanceAdminClient(context.Background(), project, option.WithTokenSource(s.TokenSource), option.WithUserAgent(s.UserAgent)) | ||
} | ||
|
||
func (s *BigtableClientFactory) NewAdminClient(project, instance string) (*bigtable.AdminClient, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
return fmt.Errorf("Error starting instance admin client. %s", err) | ||
} | ||
|
||
defer c.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think golang tooling gets mad if you don't check the return result here in case it returns an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had Gogland get mad at me, and I don't think we can do anything useful with an error from this - any interesting errors would have come from operations we performed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah agree, the only thing we can do is log it but if we're closing it I doubt we're interested in the log message 👍
…pointers to struct.
…pport Add support for Google Cloud Bigtable.
…pport Add support for Google Cloud Bigtable.
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 👉 [email protected]. Thanks! |
Merge the
bigtable-support
branch intomaster
.Add support for two new resources:
google_bigtable_instance
- A container for a single Bigtable cluster.google_bigtable_table
- A Bigtable table contained within an instance.