docs: samples for instances should include all necessary code#1720
Merged
gcf-merge-on-green[bot] merged 98 commits intomainfrom Sep 18, 2025
Merged
docs: samples for instances should include all necessary code#1720gcf-merge-on-green[bot] merged 98 commits intomainfrom
gcf-merge-on-green[bot] merged 98 commits intomainfrom
Conversation
This commit updates the `backups.restore.js` sample to use the `BigtableTableAdminClient` directly for restoring a table from a backup, instead of going through the handwritten `bigtable.instance().createTableFromBackup()` method. This change is based on the design document for the Node.js Bigtable Admin API autogeneration. The corresponding test for the sample in `samples/test/backups.js` has also been updated to pass the correct arguments to the updated sample script.
instance of the admin client should be used
…into fix-restore-table-sample-5 # Conflicts: # samples/api-reference-doc-snippets/backups.create.js # samples/api-reference-doc-snippets/backups.delete.js # samples/api-reference-doc-snippets/backups.get.js # samples/api-reference-doc-snippets/backups.list.js # samples/api-reference-doc-snippets/backups.restore.js # samples/api-reference-doc-snippets/backups.update.js # samples/api-reference-doc-snippets/family.js # samples/api-reference-doc-snippets/instance.js # samples/api-reference-doc-snippets/table.js # samples/deleteSnippets.js # samples/hello-world/index.js # samples/tableadmin.js # samples/test/backups.js # samples/test/deletes.js # samples/test/family.js # samples/test/filters.js # samples/test/functions.js # samples/test/reads.js # samples/test/row.js # samples/test/write.js
|
Here is the summary of changes. You are about to add 5 region tags.
You are about to delete 5 region tags.
This comment is generated by snippet-bot.
|
…into fix-restore-table-sample-5-quality-checks # Conflicts: # samples/instances.js
kevkim-codes
approved these changes
Sep 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The samples for instances do not contain code for fetching the projectId and the admin client, but they should because this isn't a trivial step. This PR ensures the samples include all the code necessary in order for them to be able to work.
Impact
Improves the documentation and makes it more usable
Testing
These are changes to samples tests
Additional Information
Next steps: