-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(spanner/spannertest): support INSERT DML #7820
Merged
Merged
+133
−6
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
product-auto-label
bot
added
size: m
Pull request size is medium.
api: spanner
Issues related to the Spanner API.
labels
Apr 23, 2023
product-auto-label
bot
added
the
stale: old
Pull request is old and needs attention.
label
May 24, 2023
product-auto-label
bot
added
stale: extraold
Pull request is critically old and needs prioritization.
and removed
stale: old
Pull request is old and needs attention.
labels
Jun 23, 2023
rahul2393
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Aug 23, 2023
kokoro-team
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Aug 23, 2023
rahul2393
approved these changes
Aug 23, 2023
hongalex
added a commit
that referenced
this pull request
Aug 31, 2023
* feat(pubsub): add publish tracing * refactor tests to use InMemoryExporter * update copyright year * run go mod tidy * rename PubsubMessageCarrier -> MessageCarrier, fix race * make messageCarrier not exported * downgrade otel sdk version to support go1.17 * add short delay to ensure spans are exported * context renaming * chore(ci): fix yaml syntax (#8448) * chore: release main (#8445) :robot: I have created a release *beep* *boop* --- <details><summary>policytroubleshooter: 1.9.0</summary> ## [1.9.0](https://togithub.com/googleapis/google-cloud-go/compare/policytroubleshooter/v1.8.0...policytroubleshooter/v1.9.0) (2023-08-18) ### Features * **policytroubleshooter/iam:** Start generating apiv3 ([#8444](https://togithub.com/googleapis/google-cloud-go/issues/8444)) ([fb1a8cc](https://togithub.com/googleapis/google-cloud-go/commit/fb1a8ccfa81b8b36658207e333ee83666c87be75)) </details> --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(notebooks): add config to generate apiv2 (#8454) * feat(notebooks): clients for Notebooks API V2 (#8455) - [ ] Regenerate this pull request now. docs: supports Workbench Instances https://cloud.google.com/vertex-ai/docs/workbench/reference/rest PiperOrigin-RevId: 558178233 Source-Link: https://togithub.com/googleapis/googleapis/commit/ad329f84c0876a6f28026a01be584d3134a4df72 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/77e1a0df50f67c0e1c9a9fd768c82f931f601cec Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzdlMWEwZGY1MGY2N2MwZTFjOWE5ZmQ3NjhjODJmOTMxZjYwMWNlYyJ9 * chore(ci): find changes on most recent main commit (#8457) * chore: add datastore to allowlist of things to generate still (#8458) * chore: release main (#8456) :robot: I have created a release *beep* *boop* --- <details><summary>notebooks: 1.10.0</summary> ## [1.10.0](https://togithub.com/googleapis/google-cloud-go/compare/notebooks/v1.9.1...notebooks/v1.10.0) (2023-08-21) ### Features * **notebooks:** Clients for Notebooks API V2 ([#8455](https://togithub.com/googleapis/google-cloud-go/issues/8455)) ([1859e6c](https://togithub.com/googleapis/google-cloud-go/commit/1859e6ca01499ed297167aef60ae1d34a2ed24ea)) </details> --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * fix(bigquery): value for datasetID on foreign keys (#8447) Fixes #8442 * feat(datastore): SUM and AVG aggregations (#8307) * feat(datastore): SUM and AVG aggregations * feat(datastore): Fixing integration tests for SUM AVG * feat(datastore): Fixing integration tests * feat(datastore): Fixing integration tests * feat(datastore): Updating protos * feat(datastore): updating protos * feat(datastore): Undo go.work.sum changes * feat(datastore): Used new protos * feat(datastore): Use latest protos --------- Co-authored-by: meredithslota <meredithslota@google.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> * feat(datastore): Support aggregation query in transaction (#8439) * feat(datastore): Support aggregation query in transaction * feat(datastore): Refactoring integration test * feat(datastore): Integration tests for sum and average * chore(main): release datastore 1.14.0 (#8351) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * add helper functions for creating publish spans * refactor error tests * fix(spanner): Transaction was started in a different session (#8467) * fix: Transaction was started in a different session Retrying a "Session not found" error could cause a "Transaction was started in a different session" error. This happened because: 1. The detection of a "Session not found" error would remove the session from the pool, and also remove the session ID from the session handle 2. The retry mechanism would check out a new session from the pool, but not assign it to the transaction yet 3. The retry would then proceed to retry the transaction with an explicit BeginTransaction RPC. This function would however pick a new session from the pool, because step 2 had not yet assigned the transaction a new session. 4. The higher level retry loop would then after executing the BeginTransaction RPC assign the session that was picked in step 2 to the transaction. 5. The transaction would then proceed to use the session from step 2 with the transaction from step 3. * chore: remove unused code * chore: fix import order * feat(spanner/spannertest): support INSERT DML (#7820) Co-authored-by: rahul2393 <irahul@google.com> * test(datastore): Truncate transaction read time to millisecond (#8473) * fix(datastore): Truncate transaction read time to millisecond * fix(datastore): Truncate transaction read time to microsecond * feat(auth): add base auth package (#8465) This package provides: - A TokenProvider interface - A Token type - A standard auth Error type - Configuration and TokenProvider for 2L0 oauth2 flows - Configuration and TokenProvider for 3L0 oauth2 flows - A means to cache tokens This code has been adapted from the golang oauth2 repo. In particular the types here are analogous to: oauth2, authhandler, and jwt packages. It should feel familiar for anyone who as worked with that library before, but it only provides a subset of the features that we require for our client libraries and auth stack as defined by our AIPs. * test(datastore): Correct read time before creating entities (#8475) * chore(main): release spanner 1.49.0 (#8468) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(ci): increase new-client fetch depth (#8483) * feat(spanner/spansql): add support for bit functions, sequence functions and GENERATE_UUID (#8482) * feat(spanner/spansql): add support for bit functions and sequence functions * feat(spanner/spansql): add support for function GENERATE_UUID * test(storage): increase timeout for requester pays test (#8421) Increasing timeout to give some leeway. If the test continues flaking, we should investigate further why it fails. * test(pubsublite): fix flaky TestRoutingPublisherUnloadIdlePublisher (#8478) Fixes: https://togithub.com/googleapis/google-cloud-go/issues/7942 * test(pubsublite): fix flaky TestIntegration_SeekSubscription (#8479) Fixes: https://togithub.com/googleapis/google-cloud-go/issues/7454 * feat(spanner): allow non-default service accounts (#8488) * feat(spanner/spansql): add support for SEQUENCE statements (#8481) * feat(spanner/spansql): add support for SEQUENCE statements * feat(spanner/spansql): remove using generics for CI env --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: rahul2393 <irahul@google.com> * chore(config): add config to generate apiv1 (#8490) * feat(container): add support for NodeConfig Update (#8461) feat: publicize tpu topology in v1 API PiperOrigin-RevId: 560116372 Source-Link: googleapis/googleapis@cf6f9ee Source-Link: googleapis/googleapis-gen@b618aaf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjYxOGFhZmE2NDE3NDFhNTYxNWMyMTZiODc4NjAwNjViZGMzMGY4ZCJ9 BEGIN_NESTED_COMMIT feat(bigquery/datapolicies): support using custom UDF in the data policy PiperOrigin-RevId: 559480224 Source-Link: googleapis/googleapis@4ffd6cd Source-Link: googleapis/googleapis-gen@2fa3b74 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZhM2I3NDk2ZjkyNzQ1YjE4N2QxYmI1ZjllNjVlNWQwMzZhNWQwNyJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs(optimization): Minor formatting fix PiperOrigin-RevId: 559474510 Source-Link: googleapis/googleapis@5b3202b Source-Link: googleapis/googleapis-gen@7b6e921 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2I2ZTkyMTA4NTEzZDBmZjIxNjE0ZTBkYTZmYzgyNzkxNjFlNTVhMyJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs(datacatalog): fix typo PiperOrigin-RevId: 559249168 Source-Link: googleapis/googleapis@f49882a Source-Link: googleapis/googleapis-gen@08d36c5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDhkMzZjNTkzYWI2MGYxODRhZmUxNDIzYTg0ZGY5NDJlMmFmMmRmMiJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs(billing): update comments PiperOrigin-RevId: 559241398 Source-Link: googleapis/googleapis@6fe53ad Source-Link: googleapis/googleapis-gen@11b03ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTFiMDNhYjZmOWNmMDBjYmNkMTY3MWFmN2Y1ZDcxMzQ4ZjI1NmE3NCJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(billing/budgets): Supported project-level-budgets in Public Budget API V1 Added scope for project scope filter in ListBudgetsRequest. When this field is set to a project's resource name, the budgets returned are tracking the costs for the given project. feat: Added enable_project_level_recipients for project owner budget emails Setting this field to true will enable email notification to project owners for project-level budgets. PiperOrigin-RevId: 559152052 Source-Link: googleapis/googleapis@113867b Source-Link: googleapis/googleapis-gen@017d177 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDE3ZDE3N2Y1MTQ2OWQxNTA0MTdiN2I2YTQ1ZDk5ZDk5NjNmNzgxMyJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(billing/budgets): Supported project-level-budgets in Public Budget API V1Beta Added scope for project scope filter in ListBudgetsRequest. When this field is set to a project's resource name, the budgets returned are tracking the costs for the given project. feat: Added enable_project_level_recipients for project owner budget emails Setting this field to true will enable email notification to project owners for project-level budgets. PiperOrigin-RevId: 559151636 Source-Link: googleapis/googleapis@138b0f1 Source-Link: googleapis/googleapis-gen@41c0ba8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDFjMGJhODk5Zjc2Y2JiZmFjZGRlY2NmN2M3Njk3NDdhY2FmZTI2ZCJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(dataproc): support min_num_instances for primary worker and InstanceFlexibilityPolicy for secondary worker PiperOrigin-RevId: 559135594 Source-Link: googleapis/googleapis@4a5a6fd Source-Link: googleapis/googleapis-gen@5c91126 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWM5MTEyNjFmMDAyNTdmNzY4YThhMzIzYWExYTNlNDgzNjQwYzFkMiJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs(batch): Revert HTML formats in comments docs: Expand compute resource API docs to match with VM's machine type field docs: Clarify Batch API proto doc about pubsub notifications PiperOrigin-RevId: 558940776 Source-Link: googleapis/googleapis@a7ee700 Source-Link: googleapis/googleapis-gen@4f3a485 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGYzYTQ4NWYzY2ViMTNiNjdlMDUyMmI3NGE3ZmQ5Y2NkZTJhYTZhMSJ9 END_NESTED_COMMIT * feat(config): new clients (#8493) * feat(spanner/spansql): add support for aggregate functions (#8498) * fix exactly once delivery test * fix(pubsub): make AckWithResult return success when constructed (#8489) --------- Co-authored-by: Noah Dietz <noahdietz@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Chris Smith <chrisdsmith@google.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Cody Oss <6331106+codyoss@users.noreply.github.com> Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com> Co-authored-by: Baha Aiman <bahaaiman@google.com> Co-authored-by: meredithslota <meredithslota@google.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> Co-authored-by: Knut Olav Løite <koloite@gmail.com> Co-authored-by: go_vargo <44902466+govargo@users.noreply.github.com> Co-authored-by: rahul2393 <irahul@google.com> Co-authored-by: TOGASHI Tomoki <tomoki.t@arigatobank.co.jp> Co-authored-by: Brenna N Epp <brennae@google.com> Co-authored-by: tmdiep <tmdiep@google.com> Co-authored-by: Roman Slyusarchuk <ko3a4ok.ua@gmail.com> Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: Julie Qiu <julie@golang.org> Co-authored-by: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the Spanner API.
size: m
Pull request size is medium.
stale: extraold
Pull request is critically old and needs prioritization.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is your feature request related to a problem? Please describe.
Currently spannertest support DML, SELECT, DELETE, UPDATE SQL queries.
Only INSERT DML is not supported.
Describe the solution you'd like
I would like to add INSERT DML to be parsed via spansql , which would enable us to properly test these statements via spannertest.
Describe alternatives you've considered
An alternative would be to insert via an Insert mutation instead.
This is my first contribution to google-cloud-go. Please let me know if you have a review comment.