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

fix: add ensureDecoded to proto type #2897

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

harshachinta
Copy link
Contributor

@harshachinta harshachinta commented Feb 19, 2024

Issue: When running ITProtocolumnTest locally

java.lang.ClassCastException: class com.google.protobuf.Value cannot be cast to class com.google.cloud.spanner.AbstractResultSet$LazyByteArray (com.google.protobuf.Value and com.google.cloud.spanner.AbstractResultSet$LazyByteArray are in unnamed module of loader 'app')

	at com.google.cloud.spanner.GrpcStruct.getProtoMessageInternal(GrpcStruct.java:385)
	at com.google.cloud.spanner.AbstractResultSet.getProtoMessageInternal(AbstractResultSet.java:326)
	at com.google.cloud.spanner.AbstractStructReader.getProtoMessage(AbstractStructReader.java:301)
	at com.google.cloud.spanner.ForwardingStructReader.getProtoMessage(ForwardingStructReader.java:423)
	at com.google.cloud.spanner.it.ITProtoColumnTest.testProtoColumnsUpdateAndRead(ITProtoColumnTest.java:247)

Reason - #2846 refactored code for easy maintenance and decoded data only when called. This change was not added to proto type and it was throwing the exception.

Why Presubmits failed to catch - We disabled the Proto tests in #2857 (Look PR description for the reason). This PR made changes to test file to skip only on non allowlisted projects so that these issues can be caught in presubmits.

@harshachinta harshachinta requested a review from a team as a code owner February 19, 2024 10:15
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Feb 19, 2024
@harshachinta harshachinta changed the title fix(spanner): add ensureDecoded to proto type fix: add ensureDecoded to proto type Feb 19, 2024
@harshachinta harshachinta added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 19, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 19, 2024
@harshachinta harshachinta added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 20, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 20, 2024
@harshachinta harshachinta merged commit e99b78c into googleapis:main Feb 20, 2024
24 of 25 checks passed
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 21, 2024
🤖 I have created a release *beep* *boop*
---


## [6.60.0](https://togithub.com/googleapis/java-spanner/compare/v6.59.0...v6.60.0) (2024-02-21)


### Features

* Add an API method for reordering firewall policies ([62319f0](https://togithub.com/googleapis/java-spanner/commit/62319f032163c4ad3e8771dd5f92e7b8a086b5ee))
* **spanner:** Add field for multiplexed session in spanner.proto ([62319f0](https://togithub.com/googleapis/java-spanner/commit/62319f032163c4ad3e8771dd5f92e7b8a086b5ee))
* Update TransactionOptions to include new option exclude_txn_from_change_streams ([#2853](https://togithub.com/googleapis/java-spanner/issues/2853)) ([62319f0](https://togithub.com/googleapis/java-spanner/commit/62319f032163c4ad3e8771dd5f92e7b8a086b5ee))


### Bug Fixes

* Add ensureDecoded to proto type ([#2897](https://togithub.com/googleapis/java-spanner/issues/2897)) ([e99b78c](https://togithub.com/googleapis/java-spanner/commit/e99b78c5d810195d368112eed2b185d2d99e62a9))
* **spanner:** Fix write replace used by dataflow template and import export ([#2901](https://togithub.com/googleapis/java-spanner/issues/2901)) ([64b9042](https://togithub.com/googleapis/java-spanner/commit/64b90429d4fe53f8509a3923e046406b4bc5876a))


### Dependencies

* Update dependency com.google.cloud:google-cloud-trace to v2.36.0 ([#2749](https://togithub.com/googleapis/java-spanner/issues/2749)) ([51a348a](https://togithub.com/googleapis/java-spanner/commit/51a348a0c2b84106ea763721bed3420a0d07f30a))


### Documentation

* Update comments ([62319f0](https://togithub.com/googleapis/java-spanner/commit/62319f032163c4ad3e8771dd5f92e7b8a086b5ee))
* Update the comment regarding eligible SQL shapes for PartitionQuery ([62319f0](https://togithub.com/googleapis/java-spanner/commit/62319f032163c4ad3e8771dd5f92e7b8a086b5ee))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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 googleapis/java-spanner API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants