Skip to content

Conversation

danieljbruce
Copy link
Contributor

Description

This PR is an extension of #1720. The basic idea is that the rest of the samples should include all the code necessary to get the sample running.

Impact

It makes it easier for users to use our samples.

Testing

These are changes to the samples so they are covered by samples tests

danieljbruce and others added 30 commits August 19, 2025 16:11
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
danieljbruce and others added 20 commits September 9, 2025 15:13
…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
…into fix-restore-table-sample-5-quality-checks

# Conflicts:
#	samples/instances.js
…into fix-restore-table-sample-5-quality-checks-2
@danieljbruce danieljbruce requested review from a team as code owners September 18, 2025 15:39
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Sep 18, 2025
Copy link

snippet-bot bot commented Sep 18, 2025

Here is the summary of changes.

You are about to add 12 region tags.
You are about to delete 12 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

@product-auto-label product-auto-label bot added api: bigtable Issues related to the googleapis/nodejs-bigtable API. samples Issues that are directly related to samples. labels Sep 18, 2025
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For pretty much all the samples in this section we are pulling:

const {Bigtable, GCRuleMaker} = require('@google-cloud/bigtable');
const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2;
const adminClient = new BigtableTableAdminClient();

into the samples and indenting the code that contains a sample so that these declarations can be done multiple times.

@danieljbruce danieljbruce added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 18, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/nodejs-bigtable API. samples Issues that are directly related to samples. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants