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

test(internal/testutil): fix race when accessing trace spans #10186

Merged
merged 11 commits into from
May 23, 2024

Conversation

itizir
Copy link
Contributor

@itizir itizir commented May 15, 2024

Closes #10184, closes #10141.
Continuation of #5006.
Noticed in pipeline for #10153.

@itizir itizir requested review from a team as code owners May 15, 2024 21:54
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label May 15, 2024
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 18, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 18, 2024
@rahul2393 rahul2393 enabled auto-merge (squash) May 18, 2024 04:54
@itizir
Copy link
Contributor Author

itizir commented May 18, 2024

Ah, thanks for fixing it up! Sorry I missed those spots…

auto-merge was automatically disabled May 19, 2024 15:08

Head branch was pushed to by a user without write access

@itizir
Copy link
Contributor Author

itizir commented May 19, 2024

It's probably fine to return the pointer to the span data itself. What I'm not sure about is whether checking that there is no more than 1 span in that trace test is important... Let me know if you want me to tweak that some more, or feel free to do as you wish. :)

@rahul2393 rahul2393 requested review from a team as code owners May 22, 2024 10:49
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@quartzmo quartzmo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2024
@quartzmo
Copy link
Member

kokoro failure:

# cloud.google.com/go/bigquery [cloud.google.com/go/bigquery.test]
./oc_test.go:35:9: invalid operation: cannot call non-function te.Spans (variable of type []*"go.opencensus.io/trace".SpanData)
FAIL	cloud.google.com/go/bigquery [build failed]
?   	cloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb	[no test files]
?   	cloud.google.com/go/bigquery/biglake/apiv1/biglakepb	[no test files]

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 23, 2024
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 23, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 23, 2024
@rahul2393
Copy link
Contributor

kokoro failure:

# cloud.google.com/go/bigquery [cloud.google.com/go/bigquery.test]
./oc_test.go:35:9: invalid operation: cannot call non-function te.Spans (variable of type []*"go.opencensus.io/trace".SpanData)
FAIL	cloud.google.com/go/bigquery [build failed]
?   	cloud.google.com/go/bigquery/analyticshub/apiv1/analyticshubpb	[no test files]
?   	cloud.google.com/go/bigquery/biglake/apiv1/biglakepb	[no test files]

Yes, we need to first release the changes in cloud.google.com/go after which we need to make other relevant changes.

@rahul2393 rahul2393 merged commit 5fa60ba into googleapis:main May 23, 2024
8 checks passed
@harshachinta
Copy link
Contributor

@rahul2393 I guess the PR title should be changed to internal instead of spanner for the release in that module. Also does test create a new release or should it be tagged as fix?

@rahul2393 rahul2393 changed the title test(spanner): fix race when accessing trace spans internal(testutil): fix race when accessing trace spans May 23, 2024
@rahul2393 rahul2393 changed the title internal(testutil): fix race when accessing trace spans test(internal/testutil): fix race when accessing trace spans May 23, 2024
@rahul2393 rahul2393 changed the title test(internal/testutil): fix race when accessing trace spans test(internal/trace): fix race when accessing trace spans May 23, 2024
@rahul2393 rahul2393 changed the title test(internal/trace): fix race when accessing trace spans test(internal/testutil): fix race when accessing trace spans May 23, 2024
@itizir itizir deleted the fix-flaky-spanner-tests branch May 28, 2024 13:52
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.
Projects
None yet
5 participants