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

Failing test on master: --- FAIL: TestGenerateProgram/regress-11176 #13644

Closed
t0yv0 opened this issue Aug 3, 2023 · 4 comments · Fixed by #13652
Closed

Failing test on master: --- FAIL: TestGenerateProgram/regress-11176 #13644

t0yv0 opened this issue Aug 3, 2023 · 4 comments · Fixed by #13652
Assignees
Labels
area/build CI/CD for pulumi/pulumi kind/bug Some behavior is incorrect or out of spec p1 Bugs severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Milestone

Comments

@t0yv0
Copy link
Member

t0yv0 commented Aug 3, 2023

What happened?

Looks like one of the test started failing, blocking PRs.

Expected Behavior

Tests are green on master.

Steps to reproduce

cd pkg/codegen/go/gen_program_test/batch5
go test -run TestGenerateProgram -test.v

--- FAIL: TestGenerateProgram (8.09s)
    --- PASS: TestGenerateProgram/multiline-string (1.16s)
    --- FAIL: TestGenerateProgram/regress-11176 (5.77s)
    --- PASS: TestGenerateProgram/throw-not-implemented (1.16s)
    --- SKIP: TestGenerateProgram/python-reserved (0.00s)
    --- SKIP: TestGenerateProgram/iterating-optional-range-expressions (0.00s)
    --- PASS: TestGenerateProgram/output-literals (0.00s)
    --- SKIP: TestGenerateProgram/dynamic-entries (0.00s)
    --- PASS: TestGenerateProgram/single-or-none (0.00s)

Logs give:

main imports
        github.com/pulumi/pulumi/sdk/v3/go/pulumi imports
        github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin imports
        google.golang.org/grpc/status imports
        google.golang.org/genproto/googleapis/rpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
        google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/status)
        google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/status)
main imports
        github.com/pulumi/pulumi/sdk/v3/go/pulumi imports
        github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin imports
        google.golang.org/grpc/codes tested by
        google.golang.org/grpc/codes.test imports
        google.golang.org/genproto/googleapis/rpc/code: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/code in multiple modules:
        google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/code)
        google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/code)
main imports
        github.com/pulumi/pulumi/sdk/v3/go/pulumi imports
        github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin imports
        google.golang.org/grpc/status tested by
        google.golang.org/grpc/status.test imports
        google.golang.org/genproto/googleapis/rpc/errdetails: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
        google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/errdetails)
        google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 (/Users/anton.tayanovskyy/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/errdetails)

Output of pulumi about

$ go version
go version go1.20.1 darwin/arm64

Additional context

Also failing in CI eg on the #13592 PR but I don't think it is related to the changes in the PR.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@t0yv0 t0yv0 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 3, 2023
@dixler dixler added p0 Bugs severe enough to interrupt existing work area/build CI/CD for pulumi/pulumi and removed needs-triage Needs attention from the triage team labels Aug 3, 2023
@dixler dixler self-assigned this Aug 3, 2023
@abhinav
Copy link
Contributor

abhinav commented Aug 3, 2023

Okay, so here's what's happening:
Upstream google.golang.org/genproto decided to break google.golang.org/genproto/googleapis/rpc out into a separate submodule.
This can break if I have two dependencies A and B where A depends on the new version (with the split submodule) and B depends on the old version, because that confuses the build system by telling it that google.golang.org/genproto/googleapis/rpc is available in two different places: as a subpackage of google.golang.org/genproto and as the independent submodule google.golang.org/genproto/googleapis/rpc.

If anyone encounters this in their code, they should run:

go get google.golang.org/genproto@latest
go mod tidy

For the test, we're going to attempt to fix the dependencies we control that have this conflict.

Refs: googleapis/go-genproto#1015
Related change: #13593

@dixler dixler assigned abhinav and unassigned dixler Aug 3, 2023
@dixler dixler added this to the 0.92 milestone Aug 3, 2023
abhinav added a commit to pulumi/pulumi-awsx that referenced this issue Aug 3, 2023
Details are documented in
pulumi/pulumi#13644 (comment),
but in short:

The old version of google.golang.org/genproto provides
google.golang.org/genproto/googleapis/rpc as a subpackage,
and this conflicts with the independent submodule
google.golang.org/genproto/googleapis/rpc.

This means that a fresh new Go program that imports
`pulumi` and `pulumi-awsx` will break with an error like:

```
google.golang.org/genproto/googleapis/rpc/errdetails: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 ($GOPATH/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/errdetails)
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 ($GOPATH/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/errdetails)
```

Refs pulumi/pulumi#13644
abhinav added a commit that referenced this issue Aug 3, 2023
**Do not merge**

Pins Go codegen tests to pulumi/pulumi-awsx#1066
to verify that this would indeed fix #13644.

Refs #13644
abhinav added a commit to pulumi/pulumi-awsx that referenced this issue Aug 3, 2023
Details are documented in
pulumi/pulumi#13644 (comment),
but in short:

The old version of google.golang.org/genproto provides
google.golang.org/genproto/googleapis/rpc as a subpackage,
and this conflicts with the independent submodule
google.golang.org/genproto/googleapis/rpc.

This means that a fresh new Go program that imports
`pulumi` and `pulumi-awsx` will break with an error like:

```
google.golang.org/genproto/googleapis/rpc/errdetails: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 ($GOPATH/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/errdetails)
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 ($GOPATH/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/errdetails)
```

Refs pulumi/pulumi#13644
abhinav added a commit to pulumi/pulumi-awsx that referenced this issue Aug 3, 2023
Details are documented in
pulumi/pulumi#13644 (comment),
but in short:

The old version of google.golang.org/genproto provides
google.golang.org/genproto/googleapis/rpc as a subpackage,
and this conflicts with the independent submodule
google.golang.org/genproto/googleapis/rpc.

This means that a fresh new Go program that imports
`pulumi` and `pulumi-awsx` will break with an error like:

```
google.golang.org/genproto/googleapis/rpc/errdetails: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 ($GOPATH/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/errdetails)
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 ($GOPATH/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230706204954-ccb25ca9f130/errdetails)
```

Refs pulumi/pulumi#13644
@abhinav
Copy link
Contributor

abhinav commented Aug 3, 2023

pulumi/pulumi-awsx#1066 has been merged. We'll need an awsx release.
Meanwhile, I will comment the test out to unblock pu/pu.
CC @dixler

abhinav added a commit that referenced this issue Aug 3, 2023
regress-11176 is currently broken because it imports awsx which,
without pulumi/pulumi-awsx#1066 released
pulls in an old version of google.golang.org/genproto,
and that conflicts with the newer version.

Details in #13644 (comment)

This change disables the test so that tests on master aren't red.

Refs #13644
bors bot added a commit that referenced this issue Aug 3, 2023
13649: test(codegen): Disable regress-11176 r=abhinav a=abhinav

regress-11176 is currently broken because it imports awsx which,
without pulumi/pulumi-awsx#1066 released
pulls in an old version of google.golang.org/genproto,
and that conflicts with the newer version.

Details in #13644 (comment)

This change disables the test so that tests on master aren't red.

Refs #13644


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
bors bot added a commit that referenced this issue Aug 4, 2023
13649: test(codegen): Disable regress-11176 r=abhinav a=abhinav

regress-11176 is currently broken because it imports awsx which,
without pulumi/pulumi-awsx#1066 released
pulls in an old version of google.golang.org/genproto,
and that conflicts with the newer version.

Details in #13644 (comment)

This change disables the test so that tests on master aren't red.

Refs #13644


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
bors bot added a commit that referenced this issue Aug 4, 2023
13649: test(codegen): Disable regress-11176 r=abhinav a=abhinav

regress-11176 is currently broken because it imports awsx which,
without pulumi/pulumi-awsx#1066 released
pulls in an old version of google.golang.org/genproto,
and that conflicts with the newer version.

Details in #13644 (comment)

This change disables the test so that tests on master aren't red.

Refs #13644


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
@abhinav abhinav added p1 Bugs severe enough to be the next item assigned to an engineer and removed p0 Bugs severe enough to interrupt existing work labels Aug 4, 2023
@abhinav abhinav removed their assignment Aug 4, 2023
@abhinav
Copy link
Contributor

abhinav commented Aug 4, 2023

Unassigning to test out issue-label-bot^.
When #13652 closes this PR, it should assign the ticket to me—or the implementation is wrong.

bors bot added a commit that referenced this issue Aug 4, 2023
13652: Revert "test(codegen): Disable regress-11176" r=abhinav a=abhinav

Revert the test disabled in #13649 to unblock master builds
now that pulumi-awsx has been released with
pulumi/pulumi-awsx#1066.

This reverts commit e270756.

Resolves #13644


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
@bors bors bot closed this as completed in e939258 Aug 4, 2023
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Aug 4, 2023
@pulumi-bot pulumi-bot reopened this Aug 4, 2023
@pulumi-bot
Copy link
Contributor

Cannot close issue:

  • does not have an assignee

Please fix these problems and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build CI/CD for pulumi/pulumi kind/bug Some behavior is incorrect or out of spec p1 Bugs severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
4 participants