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

bigtable: implement managed backup feature #2524

Merged
merged 2 commits into from Jul 20, 2020
Merged

Conversation

liubonan
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 26, 2020
@kolea2
Copy link
Contributor

kolea2 commented Jul 7, 2020

@tritone do you mind taking a look at this?

@tritone
Copy link
Contributor

tritone commented Jul 8, 2020

@tritone do you mind taking a look at this?

Happy to! @kolea2 @liubonan is there an open issue or doc for this work that I should look at for context?

Also @liubonan , CI is currently failing due to linting-- you just need to run gofmt on your changed files.

Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Generally looks good from the Go library perspective; I had a couple of questions. @kolea2 could you take a look as well?

bigtable/admin.go Show resolved Hide resolved
bigtable/admin.go Outdated Show resolved Hide resolved

// BackupIterator is an EntryIterator that iterates over log entries.
type BackupIterator struct {
items []*BackupInfo
Copy link
Contributor

Choose a reason for hiding this comment

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

I was comparing this with ProfileIterator above, which uses the AppProfile struct from the proto directly rather than wrapping with an info struct as you do here. Is there a reason for the different approach (it seems fine to me, just curious)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree there were some inconsistency, but the backup implementation was following the table APIs which use TableInfo. Probably we need a separate cleanup PR which get to a consistent naming.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yeah. Unfortunately we can't make breaking changes like that without releasing a new major version of the library, but it's something to keep in mind. This seems fine to me in any case.

return err
}

// UpdateBackup updates the backup metadata in a cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this only updates expireTime and not other metadata, is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the backend only supports updating expireTime.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be clarified in the docs, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added clarification in the comment.

bigtable/admin.go Outdated Show resolved Hide resolved
bigtable/integration_test.go Outdated Show resolved Hide resolved
bigtable/integration_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

LGTM. Do you want to take this out of draft status so I can approve & merge?


// BackupIterator is an EntryIterator that iterates over log entries.
type BackupIterator struct {
items []*BackupInfo
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yeah. Unfortunately we can't make breaking changes like that without releasing a new major version of the library, but it's something to keep in mind. This seems fine to me in any case.

@liubonan liubonan marked this pull request as ready for review July 20, 2020 17:12
@tritone tritone merged commit 62148b0 into googleapis:master Jul 20, 2020
tritone pushed a commit to tritone/google-cloud-go that referenced this pull request Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants