Repository navigation
ci/cto: Flatten compile-time options testing - #49161
Conversation
411b461 to
9d1a50d
Compare
9463c29 to
b40c173
Compare
6b5f21c to
0b0df52
Compare
96f4592 to
ec407bd
Compare
ec407bd to
0567854
Compare
|
tested in parallel in staging |
The check ran the whole tree twice in one job, each time with several options mixed in. It is now one `do_ci.sh` subtask and one Check/build job per option: - `cto.base`: the `compile-time-options` config plus jemalloc, all tests - `cto.noadmin`: admin disabled, all tests - `cto.gperftools`: the server tests and those that observe allocation - `cto.wamr`, `cto.wasmtime`: the wasm extension tests, and those that link the engine with the rest of Envoy (the server, dynamic modules) - `cto.asserts`, `cto.nolog`: the same targets as before `compile_time_options` (or `cto`) runs them all. Test runs use `--build_tests_only`. Jobs are enabled and path selected by `check-build-cto-<option>` run flags; a branch with none keeps the single `compile_time_options` job. Fixes AdminInstanceTest.MemoryTcmalloc under jemalloc. Signed-off-by: Ryan Northey <[email protected]>
be13a82 to
bf5d863
Compare
|
/retest flakey docker |
jwendell
left a comment
There was a problem hiding this comment.
Flattening into per-option jobs looks good. I checked the run-flag to matrix wiring (with the single-job fallback for older branches), that dropping docker-ci: true is a no-op on main (GITHUB_ACTIONS selects the ci image), that the wasm/allocator target lists cover the tests that depend on them, and that the jemalloc test fix matches Memory::Stats::dumpStats() (malloc_stats_print output). A few comments inline.
| - source/common/common/BUILD | ||
| - source/common/common/assert.cc | ||
| - source/common/common/assert.h | ||
| - source/server/**/* |
There was a problem hiding this comment.
This path filter seems too narrow. The point of this job is to build with -c opt while ASSERTs stay compiled in. That catches ASSERTs that refer to things only defined in debug builds (e.g. #ifndef NDEBUG members), and those ASSERTs can be anywhere in the code server_test links. A change to source/common/**, envoy/** or an extension wouldn't trigger the job, so the break would only appear after merge. assert.h itself includes envoy/common/logger.h and source/common/common/logger.h, which aren't listed either. Could this use the same source/** / envoy/** set as nolog?
There was a problem hiding this comment.
Agreed, done in 649f71b: cto.asserts now has the nolog set (api/**, envoy/**, source/**, third_party/**) plus test/**, as the tests it runs link test code too.
| # The options their test runs add. They build only what the tests depend on: targets under test/ | ||
| # that no test uses (benchmark, fuzz and tool binaries) are built by the rest of CI, and leaving | ||
| # them out here takes about a third off the analysis. | ||
| read -ra CTO_TEST_OPTIONS <<< "${CTO_TEST_OPTIONS:---build_tests_only}" |
There was a problem hiding this comment.
The comment says benchmark, fuzz and tool binaries "are built by the rest of CI", but not with --config=compile-time-options. Nothing builds them with google_grpc=disabled, hot_restart=disabled, deprecated_features=disabled or uhv any more. Is losing that coverage intended? If so, the comment should probably say so.
There was a problem hiding this comment.
Yes, intended: a target under test/ that no test depends on is not built with these options any more, only with the defaults elsewhere in CI. Everything the tests depend on still is. The comment now says that rather than implying equivalent coverage (649f71b).
| --@envoy//bazel:jemalloc=True \ | ||
| "${TEST_TARGETS[@]}" | ||
| ;; | ||
| cto.wamr|cto.wasmtime) |
There was a problem hiding this comment.
cto.wamr, cto.wasmtime and cto.gperftools ignore any targets passed on the command line. For example, ./ci/do_ci.sh cto.wamr //test/foo/... quietly runs the default list. Either honour explicit targets or note this in ci/README.md next to cto.base <test>.
There was a problem hiding this comment.
Honoured in 649f71b: tests given on the command line now replace the default lists for cto.wamr, cto.wasmtime and cto.gperftools. ci/README.md says cto.<option> <test>, and that cto.asserts and cto.nolog have fixed targets.
| # these tests under "-c opt" to save time in CI. | ||
| bazel_with_collection \ | ||
| test "${BAZEL_BUILD_OPTIONS[@]}" \ | ||
| --config=compile-time-options \ |
There was a problem hiding this comment.
Nit: cto.asserts hard-codes --config=compile-time-options instead of using CTO_OPTIONS, so overriding that variable has no effect on this job. Since it needs -c opt anyway, maybe a short comment saying it intentionally skips CTO_OPTIONS?
There was a problem hiding this comment.
Changed in 649f71b to use CTO_OPTIONS followed by -c opt, which replaces any -c in it, so the override applies here too.
- widen the `cto.asserts` path selection to the source and test trees - say that test binaries no test uses are no longer built with the options - tests given on the command line replace the wamr, wasmtime and gperftools test lists - `cto.asserts` uses `CTO_OPTIONS` Signed-off-by: Ryan Northey <[email protected]>
The check ran the whole tree twice in one job, each time with several options mixed in. It is now one `do_ci.sh` subtask and one Check/build job per option: - `cto.base`: the `compile-time-options` config plus jemalloc, all tests - `cto.noadmin`: admin disabled, all tests - `cto.gperftools`: the server tests and those that observe allocation - `cto.wamr`, `cto.wasmtime`: the wasm extension tests, and those that link the engine with the rest of Envoy (the server, dynamic modules) - `cto.asserts`, `cto.nolog`: the same targets as before `compile_time_options` (or `cto`) runs them all. Test runs use `--build_tests_only`. Jobs are enabled and path selected by `check-build-cto-<option>` run flags; a branch with none keeps the single `compile_time_options` job. Fixes AdminInstanceTest.MemoryTcmalloc under jemalloc. Requires envoyproxy#49170, which this is stacked on. --------- Signed-off-by: Ryan Northey <[email protected]>
The check ran the whole tree twice in one job, each time with several options mixed in. It is now one `do_ci.sh` subtask and one Check/build job per option: - `cto.base`: the `compile-time-options` config plus jemalloc, all tests - `cto.noadmin`: admin disabled, all tests - `cto.gperftools`: the server tests and those that observe allocation - `cto.wamr`, `cto.wasmtime`: the wasm extension tests, and those that link the engine with the rest of Envoy (the server, dynamic modules) - `cto.asserts`, `cto.nolog`: the same targets as before `compile_time_options` (or `cto`) runs them all. Test runs use `--build_tests_only`. Jobs are enabled and path selected by `check-build-cto-<option>` run flags; a branch with none keeps the single `compile_time_options` job. Fixes AdminInstanceTest.MemoryTcmalloc under jemalloc. Requires envoyproxy#49170, which this is stacked on. --------- Signed-off-by: Ryan Northey <[email protected]>
The check ran the whole tree twice in one job, each time with several options mixed in. It is now one `do_ci.sh` subtask and one Check/build job per option: - `cto.base`: the `compile-time-options` config plus jemalloc, all tests - `cto.noadmin`: admin disabled, all tests - `cto.gperftools`: the server tests and those that observe allocation - `cto.wamr`, `cto.wasmtime`: the wasm extension tests, and those that link the engine with the rest of Envoy (the server, dynamic modules) - `cto.asserts`, `cto.nolog`: the same targets as before `compile_time_options` (or `cto`) runs them all. Test runs use `--build_tests_only`. Jobs are enabled and path selected by `check-build-cto-<option>` run flags; a branch with none keeps the single `compile_time_options` job. Fixes AdminInstanceTest.MemoryTcmalloc under jemalloc. Requires #49170, which this is stacked on. --------- Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the target names of envoyproxy#49188), as on release/v1.38 and release/v1.39, so that each compile-time option runs as its own job and a failure can be seen per option. CI's workflows run from main and set the jobs from the `check-build-cto-*` run flags in this branch's `.github/config.yml`. This branch differs from the later ones, so the targets do too: - there is no jemalloc, and `compile-time-options` already builds with gperftools and zlib-ng, so there are no `cto.jemalloc` or `cto.gperftools` targets - `cto.wamr` and `cto.noadmin` run the whole tree, as the two whole-tree runs of the previous target did; the others run the tests their option can affect - `cto.noadmin`, `cto.asserts` and `cto.nolog` build with wasmtime, as before - `cto.zlib_ng` keeps this branch's check of zlib-ng without the rest of the options - the targets that cannot build with BoringSSL FIPS are left out, as before Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch (cherry picked from commit 3b16c1b) Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the naming from envoyproxy#49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch (cherry picked from commit 3b16c1b) Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the target names of envoyproxy#49188), as on release/v1.38 and release/v1.39, so that each compile-time option runs as its own job and a failure can be seen per option. CI's workflows run from main and set the jobs from the `check-build-cto-*` run flags in this branch's `.github/config.yml`. This branch differs from the later ones, so the targets do too: - there is no jemalloc, and `compile-time-options` already builds with gperftools and zlib-ng, so there are no `cto.jemalloc` or `cto.gperftools` targets - `cto.wamr` and `cto.noadmin` run the whole tree, as the two whole-tree runs of the previous target did; the others run the tests their option can affect - `cto.noadmin`, `cto.asserts` and `cto.nolog` build with wasmtime, as before - `cto.zlib_ng` keeps this branch's check of zlib-ng without the rest of the options - the targets that cannot build with BoringSSL FIPS are left out, as before (cherry picked from commit 3b16c1b) Signed-off-by: Ryan Northey <[email protected]>
Port of #49161 (with the naming from #49188) for this branch. `compile_time_options` ran everything in one job, and exited after the wamr run: the jemalloc, admin-disabled, release-assert and logging-disabled runs were never executed here. Each is now its own `cto.*` target and, through the `check-build-cto-*` run flags, its own job. Differences from main: - the wasm engine is selected with `--define wasm=`, as elsewhere on this branch - `cto.wasmtime` is kept but commented out, in `.github/config.yml` and in the `cto.all` list, until the wasmtime tests are re-enabled here - the workflow changes are not needed: the workflows run from main and read the run flags from this branch (cherry picked from commit 3b16c1b) Signed-off-by: Ryan Northey <[email protected]>
Port of envoyproxy#49161 (with the target names of envoyproxy#49188), as on release/v1.38 and release/v1.39, so that each compile-time option runs as its own job and a failure can be seen per option. CI's workflows run from main and set the jobs from the `check-build-cto-*` run flags in this branch's `.github/config.yml`. This branch differs from the later ones, so the targets do too: - there is no jemalloc, and `compile-time-options` already builds with gperftools and zlib-ng, so there are no `cto.jemalloc` or `cto.gperftools` targets - `cto.wamr` and `cto.noadmin` run the whole tree, as the two whole-tree runs of the previous target did; the others run the tests their option can affect - `cto.noadmin`, `cto.asserts` and `cto.nolog` build with wasmtime, as before - `cto.zlib_ng` keeps this branch's check of zlib-ng without the rest of the options - the targets that cannot build with BoringSSL FIPS are left out, as before (cherry picked from commit 3b16c1b) Signed-off-by: Ryan Northey <[email protected]>
The check ran the whole tree twice in one job, each time with several options mixed in. It is now one
do_ci.shsubtask and one Check/build job per option:cto.base: thecompile-time-optionsconfig plus jemalloc, all testscto.noadmin: admin disabled, all testscto.gperftools: the server tests and those that observe allocationcto.wamr,cto.wasmtime: the wasm extension tests, and those that link the engine with the rest of Envoy (the server, dynamic modules)cto.asserts,cto.nolog: the same targets as beforecompile_time_options(orcto) runs them all. Test runs use--build_tests_only.Jobs are enabled and path selected by
check-build-cto-<option>run flags; a branch with none keeps the singlecompile_time_optionsjob.Fixes AdminInstanceTest.MemoryTcmalloc under jemalloc.
Requires #49170, which this is stacked on.