Commit 7503e47
CMake and Docker changes for thrift-python migration.
Summary:
Changes to support the thrift-py-deprecated to thrift-python migration in the OSS build environment.
Changes:
1. CMakeLists.txt — Complete migration to thrift-python:
- Remove include(FBThriftPyLibrary), all add_fbthrift_py_library() targets
- Add 15 add_fbthrift_python_library() targets with correct NAMESPACE
values matching mstch_python generator output paths
- Add all transitive thrift deps (fb303, common, mpls, Address, link,
prbs, io_stats, fboss, bcm_config, asic_config)
- Key insight: NAMESPACE must be <namespace_py3>.<basename> to match
the generator's output directory structure
2. Consumer cmake files — switch to add_fb_thrift_python_executable:
- AsicConfigV2ConfigCli.cmake (+ add wedge800bact.py to SOURCES)
- PlatformMappingGenUnitTest.cmake
- PlatformMappingGenNoRegressionTest.cmake
- PlatformMappingV2ConfigCli.cmake
3. Address.thrift —
- Replace `package;` with `package "facebook.com/network/address"`
- Remove thrift.AllowLegacyMissingUris (unnecessary with non-empty package)
- Required because struct "Address" collides with module name "Address"
when package is empty
4. CMakeLists.txt — Detect Python sysconfig -march flag and apply to
CMAKE_CXX_FLAGS to avoid F14LinkCheck ABI mismatch with folly-python.
5. run-getdeps.py — detect -march flag from Python sysconfig and propagate
to CXXFLAGS for all dependency builds. Required because Cython extensions
inherit -march=x86-64-v2 from Python 3.12 sysconfig on CentOS Stream 9,
but cmake does not.
8. Dockerfiles — install Cython, wheel, auditwheel, patchelf, setuptools,
filelock for building folly-python/fbthrift-python Cython extensions and
wheels. Install Python 3.12 as system default on CentOS (required >= 3.10).
OK : 6
FAILED : 0
SKIPPED : 0 TIMEOUT : 0
./bin/run_test.py link --agent-run-mode multi_switch --hw-agent-bin-path /opt/fboss/bin/fboss_hw_agent-sai_impl --config /opt/fboss/share/link_test_configs/montblanc.materialized_JSON --qsfp-config /opt/fboss/share/qsfp_test_configs/montblanc.materialized_JSON --filter AgentEnsembleQsfpFsdbTest.* 2>&1 | tee "coldboot_Test.log"
...
Removed '/etc/systemd/system/multi-user.target.wants/fboss_hw_agent_oss@0.service'.
Removed '/etc/systemd/system/fboss_hw_agent_oss@0.service'.
Cleaning up qsfp_service_oss
Cleaning up fsdb_service_oss
Cleaning up FBOSS HW Agent Service for index=0...
Running all tests took 0:12:14.758873 between 2026-03-31 14:07:59.506379 and 2026-03-31 14:20:14.265252
[ OK ] warm_boot.AgentEnsembleQsfpFsdbTest.tcvr (33887 ms)
[ OK ] warm_boot.AgentEnsembleQsfpFsdbTest.phy (33943 ms)
[ OK ] warm_boot.AgentEnsembleQsfpFsdbTest.portState (25910 ms)
[ OK ] warm_boot.AgentEnsembleQsfpFsdbTest.portStateWithResetHold (53598 ms)
OK : 4
FAILED : 0
SKIPPED : 0
TIMEOUT : 0
[root@fboss330347219.ash6 /opt/fboss]# ./bin/run_test.py sai_agent --agent-run-mode multi_switch --num-npus 2 --hw-agent-bin-path /opt/fboss/bin/fboss_hw_agent-sai_impl --filter '*AgentEmpty*:*Vlan*' --config /opt/fboss/share/hw_test_configs/montblanc.agent.materialized_JSON --qsfp-config /opt/fboss/share/qsfp_test_configs/montblanc.materialized_JSON --skip-known-bad-tests "brcm/13.3.0.0_dnx_odp/13.3.0.0_dnx_odp/jericho3" 2>&1 | tee "test_output_$(date +%Y%m%d_%H%M%S).log"
...
Failed to stop fboss_hw_agent@0.service: Unit fboss_hw_agent@0.service not loaded.
Failed to stop fboss_hw_agent_for_testing_0.service: Unit fboss_hw_agent_for_testing_0.service not loaded.
Removed '/etc/systemd/system/multi-user.target.wants/fboss_hw_agent_oss@0.service'.
Removed '/etc/systemd/system/fboss_hw_agent_oss@0.service'.
Failed to stop fboss_hw_agent@1.service: Unit fboss_hw_agent@1.service not loaded.
Failed to stop fboss_hw_agent_for_testing_1.service: Unit fboss_hw_agent_for_testing_1.service not loaded.
Removed '/etc/systemd/system/multi-user.target.wants/fboss_hw_agent_oss@1.service'.
Removed '/etc/systemd/system/fboss_hw_agent_oss@1.service'.
Cleaning up FBOSS HW Agent Service for index=0...
Cleaning up FBOSS HW Agent Service for index=1...
Running all tests took 0:02:01.342550 between 2026-03-27 15:48:31.906896 and 2026-03-27 15:50:33.249446
[ OK ] warm_boot.AgentEmptyTest.CheckInit (13025 ms)
[ OK ] warm_boot.AgentEmptyVoqTest.CheckInit (12780 ms)
OK : 2
FAILED : 0
SKIPPED : 0
TIMEOUT : 0
```
Reviewed By: joseph5wu
Differential Revision: D98059537
fbshipit-source-id: 849a9699d0f73fde30ecceb07f60e0a210d513441 parent b121eea commit 7503e47
2 files changed
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
160 | 163 | | |
161 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
162 | 169 | | |
163 | 170 | | |
164 | 171 | | |
| |||
205 | 212 | | |
206 | 213 | | |
207 | 214 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
212 | 218 | | |
213 | 219 | | |
214 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments