-
Notifications
You must be signed in to change notification settings - Fork 61
feat: modernization part 2 #1748
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
base: main
Are you sure you want to change the base?
Conversation
|
Here is the summary of changes. You are about to delete 11 region tags.
This comment is generated by snippet-bot.
|
|
Warning: This pull request is touching the following templated files:
|
|
The CI is really not cooperating here (timeouts, quota errors, etc) but the code itself should be okay to review. |
mutianf
left a comment
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.
Where did all the data API examples go?
|
|
||
| // Imports the Admin library | ||
| const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; | ||
| const {TableAdminClient} = require('@google-cloud/bigtable').admin; |
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.
should this sample reflect the new CUJ?
await tableAdmin.waitForConsistency('tablename');
or
const [token] = await tableAdmin.generateConsistencyToken({
name: 'tablename',
});
// overload/etc, may be a separate method
await tableAdmin.waitForConsistency(token);
|
|
||
| // Instantiates a client | ||
| const adminClient = new BigtableTableAdminClient(); | ||
| const adminClient = new TableAdminClient(); |
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 here, should this be merged with check_consistency to reflect the newer way of generate consistency token and wait for table to be consistent?
|
|
||
| // Instantiates a client | ||
| const adminClient = new BigtableTableAdminClient(); | ||
| const adminClient = new TableAdminClient(); |
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 also doesn't reflect the new CUJ
| versions: 1, | ||
| }, | ||
| }; | ||
| const updatedMetadata = GcRuleBuilder.rule({ |
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 wonder if this example can be added to the modifyColumnFamilies example as well?
| throw new Error( | ||
| GcRuleBuilder.formatErrorParameter( | ||
| p, | ||
| 'does not appear to be a rule or a union/intersection', |
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.
nit: maybe just
| 'does not appear to be a rule or a union/intersection', | |
| 'is not a rule or a union/intersection', |
| } | ||
| if (nonGroupKeys(p).length > 1) { | ||
| throw new Error( | ||
| GcRuleBuilder.formatErrorParameter(p, 'is an invalid multiple-rule'), |
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.
maybe
| GcRuleBuilder.formatErrorParameter(p, 'is an invalid multiple-rule'), | |
| GcRuleBuilder.formatErrorParameter(p, 'is an invalid multiple-rule, please use union or intersection'), |
| * | ||
| * While users may create an instance of this class using the standard GAPIC | ||
| * constructor parameters, it's recommended to obtain one by way of the | ||
| * Bigtable.getTableAdminClient() method so that authentication and |
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'm not sure if I understand this paragraph. In the example I see const adminClient = new TableAdminClient();. Is this section explaining how to get the TableAdminClient from a gapic generated client?
| * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
| * for more details and examples. | ||
| */ | ||
| async checkOptimizeRestoredTableProgress( |
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.
Do we have this in the example?
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.
Also this API looks a bit different from the doc? https://docs.google.com/document/d/14aOXOpEbwpYJe7-p6E-PUgoy0vn4AKI7zP0Man0prLo/edit?tab=t.0
| * @param options CallOptions, if desired | ||
| * @returns A Promise that completes when the table is consistent | ||
| */ | ||
| async waitForConsistency( |
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.
Do we have this in the example?
| * Check the status of the long running operation returned when the `restoreTable()` | ||
| * LRO has concluded. | ||
| * | ||
| * This one doesn't get generated in GAPIC, because it's "hidden" in proto |
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 method is in the public API but GAPIC is an internal detail, will this show up in the generated public doc? I don't think we need to include the details?
This is a follow-up for these two PRs:
#1739
#1740
This takes care of some missing pieces that were discovered by further discussion:
There is still a CI issue that will need to be corrected before this can be merged. I don't think it's the result of this change, but I also don't want to chance it.