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

CI: Move coverage workflow to Engflow's remote execution #1757

Merged
merged 252 commits into from Sep 29, 2021

Conversation

lfpino
Copy link
Contributor

@lfpino lfpino commented Aug 27, 2021

Signed-off-by: Luis Fernando Pino Duque luis@engflow.com

Description:
CI: Move coverage workflow to Engflow's remote execution and cut build times by 6x.

A few considerations:

  • It's critical to set the right environment variables for coverage builds to work (this is how Bazel controls how coverage is run), in particular we need to set CC, CXX, GCOV and BAZEL_LLVM_COV to point to the right tools and they need to exist in the docker container that's running the builds.
  • BAZEL_USE_LLVM_NATIVE_COVERAGE is required for bazel to run LLVM coverage
  • These environment variables affect the rbe_autoconfig toolchain generation (i.e. the generated packages will point to different places depending of those env variables), so we need a new toolchain just for coverage.

Some shortcomings / gotchas:

  • Coverage builds depend on config=coverage from upstream Envoy, as such, the coverage actions run locally (probably because remote coverage builds are buggy), because of this we need test_strategy=standalone to run the tests locally and produce the right coverage artifacts.
  • After my experimentation, coverage builds seem to be incompatible with remote_download_outputs=toplevel (or minimal) so we need to set it to remote_download_outputs=all. Otherwise, some coverage artifacts aren't present locally for the coverage report generation. This is a bug in Bazel and I'll file a bug upstream for that.
  • Similar experimentation shows that remote caching is also incompatible with remote coverage. For some reason, caching makes prevents some of the coverage artifacts to be present locally and the report generation consistently fails. This is another bug from Bazel (I'll file another issue for this).

Last, I've added a remote-ci-debug config to print various different streams of data from different Bazel stages

Before (~1h30min):
Screenshot from 2021-09-20 22-48-51

After (~15min):
Screenshot from 2021-09-20 22-46-30

Result:
Screenshot from 2021-09-20 22-41-28

Risk Level: Low
Testing: See coverage workflow
Docs Changes: N/A
Release Notes: N/A

lfpino and others added 30 commits August 27, 2021 11:53
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
.bazelrc Outdated Show resolved Hide resolved
.bazelrc Show resolved Hide resolved
.github/workflows/coverage.yml Outdated Show resolved Hide resolved
WORKSPACE Show resolved Hide resolved
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
Signed-off-by: Luis Fernando Pino Duque <luis@engflow.com>
.github/workflows/coverage.yml Show resolved Hide resolved
Copy link
Contributor

@goaway goaway left a comment

Choose a reason for hiding this comment

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

Thank you!

@goaway goaway merged commit 4754148 into envoyproxy:main Sep 29, 2021
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.

None yet

3 participants