1
0
mirror of https://github.com/facebook/proxygen.git synced 2026-10-24 01:33:54 +03:00
Commit Graph

15437 Commits

Author SHA1 Message Date
generatedunixname1899117597419293
887fb6faec fbsource//xplat/proxygen:proxygen-httpserver-full
Reviewed By: hanidamlaj

Differential Revision: D120993922

fbshipit-source-id: 1dd1247eae71097b8481f9b6ac23bd8b31cb0654
2026-09-21 16:36:49 -07:00
generatedunixname898294613133534
bc63c61d42 Fix CQS signal facebook-hte-CArray in xplat/proxygen/lib/utils
Differential Revision: D120970279

fbshipit-source-id: 048724a6127ad9b7609f603f11c9672d09da6834
2026-09-21 14:25:11 -07:00
Sujay Patel
8ec08dceb0 HQ codecs: log parse-error context
Summary:
Same attribution for HTTP/3, and the largest gap of the three.
`HQFramedCodec::checkConnectionError` built every frame-layer `HTTPException`
from the hardcoded literal `Connection error`, so `HQControlCodec`'s five
indistinguishable `HTTP_FRAME_UNEXPECTED` returns and `HQFramer`'s message-less
returns all collapsed into one string. Only the numeric HTTP/3 code
differentiated them.

  Connection error [File]=HQControlCodec.cpp
  [Context]=settings-not-first-frame

The frame loop lives in the base class while the checks live in the derived
codecs, so `setParseErrorContext` takes the caller's file and the origin points
at the real rejecting file rather than the base. The base clears the context
before `checkFrameAllowed` and falls back to a generic reason only when the
derived codec named none, so a specific attribution is never overwritten.

Instrumented `HQFramedCodec`, `HQControlCodec` and `HQStreamCodec`.

Reviewed By: afrind

Differential Revision: D114943895

fbshipit-source-id: 47123a6e08d1ecca411f505f500f3bee3f285680
2026-09-21 11:57:47 -07:00
Michel Lind
e1aae3eb6e Drop unused mvfst dep from mcrouter manifest
Summary:
`mcrouter`'s buck targets, sources, and CMake `find_package` list never reference `mvfst`. The single hit is a test string literal (`set_umember3() = "mvfst"`) exercising serialization round-trips — pure test data, no headers used, no libraries linked, and it would pass identically with any other string.

So the manifest's direct `mvfst` entry is dropped. Note: `mvfst` stays in the resolved closure transitively via `fbthrift`; this changes declared direct deps only, not what gets built.

Reviewed By: bigfootjon

Differential Revision: D121020246

fbshipit-source-id: d9fe8f7934af7cdcc2d8be271c4151f246ba75c0
2026-09-21 11:40:26 -07:00
generatedunixname1899117597419293
81956da22f fbsource//xplat/proxygen:http2_codec
Reviewed By: hanidamlaj

Differential Revision: D120685213

fbshipit-source-id: 9002ff5a89a4a38bc69b9e60a0b570254b2a72e2
2026-09-21 11:04:22 -07:00
meta-codesync[bot]
479eb55741 Re-sync with internal repository (#645)
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.

fbshipit-source-id: e24e32453662b79b80308343ceefcb628225c94c

Co-authored-by: Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
2026-09-21 10:51:55 -07:00
Siva Muthusamy
0c172c5eec Change default SAI version to 1.19.0 for OSS
Summary:
Bump the OSS/getdeps default SAI version to 1.19.0 (libsai manifest, CMakeLists, run-getdeps.py, build-helper.py, fboss_oss_build.bzl, container docs).

Sites updated:
  - opensource/fbcode_builder/manifests/libsai: url, sha256, subdir
  - fboss/github/CMakeLists.txt: default SAI_VERSION + status message
  - fboss/oss/scripts/run-getdeps.py: new SAI_VERSION_SHAS entry
  - fboss/oss/scripts/build-helper.py: url + sha tables, choices, const/default, help
  - fboss/facebook/oss_ci/fboss_oss_build.bzl: DEFAULT_SAI_VERSION + its docstring
  - fboss/github/docs/static/code_snips/build_helper.sh: default text + supported list

The v1.19.0 tarball sha256 (199d2cd32408b6470ce0c43beee660cc468e29e72921f1e93e64d4a8eb80246a)
was obtained by downloading the release tarball and hashing it; it is used
identically in all three places that record it.

Building_FBOSS_on_containers.md carries no SAI version reference, so it needed
no change despite being listed in the integration runbook.

Reviewed By: ashutoshgrewal, shri-khare

Differential Revision: D120953509

fbshipit-source-id: 01072090c5844062d31f4ec2ab4aff6ed421d9b9
2026-09-21 10:13:41 -07:00
Sujay Patel
df727477da HTTP2Codec: log parse-error context
Summary:
Same attribution for HTTP/2. `checkConnectionError` reported every framer
failure as the single literal `Connection error`, so roughly thirty distinct
rejection paths in `HTTP2Framer` were indistinguishable in `debug_data`.

Frame parsing now records a reason via `setParseErrorContext`:

  GOAWAY error: excessively large frame len=32768
  [File]=HTTP2Codec.cpp [Context]=frame-exceeds-max-size

Reviewed By: afrind

Differential Revision: D114943825

fbshipit-source-id: e2e0ae29fed562b96e8fabaeb38641eef558cc62
2026-09-21 10:02:08 -07:00
Open Source Bot
d1a1362316 Updating hashes
Summary:
GitHub commits:

b288e1d2b3
4db9ccba8f
4ce7d8a7b4
de5b6be521
a5af4bf685
3fc28d32f1
c54c04e4a5
ff45f296d2
679a7857dd
37f652ce85
c75e42928f

Reviewed By: bigfootjon

fbshipit-source-id: e24e32453662b79b80308343ceefcb628225c94c
2026-09-21 09:33:41 -07:00
Open Source Bot
3fc28d32f1 Updating hashes
Summary:
GitHub commits:

1228b018f2
fc45cc7de2
4a74ebee04
e2be5ec2f1
7737b3abdb
5a19c9e69e
6fe7207bff
712601ccf5
4f973a4f95
d1effb5221
a02b2258b7
4cd2dd8d69

Reviewed By: bigfootjon

fbshipit-source-id: 5988c3d19dc37f537436aa22fd10d49a8131670d
v2026.09.21.00
2026-09-20 09:32:51 -07:00
Open Source Bot
6fe7207bff Updating hashes
Summary:
GitHub commits:

105165334c
e9800eb0c9
fb4ad9ee85
e480eec7f3
839090a65e
e3371863ee
353ba5ed48
792b485b60
fb39d25785
5674a6a016
292ade5a2d
4ff6e5e7b8
1dbe77afa7

Reviewed By: bigfootjon

fbshipit-source-id: 292683cd7dd884a3e11070ed72322da4c9e3fb0b
2026-09-19 09:34:07 -07:00
Keivaun Waugh
792b485b60 Disable server push for upstream coro sessions
Summary: Change `HTTPCoroSession` so it only enables push if that was specified in the construction settings.

Reviewed By: lnicco, hanidamlaj

Differential Revision: D120591826

fbshipit-source-id: 911e12cce94640e14059f64d62599f4d3b4bd5da
2026-09-18 20:36:06 -07:00
Max Noormohammadpour
e5716d4fd1 Give the GitHub Actions job a timeout somebody chose
Summary:
## What

Adds a `[github.actions]` section to `opensource/fbcode_builder/manifests/packsim`
setting `timeout_minutes = 180`, and regenerates
`ai_simulation/.github/workflows/getdeps_linux.yml` from it.

## Why

The job had 60 minutes, which is the workflow generator's fallback
(`workflow_generator.py`: `timeout_minutes = gh("timeout_minutes") or "60"`) and
not a figure anyone picked for this project. One run has to build boost,
openssl, folly and fbthrift from source, then compile 187 test executables, then
run them -- and each test process defaults to 4 PDES worker threads in the
open-source build while ctest is already running jobs in parallel, so the test
phase oversubscribes a standard two-core runner several times over.

180 is a ceiling, not an estimate, and the manifest comment says so. Nothing is
known about the real wall clock because the workflow has never executed: nothing
has been pushed to the repository yet, and it only triggers on push and pull
request against `main`. Its first run will be its first measurement. A job that
is killed at 60 minutes reports as a red badge on the repository's front page
and tells you nothing about why; one that finishes in 70 tells you the number to
set. Lower it once a green run has reported one.

Deliberately not changed: the runner size. `--cpu-cores` would also help the
oversubscription, but that is a standing cost decision rather than a one-off
ceiling, and it belongs with whoever owns the project's CI budget.

## Why the manifest and not the workflow

The workflow file carries an `generated by getdeps.py` header and is rebuilt by
`opensource/fbcode_builder/getdeps/facebook/update-all-github-actions.sh`, which
already has an entry for packsim. Editing the YAML directly would be reverted by
the next sweep; `[github.actions]` keys in the manifest are the supported way to
change it, and they survive.

Differential Revision: D120642627

fbshipit-source-id: 4ea8d4a5bcc8533e6eec0cfb41dde63871c72f9b
2026-09-18 19:05:43 -07:00
Hani Damlaj
860259bf47 WtStreamManagerTest refactor recently added test
Summary:
a test was recently added, this simply refactors it to use the test fixture to simplify code

___

Differential Revision: D120731929

fbshipit-source-id: 5f0910f7ab6ee9d32168a3b3b9c371c7754f3caf
2026-09-18 12:11:14 -07:00
Sujay Patel
b675499f66 HTTP1xCodec: log parse-error context
Summary:
Revproxy codec errors reach the `proxygen_codec_errors` Scuba dataset via
`CodecErrorFilter`, whose `debug_data` column is `HTTPException::what()`.
For HTTP/1, the generic `http_parser` callback failure does not identify which
branch rejected the message.

Record a static reason for ingress parser callback failures and append it to
the parser error. Header-value failures also use
`CodecUtil::validateHeaderValueDetail` from the parent diff to include the
header name and rejected validation rule.

Reviewed By: hanidamlaj

Differential Revision: D120020224

fbshipit-source-id: 0664905ae48263552cde1ed33ddadc29463287d2
2026-09-18 11:46:47 -07:00
Open Source Bot
8b5f6e9235 Updating hashes
Summary:
GitHub commits:

cb0a0efc50
6ff25fd583
48e82a8722
a8ed87c07c
1e32c44f13
8326af13eb
19f33073dc
2f2a3c50dc
ee04a94ae0
1023c7ae31
52fbcdc365
0487fbf087

Reviewed By: bigfootjon

fbshipit-source-id: 2c8899aa419ca977632da5b784b2c49cb4fafe38
2026-09-18 09:34:21 -07:00
Michel Lind
19f33073dc getdeps: select EL-specific manifest sections by distro_family
Summary:
Enable getdeps-based builds on every Enterprise Linux distro (RHEL, AlmaLinux, Rocky Linux, CentOS Stream) by selecting EL-specific manifest sections with distro_family instead of individual distro names.

The manifests that mean "any Enterprise Linux 9" (or 8) spell it as distro=centos_stream, because CentOS Stream is what CI runs. That never matched AlmaLinux or Rocky, and after the previous change gave RHEL its own distro name it would not match RHEL either. The per-distro enumeration is the bug class itself: each file was incomplete in a different way (libaio hand-listed alma+rocky but missed RHEL; everything else listed only centos_stream), so the fix has to apply everywhere the pattern occurs -- splitting it per project would just re-create the drift. Every project touched here builds against the same Folly-stack toolchain (gcc toolsets via the shared gcc12/gcc14 manifests, clang19, python3.12 for sapling), so distro coverage has to move together. The most consequential case is cachelib's gcc-toolset-14: without it an EL 9 build uses the default GCC 11 and fails to compile C++20 code although the toolset is right there in the repositories.

Rewrite those sections with the distro_family variable introduced in the previous change, preserving each selector's meaning while extending it to the whole family:

```
- all(distro=centos_stream,distro_vers=9)  -> all(distro_family=rhel,distro_vers=9)
  cachelib, gcc12, gcc14, openr, python, python-setuptools,
  rebalancer, rebalancer-explorer
- all(distro=centos_stream,distro_vers=8)  -> all(distro_family=rhel,distro_vers=8)
  boost, boost-python
- not(all(any(distro=centos_stream,distro=centos),distro_vers=8))
                                            -> not(all(distro_family=rhel,distro_vers=8))
  libmnl
- not(any(all(distro=centos,distro_vers=8),all(distro=centos_stream,distro_vers=9)))
                                            -> not(all(distro_family=rhel,any(distro_vers=8,distro_vers=9)))
  lz4, lz4-python
- rpms.any(distro=centos_stream,...,distro=fedora) -> rpms
  libaio, numa (every rpm distro ships libaio-devel and numactl-devel)
- rpms.distro=centos_stream                -> rpms.distro_family=rhel
  libaio-python
```

"centos" was the old CentOS Linux 8 name and folds into the family. The wider exclusions this produces (e.g. lz4-static now also excluded on centos_stream 8 and centos 9) only touch EOL or practically unused combos. No manifest still selects on an individual EL distro name. libaio-devel and numactl-devel are confirmed present on RHEL, CentOS and Fedora, the full rpm universe getdeps targets.

This must land after the distro_family change: the expression parser rejects unknown selector variables, so on a getdeps without it these manifests fail to load.

Tested with both changes applied: every manifest passes validate-manifest, and `install-system-deps --recursive --dry-run --os-type linux --distro rhel --distro-version 9 cachelib` now yields the same package set as --distro centos_stream, including gcc-toolset-14, libaio-devel and numactl-devel, where before it lacked all three. The openr, rebalancer and rebalancer-explorer hunks are the same mechanical rewrite but those projects were not built here.

**Depends on https://github.com/facebook/CacheLib/issues/495** (`distro_family`): must land after it, since the expression parser rejects unknown selector variables. Submitted separately so each can be reviewed on its own; the two are otherwise independent of https://github.com/facebook/CacheLib/issues/494.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/496

Reviewed By: likewhatevs

Differential Revision: D120501944

Pulled By: michel-slm

fbshipit-source-id: fdfc8b65770736ed190223df5e4dc2d0b2b417ba
2026-09-18 07:35:56 -07:00
Chen Li (Efficiency)
f5d54ce2dd Add plain-ASCII fast path to CodecUtil::validateHeaderValue on HPACK decode path
Reviewed By: yfeldblum

Differential Revision: D111136730

fbshipit-source-id: 30da0bc5fea87a52cdfc6e8e77080f135688fecb
2026-09-18 06:47:04 -07:00
Joseph Beshay
d1bad34f59 Handle partial SSL writes
Summary:
# Context
`CoroSSLTransport::writeImpl` assumes a successful `SSL_write` consumes the entire input buffer. `SSL_MODE_ENABLE_PARTIAL_WRITE` permits positive partial returns, so writes larger than one TLS record can hit a fatal `XCHECK`.

# Mitigation
Advance the input range after each successful write and continue until all bytes are consumed. Preserve the original size for `WriteInfo` and add a regression covering a 64 KiB write with partial-write mode enabled.

Reviewed By: hanidamlaj, sandarsh

Differential Revision: D120634805

fbshipit-source-id: 3d0daf65f924c26d3c388d68503471c5105c67fe
2026-09-18 05:02:13 -07:00
Hani Damlaj
125d6f33c1 erase WritableStream on ::finish
Summary:
The goal here is just safety, when the WriteHandle is done we should unconditionally erase the handle from WritableStreams in ::finish

This is similar to what we currently do with connFcBlockedStreams & finOnlyStreams

Reviewed By: SUJP123

Differential Revision: D120439884

fbshipit-source-id: b29723ff99446789152037b93ec1cb3cbea3fcc5
2026-09-17 20:28:51 -07:00
Nikhil Dixit Limaye
7a5b35b8b9 Use conventional OSS repository layout
Summary: Export public build scaffolding at the repository root and place the implementation under `socket-lb/`, matching Katran and other Meta OSS projects. Keep the top-level CMake and build scripts usable from both the internal and exported layouts, and update public build instructions accordingly.

Reviewed By: p-shah256

Differential Revision: D118875318

fbshipit-source-id: 996c0735d98fa093aa01bf08fce590e9e072d8f5
2026-09-17 20:05:17 -07:00
Jorge Lopez Silva
5b759887cb Accept PUSH_PROMISE before response headers
Summary:
During TGC CONNECT canary validation, Cloudflare-hosted domains consistently failed over HTTP/2 with `Invalid ingress state transition, state=0, event=3`, while HTTP/1.1 worked. We reproduced this on `fwdproxy.devtest.ftw` through Fastly, Cloudflare, and direct CONNECT; a libcurl control succeeded. Representative URLs included:

- `https://rohitai.com/blog/atria-dawn-preview-open-weight-agentic-model`
- `https://www.thescore.com/nfl/news/3600712/browns-place-rb-sampson-on-ir-with-knee-injury`
- `https://app.warehouserunner.com/costco/1748800-casper-cooling-select-12-memory-foam-queen-mattress`
- `https://www.reflector.com/news/national/kaplan-fox-notifies-equipmentshare-com-inc-nasdaq-eqpt-investors-of-a-pending-securities/article_3f5265d9-de9a-508d-8928-72edfad09e0a.html`

TGC instrumentation showed Cloudflare sending a legal `PUSH_PROMISE` before the parent response headers. `HTTPStreamSource` classified push promises as body events, so the ingress state machine rejected this ordering while still in `Start`. Add an explicit `onPushPromise` ingress event that preserves the current response state, and queue early pushes without waking a coroutine waiting for response headers.

Reviewed By: mjoras

Differential Revision: D120570583

fbshipit-source-id: 1952c0f30f724560ef7d6baeeaa9faf14e5b4259
2026-09-17 18:25:16 -07:00
Michel Lind
6bd0ee43ad getdeps: stop mapping liboqs to Fedora's liboqs-devel
Summary:
Fedora retired liboqs in Fedora 45 ("Obsoleted by openssl 3.5": OpenSSL 3.5 ships ML-KEM natively), so the `[rpms.distro=fedora]` mapping added in facebook/CacheLib#488 only resolves on Fedora 44 and older. On Rawhide a build with --allow-system-packages that generates its BuildRequires from the manifests fails at dependency resolution with "No match for argument: liboqs-devel". fizz still hard-depends on liboqs, so let getdeps build it from source (or the vendor tree) on Fedora as it does everywhere else.

Found while building the Fedora cachelib package on Rawhide with BuildRequires generated from the manifests; the mapping was added in https://github.com/facebook/CacheLib/issues/488 and only checked against Fedora 44 at the time. CentOS Stream 10 does ship liboqs-devel, so a `distro_family=rhel` mapping for EL 10 could be considered separately once https://github.com/facebook/CacheLib/issues/495 lands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/497

Reviewed By: likewhatevs

Differential Revision: D120517415

Pulled By: michel-slm

fbshipit-source-id: 1386a4418536d59a36feffb24f85f48cf19f11f3
2026-09-17 09:46:23 -07:00
Michel Lind
ccf888f9fb getdeps: add distro_family and recognise Red Hat Enterprise Linux
Summary:
get_linux_type() derives the distro name from NAME in /etc/os-release, which on Red Hat Enterprise Linux yields "red_hat_enterprise". Nothing knows that name: HostType.get_package_manager() returns None for it, so --allow-system-packages silently satisfies nothing and every dependency is built from source, and the manifests with distro=centos_stream selectors do not apply either. RHEL's VERSION_ID also carries a minor ("9.8"), as do AlmaLinux's and Rocky's, so even a matching distro would miss the distro_vers=9 selectors written for CentOS Stream.

This matters for EPEL: Fedora's Koji builds EPEL 9 packages in a buildroot with redhat-release (real RHEL), while EPEL 10 buildroots and the local mock configs use centos-stream-release. A getdeps-based EPEL 9 build therefore behaves differently in Koji than in local mock. Nobody noticed because getdeps has not been used for distro packaging before and RHEL is rare among people building from source.

Rather than pretend RHEL is CentOS Stream, model what the manifests actually mean. Following Chef's platform_family, introduce a distro_family alongside distro: "rhel" for rhel, centos, centos_stream, alma and rocky; "fedora"; "debian" for debian, ubuntu, pop!_os and mint; "arch". Fedora is deliberately its own family, unlike Ansible's os_family which folds it into RedHat: its base repositories carry many dependencies that the EL family only has in EPEL or not at all (glog, gflags, fmt, fast_float, googletest, benchmark, liboqs, jq), zlib is zlib-ng-compat there, and CentOS Stream 9 needs gcc-toolset; nineteen manifest sections already select on exactly that difference.

Concretely: - RHEL reports distro "rhel", the same short name as its os-release ID; - within the rhel family distro_vers is the major version only, so RHEL 9.8, Alma 9.6 and Rocky 9.6 all match distro_vers=9 as CentOS Stream 9 does; Fedora and Ubuntu keep their full versions; - distro_family is available to manifest selectors and drives get_package_manager(), which now returns rpm for the whole rhel family; - `install-system-deps --distro` accepts rhel; - os-release parsing moves into parse_os_release() so it can be unit tested.

Existing selectors keep their meaning: distro=centos_stream still matches only CentOS Stream. A follow-up will switch the sections that mean "any EL 9" to distro_family=rhel so that RHEL, Alma and Rocky pick up gcc-toolset, libaio and numactl too. Until then a RHEL host already gains every plain [rpms] mapping and the not(distro=fedora) ones.

Tested: `install-system-deps --recursive --dry-run --os-type linux --distro rhel --distro-version 9 cachelib` now produces a dnf command (previously "I don't know how to install any packages on this system"), and unit tests cover the os-release parsing for Fedora, CentOS Stream, RHEL, Alma, Rocky and Ubuntu plus the family and package-manager mapping. Verified against synthetic os-release contents, not a live RHEL host.

A follow-up PR will switch the manifest selectors that mean "any EL 9" (gcc-toolset, libaio, numactl and friends) to `distro_family=rhel`; it must land after this one because the expression parser rejects unknown selector variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/495

Reviewed By: likewhatevs

Differential Revision: D120501703

Pulled By: michel-slm

fbshipit-source-id: f24b01e46207a08ca09b9f09500ba0fb78a502fa
2026-09-17 09:44:23 -07:00
Michel Lind
21d076fe8b getdeps: satisfy sparsemap from tsl-sparse-map-devel where packaged
Summary:
Fedora and EPEL package sparse-map as tsl-sparse-map-devel: 0.7.0 on F45 and Rawhide (stable since 2026-09-17), 0.6.2 on F44 and EPEL 9, and an EPEL 10 build is under way. With --allow-system-packages this takes sparsemap out of the set of projects built from source, leaving only the Meta stack (folly, fizz, wangle, mvfst, fbthrift) for a vendored distro build. A plain `[rpms]` section is used, as for libsodium, xxhash and snappy: where the package is not installed (CentOS Stream without EPEL, say) getdeps simply falls back to building sparsemap itself.

The F44 version is older than the 0.7.0 the manifest pins, so the difference was checked rather than assumed: the public API of sparse_map and sparse_set is identical between 0.6.2 and 0.7.0 down to template defaults, the tsl::detail_sparse_hash::sparse_array template cachelib reaches into has the same parameters, and the serialization format is unchanged. 0.7.0's only compatibility change is requiring C++17, irrelevant to cachelib. cachelib locates the headers by path (cmake/FindSparsemap.cmake: find_path tsl/sparse_map.h), which the package satisfies at /usr/include/tsl.

Tested on Fedora 44 with tsl-sparse-map-devel 0.6.2 installed: `getdeps.py --allow-system-packages build --no-tests --src-dir=. cachelib` no longer fetches or builds sparsemap (no Assessing/Building step for it in the log), cachelib configures with SPARSEMAP_INCLUDE_DIRS=/usr/include, SparseMapIndex.cpp compiles against the system header with -Werror on, cachebench links, and the build exits 0 after 58 minutes at two jobs.

Manifest-only follow-up to https://github.com/facebook/CacheLib/issues/488 and https://github.com/facebook/CacheLib/issues/493. RHEL hosts only benefit once https://github.com/facebook/CacheLib/issues/495 (distro_family) lands, since getdeps does not currently recognise RHEL as an rpm distro; the two are independent otherwise.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/494

Reviewed By: likewhatevs

Differential Revision: D120501594

Pulled By: michel-slm

fbshipit-source-id: db5b7ad6514b56984aa3d92a24dbde1614ff1ed4
2026-09-17 09:37:07 -07:00
Open Source Bot
9dbfea9f5b Updating hashes
Summary:
GitHub commits:

7fcd92de6b
63387fdb00
7720c4a477
c888234a81
d8d3f3f6b5
bbf9a02d02
37cf29eba0
ec6128418c
6197e38ba2
f01b74d102
74270475a1
f9ad64c823
9d159f2d3d

Reviewed By: bigfootjon

fbshipit-source-id: a11233a32ab016dbc85f48d839215f9453315057
2026-09-17 09:33:02 -07:00
Michel Lind
4c3e3954ce pathlib slice 4: Path-ify test helpers, keep str contracts
Summary: Convert os.path joins, basenames, dirnames, and exists/isfile/isdir/islink checks in the getdeps test suite to pathlib with os.fspath at the str boundaries, matching slices 1-3b. Deliberately kept: os.path.abspath (no exact Path equivalent; still used inside Path() for the fixtures/manifests dirs), os.path.realpath replaced only where resolve() is exactly equivalent, os.unlink/symlink/chmod/listdir (not os.path), and vendor_test.py (owned by unlanded D120204081). Verified: arc lint clean, pyre clean, buck test 113/113 pass.

Reviewed By: vitaut

Differential Revision: D120383078

fbshipit-source-id: 94b41927b849bd1667793648f5351476fa49fa98
2026-09-17 09:31:09 -07:00
Michel Lind
47d14111bf pathlib slice 3b: Path-ify dyndeps, wheel builder, workflows, facebook helpers
Summary: Convert remaining os.path joins, basenames, dirnames, and exists/isfile checks to pathlib with os.fspath at the str-contract boundaries, matching slices 1-3a. Deliberately kept: os.path.normcase/relpath (no Path equivalent), os.fsdecode, os.path.sep, listdir/lstat traversal, os.walk in include_rewriter (rglob would change prune semantics), the abspath site in workflow_generator, and all test files (no mock seams affected; vendor_test stays owned by D120204081). Verified: arc lint clean, pyre clean, buck test 113/113 pass.

Reviewed By: bigfootjon

Differential Revision: D120383077

fbshipit-source-id: 37741cd8a8a042e40589b2925b08885f5bca8e7c
2026-09-17 09:31:09 -07:00
Michel Lind
f9d31b6e13 pathlib slice 3a: Path-ify core path operations, keep str contracts
Summary: builder, buildopts, manifest, load, cli (non-vendor), cmd_base, cargo: os.path joins/exists/isdir/isfile/listdir/dirname/basename become pathlib operations. All field, getter, Env-value, argv, hash, and return types stay str (os.fspath at those boundaries); subprocess/Env/hash inputs are unchanged. Deliberately untouched: ShipitPathMap (posix-matching semantics), ntpath drive-subst code, os.path.abspath (no exact Path equivalent), cli vendor hunks + builder free_up_disk guard + vendor_test (owned by the pending vendor diff/cleanup), get_src_dir()/path_search() returns.

Reviewed By: likewhatevs

Differential Revision: D120383076

fbshipit-source-id: 3b79f49924eaff16471ab4e997107a4adca18026
2026-09-17 09:31:09 -07:00
Michel Lind
5621052e14 pathlib slice 2: Path-ify fetcher internals
Summary: fetcher.py path manipulation now uses pathlib (joins, exists, makedirs, archive validation via resolve()+relative_to instead of a raw startswith prefix check). get_src_dir() stays -> str and constructor path fields stay str (builders/loaders consume them as str; retyped in the core slice). ShipitPathMap is deliberately untouched: its posix-matching semantics are load-bearing per the comment on add_mapping. retry_test now neutralizes Path.mkdir instead of os.makedirs (the seam _download_dir uses). New LocalDirFetcher/copy_if_different Path-input tests.

Reviewed By: likewhatevs

Differential Revision: D120383075

fbshipit-source-id: 8908611c0f79d853b09dcc86f9da09e4782e389b
2026-09-17 09:31:09 -07:00
Michel Lind
649510929f Add lint enforcing the cmake_minimum_required floor
Summary: Adds lint_cmake_floors.py, an arc lint wrapper holding the single cmake_minimum_required floor (3.14, from folly) for the folly-family OSS CMake projects, registered in fbsource-lint-engine.toml as OSSCMAKEFLOOR. It checks 13 effective roots (both sides of fbcode<->xplat mirrors, so skew is caught too) with at-or-above semantics so fbthrift 3.24 and mcrouter 3.16 stay legal, and offers the bump as an arc lint -a autofix. Any future dip below the floor fails lint on the offending diff instead of shipping a deprecation warning (or worse) to OSS consumers. Related: facebook/folly#2703.

Reviewed By: likewhatevs

Differential Revision: D120432856

fbshipit-source-id: 74895b760e4e73238ae0321f6e7eb5f966e39215
2026-09-17 09:23:29 -07:00
Michel Lind
789e227e3f Align cmake_minimum_required floor on 3.14
Summary: CMake 4.x removed compatibility with minimums below 3.5 and deprecates minimums below 3.10 ahead of removing that too. folly already requires 3.14, which is the effective floor for every folly-dependent OSS project: declaring lower no longer excludes any supported consumer (lowest CMake in any supported config is 3.22) and only buys deprecation warnings today plus hard configure failures once the next removal lands. Aligned here: fizz 3.5, wangle 3.5, mvfst 3.10, proxygen 3.10, cachelib 3.12, fb303 3.8. Left alone above the floor: fbthrift 3.24, mcrouter 3.16; folly itself already 3.14. Related: facebook/folly#2703.

Reviewed By: likewhatevs

Differential Revision: D120432855

fbshipit-source-id: 0734e2b4e4e0c8866de52bc8657d4bf0d81e7c57
2026-09-17 09:23:29 -07:00
Michel Lind
37cf29eba0 getdeps: raise cachelib and fbthrift job weight to 3072 MiB
Summary:
job_weight_mib is the per-compiler memory estimate getdeps divides available RAM by to pick the build concurrency, and the base of the RLIMIT_AS safety net it puts on each build process. cachelib and fbthrift declared 2048 MiB, which two measured builds show is low.

Peak resident memory of every cc1plus process was sampled every two seconds during full builds on Fedora 44 (aarch64, gcc 15), once at four jobs and once at two jobs with tests disabled; 1182 compiler processes were observed across the fbthrift and cachelib phases of the second run:

| percentile | peak RSS |
|------------|----------|
| p50        | 489 MiB  |
| p90        | 1321 MiB |
| p95        | 1626 MiB |
| p99        | 2580 MiB |
| max        | 4027 MiB |

24 translation units exceeded 2048 MiB and 4 exceeded 3072 MiB. The heaviest were cachebench's Stressor.cpp (4.0 GiB) and fbthrift's ThriftServer.cpp (3.8 GiB), ThriftQuicServer.cpp (3.1 GiB), ThriftRocketServerHandler.cpp and Cpp2Connection.cpp (2.8 GiB each).

3072 MiB matches what proxygen, fboss, openr, bgp and moxygen already declare and keeps a builder sized for N jobs from over-committing when several of the heavy units land together, which on a machine whose scratch dir sits on a tmpfs was enough to push it into swap. The weight is a typical-case budget rather than a ceiling, so the remaining 4 GiB outliers are left to the 10x RLIMIT_AS margin. fbthrift-python builds the same sources and moves with fbthrift.

Follow-up to https://github.com/facebook/CacheLib/issues/488/#490/https://github.com/facebook/CacheLib/issues/491, measured on the same host; manifest-only change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/492

Reviewed By: likewhatevs

Differential Revision: D120414253

Pulled By: michel-slm

fbshipit-source-id: f93eab02ecb3d3aa6a5b4e1a45a31cd7b376c366
2026-09-17 00:42:35 -07:00
Michel Lind
ac9207ff19 getdeps: bump sparsemap to 0.7.0 for CMake 4
Summary:
sparse-map 0.6.2 declares cmake_minimum_required(VERSION 3.1). CMake 4 removed compatibility with anything below 3.5, so on hosts whose system CMake is 4.x (Fedora 44, Homebrew, the GitHub macOS runners, and soon Ubuntu 26.04 and Debian 14) the sparsemap step fails to configure:

```
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.
```

Upstream fixed this in 0.7.0 (released 2025-11-02), which requires CMake 3.10, so take the release rather than carry a patch. 0.7.0 also moves to C++17, fixes iterator invalidation on a non-inserting insert and the serialization of small hashes, and adds a no-exceptions mode; the headers install to the same include/tsl layout. cachelib is the only manifest that depends on sparsemap, and the one internal type it reaches into, tsl::detail_sparse_hash::sparse_array, keeps the same template parameters.

Tested on Fedora 44 with system CMake 4.3.0 and gcc 15, no CMAKE_POLICY_VERSION_MINIMUM anywhere on the command line: `getdeps.py --allow-system-packages build --no-tests --src-dir=. cachelib` configured and installed sparsemap 0.7.0 with no CMake error (the only CMake output of note being the < 3.10 deprecation warnings from fizz and wangle, tracked in facebook/folly#2703), compiled SparseMapIndex.cpp against the new headers with -Werror on, and linked cachebench; 51 minutes at two jobs.

Manifest-only change; follow-up to https://github.com/facebook/CacheLib/issues/488/#490/https://github.com/facebook/CacheLib/issues/491. The CMake version matrix behind the platform list is in facebook/folly#2703.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/493

Reviewed By: bigfootjon

Differential Revision: D120425085

Pulled By: michel-slm

fbshipit-source-id: 9802415458f4d6ba20fab21630ec9047d7ba45d5
2026-09-16 18:55:03 -07:00
Haixia Shi
20278bfe62 Fix duplicate Content-Length in ResponseBuilder
Summary:
https://fb.workplace.com/groups/proxygendevelopers/posts/3993434290963932

A handler that sets its own Content-Length and then sends a complete response silently loses compression due to duplicate Content-Length.

Full chain of events:

(1) The handler sets Content-Length on the response.

(2) On the non-chunked path ResponseBuilder::send() appends a second one instead of replacing it, so the message now carries two values.

https://www.internalfb.com/code/fbsource/fbcode/proxygen/httpserver/ResponseBuilder.h?lines=161

(3) HTTPHeaders::getSingleOrEmpty returns an empty string for a multi-valued header, so isMinimumCompressibleSize reads the length as 0.

https://www.internalfb.com/code/fbsource/fbcode/proxygen/lib/utils/CompressionFilterUtils.h?lines=96-106

(4) The size test therefore fails and shouldCompress returns false, whatever the real body size.

https://www.internalfb.com/code/fbsource/fbcode/proxygen/lib/utils/CompressionFilterUtils.h?lines=91-92

(5) The response goes out uncompressed. The codec collapses the duplicate to a single value on the wire, so the response looks correct to the client and nothing is logged.

The chunked path never hits this, because ResponseBuilder sets no Content-Length there and the getIsChunked() arm short-circuits the size test. That is why the parent diff is still required: disabling it makes the chunked case regress immediately.

Fix is to treat the field as a singleton.

Reviewed By: hanidamlaj

Differential Revision: D120387888

fbshipit-source-id: 0c7e89df5deb02f9a4346c7bf1e01a8d45f478b4
2026-09-16 18:53:32 -07:00
Pranchal Shah
1f3cc7411d wire CLI11 into the open source build
Summary: katran_tester is moving to a CLI11 command interface, so the getdeps build needs CLI11 installed and KatranTesterCli.cpp compiled. Nothing calls it yet; the next diff adds the dispatch. Split out because edits under fbcode/opensource trigger every open source build.

Reviewed By: tagrawal03

Differential Revision: D119598499

fbshipit-source-id: 9db46020fc36e3e00f828a4b35ba725fd1a149eb
2026-09-16 18:25:31 -07:00
Michel Lind
143c0d7396 pathlib slice 1: Path-ify leaf helpers, keep str boundaries
Summary: copytree, envfuncs.path_search internals, and runcmd cwd/log_file now operate on pathlib.Path, accepting str | Path. Env values, argv lists, and hash inputs stay str by necessity (subprocess + project hashes); path_search documents its str return for the same reason, to be revisited when core builders are retyped. No caller changes needed. New tests/test_path_inputs.py locks the widened contracts.

Reviewed By: bigfootjon

Differential Revision: D120383074

fbshipit-source-id: b4145f56d906f58dc8f71d7ad96a08b419f19796
2026-09-16 15:59:00 -07:00
Michel Lind
125da80e2e Document and enforce Python 3.6 minimum for getdeps
Summary: getdeps already requires 3.6+ in practice (interpolated f-strings throughout), but nothing stated or enforced it: pre-3.6 interpreters died with a bare SyntaxError on the first f-string. README now documents the floor, getdeps.py exits early with a clear message below 3.6, and the dead sys.version_info < (3, 2) shim in manifest_test.py is gone.

Reviewed By: likewhatevs

Differential Revision: D120383073

fbshipit-source-id: 394c5757b3de1262e81356ca71ed4eb64f3f3709
2026-09-16 15:33:58 -07:00
Hani Damlaj
8e8d5c2ab2 refactor WtStreamManagerTest
Summary:
small refactor for WtStreamManagerTest by creating a fixture to reduce a bunch of duplicated declarations for each test

___

Differential Revision: D120421514

fbshipit-source-id: 03892d3d7a3a0bab6e731047472e4af00b0343f9
2026-09-16 15:25:57 -07:00
Michel Lind
3af80957f1 getdeps: vendor subcommand and --vendor-dir for offline builds
Summary:
Three commits, best read in order. Together they give getdeps the equivalent of `cargo vendor` plus `--offline`, which is what Fedora's vendored-dependency guidelines need for packaging cachelib without maintaining separate folly/fizz/wangle/mvfst/fbthrift packages in lockstep.

## getdeps: add a vendor subcommand

`getdeps.py vendor --output-dir DIR project` fetches every third-party dependency of the project and copies its source tree to `DIR/<name>`, skipping deps satisfied by system packages and the project itself. It also writes DIR/getdeps-vendor.txt listing each vendored project with its fetcher hash (the pinned git revision or the archive sha256).

This is the getdeps analogue of `cargo vendor` / `go mod vendor`: distro packagers can ship the result as a vendor tarball next to the project source, as Fedora's vendored-dependency guidelines require, and a follow-up change will let `build` consume such a directory offline.

Extracted trees rather than the original archives and clones are vendored so the result is self-contained, reviewable and license-scannable; .git directories are dropped and symlinks are followed for the same reason (subproject fetchers symlink into the scratch dir, which does not exist on an offline builder).

Tested on Fedora 44: `getdeps.py --allow-system-packages vendor --no-tests --output-dir /var/tmp/cachelib-vendor cachelib` produced eleven trees (about 330 MB, fbthrift being 216 MB of that) plus getdeps-vendor.txt, with no .git directories or symlinks left behind. Once the Fedora rpm mappings from facebook/CacheLib#488 land that drops to the seven projects Fedora does not package.

## getdeps: add --vendor-dir to build from vendored sources offline

`getdeps.py --vendor-dir DIR build project` takes every third-party dependency from `DIR/<project>`, as populated by `getdeps.py vendor`, instead of cloning or downloading it. The lookup sits in the manifest's fetcher selection after the system-package check, so a dependency that --allow-system-packages resolves to an installed package still wins, and anything not found in DIR raises an error naming the missing project rather than falling back to the network. That single check is the offline guarantee: no GitFetcher or ArchiveFetcher is ever constructed.

The vendored tree is wrapped in the existing LocalDirFetcher, the same mechanism --src-dir uses, so no fetcher code changes. Its hash is fixed and it always reports the sources as changed, which means repeated builds against a vendor dir reconfigure their dependencies each time; that is acceptable for the one-shot distro builds this is meant for.

--free-up-disk only removed build trees whose sources live under the scratch dir, a guard meant to protect a user's own --src-dir checkout. Vendored sources are ours to clean up after, so the guard now also accepts the vendor dir (stored realpath'd so the prefix comparison matches LocalDirFetcher's realpath'd source paths).

Known limitation: patchfiles are applied with `git apply` from the enclosing git top-level, so a vendor dir placed inside another git checkout would mis-apply patches for the (few) manifests that carry them. A distro build directory is not a git checkout, so this does not affect the intended use; making the patch step independent of the surrounding repository is left for a follow-up.

Tested on Fedora 44 (aarch64, 4 cores) on a tree that also carried facebook/CacheLib#488, https://github.com/facebook/CacheLib/issues/489 and https://github.com/facebook/CacheLib/issues/490, against the seven-project vendor dir produced by the previous commit (magic_enum, sparsemap, folly, fizz, wangle, mvfst, fbthrift; 276 MB):

```
unshare -rn python3 build/fbcode_builder/getdeps.py \
  --allow-system-packages --vendor-dir /var/tmp/cachelib-vendor \
  --scratch-path /var/tmp/getdeps-offline-scratch --num-jobs 2 \
  --extra-cmake-defines '{"CMAKE_POLICY_VERSION_MINIMUM":"3.5"}' \
  build --free-up-disk --no-tests --src-dir=. cachelib
```

`unshare -rn` puts the build in its own network namespace. Inspected from outside while it ran, the build process was in net:[4026532485] versus the shell's net:[4026531833]; `nsenter -n ip -brief link` inside it showed only `lo` DOWN, `getent hosts github.com` failed (exit 2), and `ss -tunap` listed no sockets. The build finished in 72 minutes with exit 0, all eight projects installed, no "Download with" or "Cloning" line in the log, and cachebench linking the system glog, liboqs, libaio and libnuma. Requesting a project that is neither vendored nor allowed from system packages fails with the new error, and `show-source-dir --recursive` resolves every vendored project into the vendor dir. The --free-up-disk fix was verified separately: an offline sparsemap build with the flag left no build tree behind, where the 72-minute run (made before the fix) had left 11 GB.

## getdeps: add tests for vendor and --vendor-dir

`getdeps/test/vendor_test.py`, in the style of the existing builder tests (MagicMock loader and build options, real `ManifestParser` objects), 5 tests: `vendor` copies a non-system dependency's tree, skips a dependency that resolves to a `SystemPackageFetcher`, skips the project itself, drops `.git`, materialises symlinks and writes `getdeps-vendor.txt`; `vendor` replaces a stale tree in the output dir; `--vendor-dir` resolves a download-URL manifest to a `LocalDirFetcher` on `<vendor-dir>/<name>`; a project missing from the vendor dir fails naming the project rather than constructing a network fetcher; and without `--vendor-dir` the normal `ArchiveFetcher` is still chosen. Run from `build/fbcode_builder` with `python3 -m unittest getdeps.test.vendor_test`.

Verified together with https://github.com/facebook/CacheLib/issues/488, https://github.com/facebook/CacheLib/issues/489 and https://github.com/facebook/CacheLib/issues/490 applied; each of those stands alone and none of them is required for this change to apply.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

X-link: https://github.com/facebook/CacheLib/pull/491

Reviewed By: aleivag, likewhatevs

Differential Revision: D120204081

Pulled By: michel-slm

fbshipit-source-id: f877310e93bcddbf6ff6f81f72e2738e23ecdfa5
2026-09-16 13:43:50 -07:00
Hani Damlaj
9e07a9991b fix http/1.1 codec backfill error
Summary:
right now if we fail to parse any part of the message prior to an error (either upstream or downstream error prior to onHeadersComplete) – the HTTPMessage will neither be of type `Type::Request` or `Type::Response` which can be very error prone for the callback / consumer of the message

This ensures we only attach the partialMsg on parse error via ::onParserError if it's downstream

Reviewed By: haydn111, afrind

Differential Revision: D120194535

fbshipit-source-id: 7450959ded7179d93b1b5af7c80cccf4d663bd99
2026-09-16 12:10:55 -07:00
Victor Zverovich
29b0767773 Declare glog::glog only when glog is found
Summary:
`FindGlog` creates the `glog::glog` imported target whether or not it found anything. When glog is missing the target is there all the same, pointing at `GLOG_LIBRARY-NOTFOUND`, so nothing goes wrong until the link step reports `ld: library 'GLOG_LIBRARY-NOTFOUND' not found`. The same block also runs `find_package(Gflags)` and `find_package(LibUnwind)` to fill in glog's own dependencies, two searches that have nothing to contribute when there is no glog to attach them to.

Guarding the block on `GLOG_FOUND`, the way `FindGflags` already guards its `gflags` target, makes a failed search report itself at configure time and leaves the namespace clear.

That second part matters to folly. A fetched glog declares `glog::glog` as an `ALIAS`, and CMake rejects an alias whose name is already taken, so the previous diff had to run the module's library search by hand and pick between find and fetch before `FindGlog` could get to it. That workaround goes away and the block reads as `find_package` plus a fallback again, like every other dependency in the file.

Reaching the module in the not-found case does leave two of its variables to account for on folly's side. `GLOG_LIBRARIES` is named in the `EXPORTED_DEPS` of 42 of folly's granular libraries, so the fetch branch points it at `glog::glog`. `GLOG_INCLUDE_DIR` only means anything when glog was found, so appending it and the `glog/export.h` check that goes with it move into that branch.

Reviewed By: bigfootjon

Differential Revision: D120177659

fbshipit-source-id: ee65caed9aa25b4517b8b952b826b451b462f96b
2026-09-16 11:05:07 -07:00
Sujay Patel
6cd676bdf6 Prevent stale blocked-stream handles
Summary:
Remove completed `WtWriteHandle`s from `connFcBlockedStreams_` before deletion.

- Clears `connFcBlockedStreams_` during a shutdown() call.
- Erases wh from `connFcBlockedStreams_`  anytime `finish(True)` is called

Reviewed By: hanidamlaj

Differential Revision: D119586489

fbshipit-source-id: bbe15c7f7b39e74299b0ba55906884500f269466
2026-09-16 10:35:19 -07:00
Open Source Bot
76ebbde718 Updating hashes
Summary:
GitHub commits:

cc1791d2b8
2818f4b5bd
a718d00a0e
f9193b4ea9
594a1f3161
7e5dfcd59b
aa63d4951a
e46e35d552
21988231a9
6c1eea9ed6
87a01ae382
9547dd7af2
a1936875b7

Reviewed By: ajb85

fbshipit-source-id: e91a4c12f411693bdcc1e8439c30a1cc38a18de7
2026-09-16 09:33:27 -07:00
Michel Lind
e46e35d552 getdeps: accept fedora in install-system-deps --distro and fill rpm gaps
Summary:
Fedora is already detected by getdeps_platform.py and mapped to the rpm package manager, but `install-system-deps --distro` only accepted ubuntu and centos_stream, so the Fedora package list could not be produced from another host.

Also let the remaining cachelib deps that Fedora packages be satisfied from the system with --allow-system-packages instead of being built from source. libaio and numa already had rpm entries scoped to CentOS Stream (and Alma/Rocky for libaio); those selectors now include Fedora. The other two gain new [rpms.distro=fedora] sections. Package names and versions were checked against the Fedora 44 repositories:

| manifest  | Fedora package         | Fedora  | manifest |
|-----------|------------------------|---------|----------|
| benchmark | google-benchmark-devel | 1.9.5   | 1.8.0    |
| libaio    | libaio-devel           | 0.3.111 | 0.3.113  |
| liboqs    | liboqs-devel           | 0.12.0  | 0.12.0   |
| numa      | numactl-devel          | 2.0.19  | 2.0.19   |

magic_enum is deliberately not mapped: Fedora ships 0.9.5, which installs `<magic_enum.hpp>` at the include root, while cachelib includes the `<magic_enum/magic_enum.hpp>` layout introduced in 0.9.6.

Tested on Fedora 44 (linux-fedora-44 host type): all changed manifests pass validate-manifest, `install-system-deps --recursive --dry-run --distro fedora cachelib` lists the four packages above, and a full `build --allow-system-packages cachelib` succeeds with fizz linking the system liboqs and cachebench linking the system libaio and libnuma.

X-link: https://github.com/facebook/CacheLib/pull/488

Reviewed By: likewhatevs

Differential Revision: D120159819

Pulled By: michel-slm

fbshipit-source-id: 8fcee0d3f90447209f259df7ba8a0a41aae4a18c
2026-09-16 00:22:51 -07:00
Haixia Shi
cebe5cfbda Fix chunked Content-Length
Summary:
https://fb.workplace.com/groups/proxygendevelopers/posts/3993434290963932

A handler that sets `Content-Length` then streams its body leaves that length on a chunked message. `CompressionFilter::sendHeaders` added `Content-Encoding` and forwarded it unchanged, so the recipient expected the uncompressed size, got the compressed bytes, and waited out an idle timeout with no error raised.

Remove the length there. Chunks frame the message, and the non-chunked path already recomputes it after compressing.

Reviewed By: hanidamlaj

Differential Revision: D120282282

fbshipit-source-id: 6588cebce4c943e485677663c6229e3f9ae39a6a
2026-09-15 22:27:13 -07:00
Hani Damlaj
d3465673f7 add maxWritable member to FlowControlState struct
Summary: In QuicWtSession it would be helpful to elide a stream lookup to query both the FlowControlState and the MaxWritable in one api. I think we can cut over all (few) invocations to getMax(Stream|Conn)Writable to ::get(Stream|Conn)FlowControl and remove the ::maxWritable apis

Reviewed By: jbeshay

Differential Revision: D120168940

fbshipit-source-id: e1e008cc1c576aa1a30530fa0318d24c3adec877
2026-09-15 21:30:01 -07:00
Sujay Patel
397d891f8f CodecUtil: identify and benchmark header validation errors
Summary:
Add `HeaderValueError` and `validateHeaderValueDetail` so callers can identify which rule rejected a header value while preserving the existing boolean `validateHeaderValue` API.

Add unit coverage for each validation result and a benchmark target covering representative accepted, folded, and rejected values. The benchmark confirms that detailed error classification stays off the successful hot path.

Reviewed By: hanidamlaj

Differential Revision: D114943767

fbshipit-source-id: b8154bb2b2234b552777a225a2c69de7530a6d2e
2026-09-15 15:17:58 -07:00
Michel Lind
9297e7cd89 getdeps: honour --no-tests for cachelib
Summary:
cachelib's CMakeLists defaults BUILD_TESTS to ON and the manifest never overrode it, so `getdeps.py build --no-tests cachelib` still compiled every test binary. Wire the getdeps test context to BUILD_TESTS the same way the folly and fizz manifests do.

With tests off the cachelib build on Fedora 44 drops from 497 to 110 ninja steps, which matters for memory- and CPU-constrained distro builders.

Tested on Fedora 44 in a single `getdeps.py --allow-system-packages build --no-tests cachelib` run together with the Fedora rpm mappings from facebook/CacheLib#488 and the FindGlog config-mode fix; the resulting CMake cache has BUILD_TESTS:BOOL=OFF and the build succeeds.

X-link: https://github.com/facebook/CacheLib/pull/490

Reviewed By: likewhatevs

Differential Revision: D120177373

Pulled By: michel-slm

fbshipit-source-id: 8b079e9878b945f778c882f84dbb4433660b181d
2026-09-15 14:33:16 -07:00
Victor Zverovich
ef77f566b0 Delete the fatal manifest
Summary:
With fboss off it in the parent diff, no getdeps manifest depends on fatal, so the manifest builds a library nothing asks for. Delete it.

This does not affect the GitHub repo: `github.com/facebook/fatal` is exported by ShipIt from `configerator/source/opensource/shipit_config/facebook/fatal.cconf`, which is independent of this manifest, and the repo builds through its own scripts rather than getdeps. fatal itself stays in fbcode, where roughly 350 include sites across 59 projects still use it.

Reviewed By: bigfootjon

Differential Revision: D120061602

fbshipit-source-id: 1e06ba4212a17b98973941485e46150da74a6e6b
2026-09-15 11:48:45 -07:00