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

samples(spanner): update samples to use wrappers #890

Merged

Conversation

NivedhaSenthil
Copy link
Member

@NivedhaSenthil NivedhaSenthil commented Dec 6, 2021

  • use the new wrapper instead of initialising the generated client directly

Checklist

  • Tests pass
  • Lint pass: bundle exec rubocop

Closes #891

- use the new wrapper instead of initialising the generated client directly
@NivedhaSenthil NivedhaSenthil requested a review from a team as a code owner December 6, 2021 11:03
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 6, 2021
@product-auto-label product-auto-label bot added api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples. labels Dec 6, 2021
@NivedhaSenthil NivedhaSenthil added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed samples Issues that are directly related to samples. labels Dec 6, 2021
@NivedhaSenthil NivedhaSenthil changed the title samples(storage): update samples to use wrappers samples(spanner): update samples to use wrappers Dec 6, 2021
@NivedhaSenthil NivedhaSenthil added api: spanner Issues related to the Spanner API. and removed api: storage Issues related to the Cloud Storage API. labels Dec 6, 2021
- use the new wrapper instead
@hengfengli
Copy link
Contributor

@NivedhaSenthil Can you please fix the CI errors? Also, why do we put a Do Not Merge label for this PR?

@NivedhaSenthil
Copy link
Member Author

@hengfengli Thanks for taking a look at this... the changes for the admin wrapper is not released yet.. hence wanted to wait till it is released. Also the test failures are due to the same reason as it is using the latest released version of google-cloud-spanner library which don't have the changes yet.

Created a PR to track on the completed samples and get some early feedback.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Dec 7, 2021
version_retention_period = "7d"
database_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin project_id: project_id

instance_path = database_admin_client.instance_path project: project_id, instance: instance_id
Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't store project_id in database_admin_client, right? We have to pass project_id again here.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we can remove it from client creation 👍

Copy link
Contributor

@hengfengli hengfengli left a comment

Choose a reason for hiding this comment

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

LGTM.

@NivedhaSenthil NivedhaSenthil requested a review from a team December 21, 2021 03:28
@NivedhaSenthil NivedhaSenthil requested review from gcseh and a team as code owners December 21, 2021 05:37
@NivedhaSenthil
Copy link
Member Author

Skipping backup tests due to timeout issue. To be fixed as part of #893

@NivedhaSenthil NivedhaSenthil removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 22, 2021
Copy link
Contributor

@bajajneha27 bajajneha27 left a comment

Choose a reason for hiding this comment

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

LGTM

@NivedhaSenthil NivedhaSenthil merged commit fb69799 into GoogleCloudPlatform:main Dec 29, 2021
@NivedhaSenthil NivedhaSenthil deleted the update-spanner-samples branch December 29, 2021 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

samples(spanner): update samples to use new client wrapper
4 participants