From ce4ad8d95435bc49b3a8621315179f02961cdf99 Mon Sep 17 00:00:00 2001 From: Junjie Wu Date: Thu, 24 Oct 2024 16:22:04 -0700 Subject: [PATCH] [antlir2][vm] disable more dev modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Cat and mouse. Let's not lose. Context: https://fb.workplace.com/groups/td.users/posts/3452228681739793?comment_id=3458110481151613 Test Plan: CI ``` $ arc citrace labels -p fbcode fbcode//schedulers/tangram/agent/tests/sudo:secondary_container_vm_tests ╔═══ fbcode//schedulers/tangram/agent/tests/sudo:secondary_container_vm_tests ══ ║ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CI Labels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║ ┃ ▫ fbcode//schedulers/tangram/agent/tests/sudo:secondary_container_vm_tests ║ ┃ ├── Package labels: ║ ┃ │ ├── ci:diff:linux:dev ║ ┃ │ ├── ci:continuous:linux:dev ║ ┃ │ ├── ci:continuous:linux:opt ║ ┃ │ ├── ci:diff:linux:collect_coverage ║ ┃ │ ├── ci:continuous:linux:collect_coverage ║ ┃ │ ├── ci:continuous:linux:fbcode//mode/dev-tsan ║ ┃ │ └── ci:continuous:linux:fbcode//mode/opt-tsan ║ ┃ └── Target labels: ║ ┃ ├── uses_sudo ║ ┃ ├── heavyweight ║ ┃ ├── ci:overwrite ║ ┃ ├── ci:diff:linux:opt ║ ┃ ├── ci:continuous:linux:opt ║ ┃ ├── ci:continuous:linux:opt ║ ┃ ├── ci:diff:linux:collect_coverage ║ ┃ ├── ci:continuous:linux:collect_coverage ║ ┃ ├── ci:continuous:linux:fbcode//mode/opt-tsan ║ ┃ └── ci:continuous:linux:fbcode//mode/opt-tsan ``` Differential Revision: D64915273 fbshipit-source-id: 522cde1c569182bd014835614d6ac9ec52d307ce --- .../antlir2/antlir2_vm/bzl/disable_dev_mode.bzl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/antlir/antlir2/antlir2_vm/bzl/disable_dev_mode.bzl b/antlir/antlir2/antlir2_vm/bzl/disable_dev_mode.bzl index bca910de772..e5c2b1fe7ad 100644 --- a/antlir/antlir2/antlir2_vm/bzl/disable_dev_mode.bzl +++ b/antlir/antlir2/antlir2_vm/bzl/disable_dev_mode.bzl @@ -13,8 +13,24 @@ def disable_dev_mode(labels: list[str]) -> list[str]: """ labels += ci.labels( ci.replace({ + # Override tags with default dev mode. This is lossy, because we + # will drop all other modes but opt for simplicity. The goal of VM + # tests isn't to test all build modes. We just need that one mode + # works and is fast enough for the VM. ci.linux(ci.x86_64()): ci.linux(ci.x86_64(ci.opt())), ci.linux(ci.aarch64()): ci.linux(ci.aarch64(ci.opt())), + # ci.mode() seems to be rather diverse. Try covering everything + # starting with dev. If there is a matching opt mode, use that. Or + # we use the vanilla opt. + ci.linux(ci.mode("fbcode//mode/dev-asan")): ci.linux(ci.mode("fbcode//mode/opt-asan")), + ci.linux(ci.mode("fbcode//mode/dev-tsan")): ci.linux(ci.mode("fbcode//mode/opt-tsan")), + ci.linux(ci.mode("fbcode//mode/dev-ubsan")): ci.linux(ci.mode("fbcode//mode/opt-ubsan")), + # Not sure if the link group issue we had is specific to dev + # (D51891046). Give opt-lg a chance. + ci.linux(ci.mode("fbcode//mode/dev-lg")): ci.linux(ci.mode("fbcode//mode/opt-lg")), + ci.linux(ci.mode("fbcode//mode/dev-cov")): ci.linux(ci.opt()), + ci.linux(ci.mode("fbcode//mode/dev-nosan")): ci.linux(ci.opt()), + ci.linux(ci.mode("fbcode//mode/dev-nosan-lg")): ci.linux(ci.opt()), }), fbcode_ci.use_opt_instead_of_dev(), )