Skip to content

bazel: Update to 0.27.0 - #7391

Merged
htuch merged 13 commits into
envoyproxy:masterfrom
keith:ks/update-bazel
Jun 26, 2019
Merged

htuch merged 13 commits into
envoyproxy:masterfrom
keith:ks/update-bazel

Conversation

@keith

@keith keith commented Jun 24, 2019

Copy link
Copy Markdown
Member

Signed-off-by: Keith Smiley [email protected]

Signed-off-by: Keith Smiley <[email protected]>
keith added 2 commits June 24, 2019 17:24
This script is used for the hotrestart_test target, this makes it run
with python3 instead of python2

Signed-off-by: Keith Smiley <[email protected]>
@keith

keith commented Jun 25, 2019 •

Copy link
Copy Markdown
Member Author

This depends on grailbio/bazel-compilation-database#30

@htuch htuch self-assigned this Jun 25, 2019

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Comment thread bazel/gen_compilation_database.sh Resolved

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(undo approval)

@htuch htuch added the waiting label Jun 25, 2019
@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Member Author

Hrm I'm not sure about the coverage failure here, any ideas?

Signed-off-by: Keith Smiley <[email protected]>
@htuch

htuch commented Jun 26, 2019

Copy link
Copy Markdown
Member

@keith this looks like it's a Python 3 thing in gcovr. I'm a little surprised that a change to Bazel could have this impact, as gcovr is run outside of Bazel, see https://github.com/envoyproxy/envoy/blob/master/test/run_envoy_bazel_coverage.sh#L95

@moderation

Copy link
Copy Markdown
Contributor

bazel-compilation-database 0.3.5 is released

@keith

keith commented Jun 26, 2019

Copy link
Copy Markdown
Member Author

I've updated to that version here

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM modulo the coverage issue.
/wait

@keith

keith commented Jun 26, 2019

Copy link
Copy Markdown
Member Author

Signed-off-by: Keith Smiley <[email protected]>
Without both of these subpar thinks the main and src files don't match
because the generated files end up in different subpaths of bazel-out
because of the differences in toolchains

Signed-off-by: Keith Smiley <[email protected]>
@keith

keith commented Jun 26, 2019

Copy link
Copy Markdown
Member Author

Ok I think I finally got par_binary to use the right python version with 0.27.0, we'll see tomorrow

@keith

keith commented Jun 26, 2019

Copy link
Copy Markdown
Member Author

Finally green 🎉

@htuch
htuch merged commit c37b3ab into envoyproxy:master Jun 26, 2019
@keith
keith deleted the ks/update-bazel branch June 26, 2019 20:00
Comment thread ci/do_ci.sh
# gcovr is a pain to run with `bazel run`, so package it up into a
# relocatable and hermetic-ish .par file.
bazel build @com_github_gcovr_gcovr//:gcovr.par
bazel build --python_version=PY2 @com_github_gcovr_gcovr//:gcovr.par

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FYI, the Python version is always set by either --host_force_python (for host-configured targets) or the python_version attr of py_binary/py_test targets. If these are not explicitly specified they default to PY3.

So setting --python_version on the command line has no effect on executable Python targets. Its only use is to cause other targets (e.g. a py_library, or some non-Python rule) to have PY2 or PY3 mode for the purposes of evaluating select()s on the Python version and for deciding whether to use the -py2 output directory.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@brandjon note this is required because of the genrule that outputs the source file. Without this, when forcing py2 on this par_binary target, subpar believes that the main file is not contained in the srcs because it's not nested in the -py2 output directory.

You can reproduce this by running this command with and without this flag, without it subpar fails here https://github.com/google/subpar/blob/35bb9f0092f71ea56b742a520602da9b3638a24f/subpar.bzl#L29-L30

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see, thanks.

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.

4 participants