googleapis / google-cloud-go

Google Cloud Client Libraries for Go.
https://cloud.google.com/go/docs/reference
Apache License 2.0
3.73k stars 1.28k forks source link

datastore: use read_time #8469

Closed hermanbanken closed 11 months ago

hermanbanken commented 1 year ago

How can we start testing with read_time for the new Point In Time Recovery feature that is in Pre-GA?

We'd like to try that with the Datastore Library and with the Datastore Backup (Export) process (https://cloud.google.com/sdk/gcloud/reference/alpha/datastore/export doesn't mention it either).

I attempted to create a PR to let us easily swap the datastore module version, but failed. I noticed that internal/gapicgen/cmd/genbot/README.md contains stale documentation, because this does not work:

cd /path/to/internal/gapicgen
go run cloud.google.com/go/internal/gapicgen/cmd/genbot \
   -local \
   -only-gapics \
   -gocloud-dir=/path/to/google-cloud-go \
   -gapic=cloud.google.com/go/foo/apiv1

or even fixed version:

cd internal/gapicgen
go run cloud.google.com/go/internal/gapicgen/cmd/genbot \
   -local -regen-only

Both fail, because -only-gapics and -gocloud-dir and -gapic are no longer options of genbot, and the latter command with:

regenerating genproto
[/var/folders/wj/vmlk2b6d1v309rl8xf0hzqwr0000gn/T/update-genproto987999367/genproto] >>>> mkdir -p generated <<<<
[/var/folders/wj/vmlk2b6d1v309rl8xf0hzqwr0000gn/T/update-genproto987999367/googleapis] >>>> git diff-tree --no-commit-id --name-only --diff-filter=ACMR -r f5987af9df625b86e23aed7218ab5f48e85e4ec8..HEAD <<<<
fatal: Invalid revision range f5987af9df625b86e23aed7218ab5f48e85e4ec8..HEAD

error generating genproto (may need to check logs for more errors): exit status 128
exit status 1

This is my first experience with regenerating api's for https://github.com/googleapis/google-cloud-go, so this is a bit over my head.

bhshkh commented 1 year ago

This is sample usage of ReadTime: https://github.com/googleapis/google-cloud-go/blob/b5000f608c3b62791a42db17dbabf2c08b9a8c1a/datastore/integration_test.go#L270 Is this what you are looking for?

noahdietz commented 11 months ago

I'm going to close this issue due to lack of activity from author after a response from the maintainer. If this does not answer the question, please comment as much with clarifying information.

FWIW features may land in production service with client library support to follow, it is not always an immediate fast follow though.

hermanbanken commented 7 months ago

@bhshkh thanks for the link to the docs. I actually meant something more like you added in this change: https://github.com/googleapis/google-cloud-go/blame/94d4b1b58d2c8f3dac18e7efb0be641b6311c775/datastore/integration_test.go#L728

@noahdietz thanks for closing it, it was indeed stale.