google / go-cloud

The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
https://gocloud.dev/
Apache License 2.0
9.57k stars 812 forks source link

gcsblob conformance tests failure on linux due to encoding #3475

Closed sandeepvinayak closed 3 months ago

sandeepvinayak commented 3 months ago

Two of the conformance tests in gcs blob started failing for linux machine after this change in the commit

Seems like difference in encoding for linux in go 1.22 {"bucket":"go-cloud-blob-test-bucket","contentType":"text/plain; charset=utf-8","md5Hash":"XUFAKrxLKna5cZ2REBfFkg==","name":"weird-keys\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t__0xa__\u000b\f__0xd__\u000e\u000f"}

vs

{"bucket":"go-cloud-blob-test-bucket","contentType":"text/plain; charset=utf-8","md5Hash":"XUFAKrxLKna5cZ2REBfFkg==","name":"weird-keys\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t__0xa__\u000b\u000c__0xd__\u000e\u000f"}

u0008 getting converting to backspace (\b)in newer version.

image

sandeepvinayak commented 3 months ago

Detail of linux machine


"os": "Linux 5.14",
"osPlatform": "linux",
"osRelease": "5.14.0-427.22.1.el9_4.x86_64",
"osArch": "x64",
vangent commented 3 months ago

That commit only affects Github, it should not affect your tests running locally. It is also from about 6 months ago.

Yes, Go changed some details of its encoding in a non-backward-compatible way between 1.21 and 1.22. There is nothing I can do about that; for this project I disabled the tests for 1.2.1 after updating to 1.22'; just recently I updated to 1.23 and added back testing for 1.22 to restore the 1-version backwards compability check.

Which version of Go are you using? You will need 1.22 or greater to run these tests.

Note that older versions of Go should still work (although these tests aren't verifying them); the tests only fail because they persist raw RPC results (with encodings) for "golden" tests.

sandeepvinayak commented 3 months ago

Our CI doesn't have 1.22 yet and that explains why the tests might be failing. If we introduce backward incompatibility, we should introduce a way to filter those tests out so the existing CI's doesn't break, WDYT ?

It is also from about 6 months ago.

unfortunately, our forked was synced after a while from upstream and then we encountered this failure. Local builds are all good though.

vangent commented 3 months ago

Sorry, I can't commit to keeping test goldens compatible across multiple Go releases.

I think you'll have to either