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

feat(bigtable): add change stream config to create and update table #8180

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

tonytanger
Copy link
Contributor

No description provided.

@tonytanger tonytanger requested review from bhshkh and a team as code owners June 27, 2023 21:23
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Jun 27, 2023
@tonytanger tonytanger changed the title Add create and update table with change stream config feat: add change stream config to create and update table Jun 27, 2023
@tonytanger tonytanger changed the title feat: add change stream config to create and update table feat(bigtable): add change stream config to create and update table Jun 27, 2023
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Jun 28, 2023
@tonytanger tonytanger force-pushed the add_change_stream branch 2 times, most recently from 4e90fa3 to afdc75c Compare June 29, 2023 18:54
@conventional-commit-lint-gcf
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@@ -269,6 +276,10 @@ func (ac *AdminClient) CreateTableFromConf(ctx context.Context, conf *TableConf)
} else if conf.DeletionProtection == Unprotected {
tbl.DeletionProtection = false
}
if conf.ChangeStreamRetention != nil && conf.ChangeStreamRetention.(time.Duration) != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check the retention is between 1 and 7?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like we should leave that up to server side validation https://google.aip.dev/client-libraries/4223

}

// UpdateTableWithChangeStream updates a table to with the given table ID and change stream config.
func (ac *AdminClient) UpdateTableWithChangeStream(ctx context.Context, tableID string, changeStreamRetention ChangeStreamRetention) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, do we need to check the retention is between 1 and 7?

@mutianf mutianf added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 5, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 5, 2023
@mutianf mutianf merged commit 32897ce into googleapis:main Jul 5, 2023
gcf-merge-on-green bot pushed a commit that referenced this pull request Jul 7, 2023
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 Bigtable API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants