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

interop: Enable Go modules support #24831

Merged
merged 6 commits into from
Dec 1, 2020
Merged

interop: Enable Go modules support #24831

merged 6 commits into from
Dec 1, 2020

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Nov 24, 2020

@jtattermusch
Copy link
Contributor

The build is now succeeding, but a large number of go interop tests is now failing:
https://source.cloud.google.com/results/invocations/4fbaddf0-0796-40a8-88e6-06e5420fa8c3/targets/github%2Fgrpc%2Finterop_test/tests

Perhaps not enough has been reverted in grpc/grpc-go#4060 (previously the go build worked just fine and now it's broken -> there is definitely a go change which can be reverted to make things work again).

@easwars
Copy link
Contributor Author

easwars commented Nov 30, 2020

Based on my local testing with the following Dockerfile:

FROM golang:1.11

RUN git clone --recursive https://github.com/grpc/grpc-go.git src/google.golang.org/grpc
RUN cd src/google.golang.org/grpc
RUN cd src/google.golang.org/grpc/interop/client && GO111MODULE=on go install
RUN cd src/google.golang.org/grpc/interop/server && GO111MODULE=on go install

CMD ["bash"]

I think we should go ahead with this change which enables module support by exporting GO111MODULE=on, and does not call make deps or make testdeps. Instead go install will pull in whatever it needs.

@easwars
Copy link
Contributor Author

easwars commented Dec 1, 2020

This is now getting past the docker build stage, but the tests are failing. I'm guessing this has something to do with the fact that GO111MODULE=on has to set in other scripts.

@easwars
Copy link
Contributor Author

easwars commented Dec 1, 2020

It does look like interop tests with Go are now passing, but there are some other failures which seem unrelated to Go.

This one though I'm not sure what is going on: https://source.cloud.google.com/results/invocations/8f617b63-e1cf-4290-b824-523ad23ed5f0/targets/github%2Fgrpc%2Frun_tests%2Fsanity_linux_dbg_native%2Ftools%2Fbuildgen%2Fgenerate_projects.sh/tests

@jtattermusch jtattermusch added release notes: no Indicates if PR should not be in release notes lang/go labels Dec 1, 2020
@jtattermusch
Copy link
Contributor

It does look like interop tests with Go are now passing, but there are some other failures which seem unrelated to Go.

I think the remaining interop flakes are due to b/174126929

This one though I'm not sure what is going on: https://source.cloud.google.com/results/invocations/8f617b63-e1cf-4290-b824-523ad23ed5f0/targets/github%2Fgrpc%2Frun_tests%2Fsanity_linux_dbg_native%2Ftools%2Fbuildgen%2Fgenerate_projects.sh/tests

The sanity test failure basically complains that you've updated tools/dockerfile/interoptest/grpc_interop_go/build_interop.sh (which is generated from a template) but you haven't updates the corresponding build_interop.sh.template file. I already pointed that out in #24822 (comment)

@jtattermusch
Copy link
Contributor

I've pushed a few fixes to this branch

  • fix the sanity test error by also updating the build_interop.sh.template
  • performed a bit of cleanup of the older go docker images

Known failures:

  • windows failures are due to powershell -File src\csharp\install_dotnet_sdk.ps1 failure (unrelated to this PR)
  • remaining interop test failures are due to b/174126929

Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (after I applied a few fixes).

@jtattermusch
Copy link
Contributor

@yulin-liang this should probably be backported into v1.34.x branch so that the interop tests on that branch can pass.

@dfawley
Copy link
Member

dfawley commented Dec 1, 2020

@jtattermusch thank you for the fixes!

Can you confirm my understanding that the interop tests no longer depend on grpc-go/master@HEAD's Makefile at all anymore, and we can delete it?

@jtattermusch
Copy link
Contributor

@jtattermusch thank you for the fixes!

Can you confirm my understanding that the interop tests no longer depend on grpc-go/master@HEAD's Makefile at all anymore, and we can delete it?

I can manually test the change for you if you point me to a PR.
(basically it's done by having grpc and grpc-go checkouts side-by-side locally and running tools/run_tests/run_interop_tests.py -l go --cloud_to_prod --use_docker - which will test the local working copy of grpc-go)

yulin-liang added a commit that referenced this pull request Dec 1, 2020
Backport #24831 to v1.34.x (to fix interop tests build)
@easwars easwars deleted the gomod branch July 12, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/go release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants