Commit ed7b414
Sync fboss common.thrift into BGP OSS build via ShipIt pathmap
Summary:
BGP++'s OSS build (shipped to `github.com/facebook/BGP`) runs its own thrift compile of `rib_policy.thrift`, whose `include "configerator/structs/neteng/fboss/thrift/common.thrift"` (restored in the child diff, along with the `fboss_common.AllowSkipThriftCow` annotations) must resolve from BGP++'s OSS source root. The standalone getdeps build could not resolve it: FBOSS installs the compiled C++ for `common.thrift` (`common_types.h` under `include/`, symbols in `cfgr_fboss_common_cpp2`, both already consumed by BGP++) but not the raw `.thrift` schema.
`common.thrift` cannot be vendored as a repackaged copy the way BGP++'s other OSS schemas are. thrift-cow detects `AllowSkipThriftCow` by the annotation's resolved C++ type (`facebook::neteng::fboss::common::AllowSkipThriftCow`), which is derived from the thrift `package`, so keeping the package identical to FBOSS's is required for the annotation to be recognized. But a committed copy carrying that same `package` duplicates the implicit Thrift URI `facebook.com/neteng/fboss/common/AllowSkipThriftCow` already declared by the configerator source, which the land-blocking `thrift-duplicate-uri` linter rejects.
So this mirrors exactly what FBOSS does for the same file: sync the single configerator source into the OSS tree rather than committing a second copy.
- `manifests/bgp`: add a `[shipit.pathmap]` entry `fbcode/configerator/structs/neteng/fboss/thrift = configerator/structs/neteng/fboss/thrift` (matching `manifests/fboss`), so `getdeps` materializes `common.thrift` into BGP++'s OSS tree at fetch/ship time. The unrelated schemas in that dir are stripped so only `common.thrift` ships.
- `bgp_oss_build.bzl`: the `bgp-oss-build` CI builds from a staged `bgp_src/` (not from the pathmap), so stage `common.thrift` from the configerator source there too.
No file is committed under `public_tld`, so there is no duplicate URI and no `validate_cmake_sync` change is needed (`common.thrift` has no `add_fbthrift_cpp_library()` target; its C++ comes from `cfgr_fboss_common_cpp2`).
Replaces the previous version of this diff, which committed a vendored copy of `common.thrift` that tripped `thrift-duplicate-uri`. Per review feedback from joseph5wu (use the shipit option like FBOSS), this keeps the change on the BGP++ side and leaves FBOSS's install surface untouched.
Reviewed By: joseph5wu
Differential Revision: D111074394
fbshipit-source-id: 4802eeb380f44d2eb60867df03317a12ef21757b1 parent a363b0c commit ed7b414
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments