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

build: update rules_go and data-plane-api #2617

Merged
merged 1 commit into from
Feb 21, 2018

Conversation

snowp
Copy link
Contributor

@snowp snowp commented Feb 15, 2018

title: build: update rules_go and data-plane-api

Description:
This updates rules_go to 0.9.0 in order to bring in
bazel-contrib/rules_go@812c172
which is necessary in order to build envoy from behind a proxy.

Updating data-plane-api is necessary in order to to update the version
of protoc-gen-validate to a version that includes bufbuild/protoc-gen-validate@3204975

Risk Level: Low
This only modifies build dependencies. Only risk I can imagine is incompatible protos being brought in by data-plane-api, but I'd imagine code review in that repo would have prevented that.

Testing:

Ran the tests on OS X. I also successfully built //source/exe:envoy-static on Centos 7 behind a proxy (after specifying HTTP(S)_PROXY) in order to verify that this fixes #2578.

Docs Changes:
n/a

Release Notes:
n/a

[Optional Fixes #Issue]
This should address #2578

@@ -14,5 +14,3 @@ load("@com_lyft_protoc_gen_validate//bazel:go_proto_library.bzl", "go_proto_repo
go_proto_repositories(shared=0)
go_rules_dependencies()
go_register_toolchains()
load("@io_bazel_rules_go//proto:def.bzl", "proto_register_toolchains")
proto_register_toolchains()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is no longer needed in 0.9.0

@snowp
Copy link
Contributor Author

snowp commented Feb 15, 2018

Builds are failing due to what looks like a rules_go bug, investigating.

@jmillikin-stripe
Copy link
Contributor

The version of rules_go being upgraded from (0.8.1) appears to have bazel-contrib/rules_go@812c172 in it. See https://github.com/bazelbuild/rules_go/blob/0.8.1/go/private/go_repository.bzl#L52-L55 for the HTTP_PROXY and HTTPS_PROXY variables being propagated in that version.

Was there a later commit that made improvements to proxy handling? I don't see anything recent in the rules_go commit logs.

@snowp
Copy link
Contributor Author

snowp commented Feb 16, 2018

We're actually updating from 4374be38e9a75ff5957c3922adb155d32086fe14 (see https://github.com/envoyproxy/envoy/blob/master/bazel/repository_locations.bzl#L82), which does not contain the proxy fix:
https://github.com/bazelbuild/rules_go/blob/4374be38e9a75ff5957c3922adb155d32086fe14/go/private/go_repository.bzl#L51

The sha we're currently at looks like just before 0.7.0? although it doesn't map directly to a tag:

➜  rules_go git:(44b3bdf) git tag --contains 4374be38e9a75ff5957c3922adb155d32086fe14
0.7.0
0.7.1
0.8.0
0.8.1
0.9.0
➜  rules_go git:(44b3bdf) git rev-parse 0.7.0
0bd97fc6ae48d4124e1a8506bcb397be766f8b83

The proxy fix was added to 0.8.0 and back ported to 0.7.1

@jmillikin-stripe
Copy link
Contributor

Ah, got it, I misread. Would it be possible to upgrade rules_go to only 0.7.1? Even though it's old, that's fine -- it's only being used to generate .go code from protobufs if I remember correctly.

@jmillikin-stripe
Copy link
Contributor

jmillikin-stripe commented Feb 16, 2018

Wait, now I remember where I saw 0.8.1 -- that's the version data-plane-api is building with: https://github.com/envoyproxy/data-plane-api/blob/e14a95b2ebdabffb3cc3b44204b3dd85c907069b/WORKSPACE#L40-L44

Could this be fixed by bringing the rules_go dependency versions into sync?

@snowp
Copy link
Contributor Author

snowp commented Feb 16, 2018

Sure I'll give that a go.

@snowp
Copy link
Contributor Author

snowp commented Feb 16, 2018

Didn't seem like 0.8.1 did. I'll try 0.7.1 just in case. I don't think the version mismatch between api and envoy matters since the envoy version would take precedence in this case.

@snowp
Copy link
Contributor Author

snowp commented Feb 16, 2018

Looks like even 0.7.1 fails :(

@jmillikin-stripe
Copy link
Contributor

Looks like even 0.7.1 is failing. Digging more into the commits I found the sequence is:

which I guess explains why it's pinned to a non-tag commit.

One possible solution is to take the Envoy commit, apply the proxy patch, and host it outside the main rules_go repo. @htuch has done something like this in the past with protobuf. Would you be OK with this approach? If so, I'll try to get it in place tomorrow.

@snowp
Copy link
Contributor Author

snowp commented Feb 16, 2018

Yeah I'd be okay with forking rules_go to get this working. I was trying to avoid it, but it looks like that would be the easiest way to resolve this at this point.

@htuch
Copy link
Member

htuch commented Feb 20, 2018

@snowp what's the future status of this PR given #2631 just merged?

@snowp
Copy link
Contributor Author

snowp commented Feb 20, 2018

I'll rebase this and point back to 0.9.0. Should hopefully go green

@snowp
Copy link
Contributor Author

snowp commented Feb 20, 2018

Updating data-plane-api is no longer necessary since it's been updated already on master

@snowp
Copy link
Contributor Author

snowp commented Feb 21, 2018

Looks like we're all green. Gonna rebase to get the DCO right and then we should be good to go

This updates rules_go to 0.9.0 in order to bring in
bazel-contrib/rules_go@812c172
which is necessary in order to build envoy from behind a proxy.

Signed-off-by: Snow Pettersen <snowp@squareup.com>
@snowp
Copy link
Contributor Author

snowp commented Feb 21, 2018

all checks passed! @htuch we should be able to merge this

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

@htuch htuch merged commit a1cf451 into envoyproxy:master Feb 21, 2018
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
Signed-off-by: Prabu Shyam <prabushyam41@gmail.com>

Co-authored-by: Prabu Shyam <prabushyam@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Envoy does not build behind a proxy
3 participants