golang-samples icon indicating copy to clipboard operation
golang-samples copied to clipboard

feat(spanner): add samples for database roles

Open varuncnaik opened this issue 3 years ago • 4 comments

Adds samples with database roles on requests.

varuncnaik avatar May 28 '22 01:05 varuncnaik

I'll work on a sample for ListDatabaseRoles soon.

varuncnaik avatar May 28 '22 04:05 varuncnaik

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • [ ] Refresh this comment

snippet-bot[bot] avatar Jun 23 '22 01:06 snippet-bot[bot]

@varuncnaik Looks like there are some compilation errors caused by missing types. You'll need to upgrade the underlying client if these are new methods and types you're using.

enocom avatar Jun 30 '22 18:06 enocom

@varuncnaik Still seeing some compilation errors. Let me know if you'd like some help with this. Otherwise, I'll assume you'll ping me when you're ready for another look.

enocom avatar Aug 10 '22 21:08 enocom

Looks like we're still missing some types:

# github.com/GoogleCloudPlatform/golang-samples/spanner/spanner_snippets
spanner_snippets/snippet.go:825:3: unknown field 'DatabaseRole' in struct literal of type "cloud.google.com/go/spanner".ClientConfig
# github.com/GoogleCloudPlatform/golang-samples/spanner/spanner_snippets/spanner
spanner_snippets/spanner/spanner_read_data_with_database_role.go:32:3: unknown field 'DatabaseRole' in struct literal of type "cloud.google.com/go/spanner".ClientConfig

@varuncnaik Want some help finishing this? We've had this open for quite awhile now.

enocom avatar Oct 06 '22 16:10 enocom

Hi @enocom, we're aware of the missing types. In my local setup for this PR, I'm editing my go.mod file to replace cloud.google.com/go/spanner with my local copy of https://github.com/googleapis/google-cloud-go/pull/5701.

We plan to merge both of these PRs around the time that Cloud Spanner fine-grained access control becomes generally available. Until then, I am periodically merging the latest main into both PRs and making sure that tests pass locally. CC @rahul2393, in case the two of you want to exchange information over DM.

varuncnaik avatar Oct 18 '22 22:10 varuncnaik

Sounds good. Just ping me when you're ready and we can merge this.

enocom avatar Oct 19 '22 19:10 enocom