Repository navigation
recent consolidated fixes - #3
Merged
Merged
Conversation
Summary: We believe that the buck daemon inherits the sandboxing from the 3pai.slice cgroup. The daemon is moved into it's own cgroup normally, and after that we can no longer tell which cgroup it originated in. While the cgroup actually is moved, the `bpfjailer` does not respect the current cgroup, and leaves the daemon jailed. In order to better correlate build performance to this daemon-process history, include the cgroup of the originating process in the buck2_builds table. AI says: Capture the cgroup of the process that launches the Buck2 daemon before resource control moves the daemon into Buck's managed cgroup. Thread that value through daemon startup using an internal launch-only environment variable and include it in per-command metadata so Buck2Builds ingress can populate a new `daemon_originating_cgroup_path` column. Also log the daemon and forkserver cgroup handoff with full cgroup paths for startup diagnostics. Reviewed By: ndmitchell Differential Revision: D106425816 fbshipit-source-id: cccd23b34186982464137367809a96debbd3e974
Summary: The new recursive descent parser (`parser_rd.rs`) was using `EvalException::new_anyhow()` which creates errors with `ErrorKind::Other`, instead of `EvalException::parser_error()` which correctly creates `ErrorKind::Parser`. This caused parse errors to not be properly categorized with the `STARLARK_PARSER` tag and `StarlarkError::Parser` source location. Additionally, update the golden test file for `test_during_parse` to match the new error message format produced by the recursive descent parser (which replaced the LALRPOP parser as the default in D106813106). Changes: 1. `parser_rd.rs`: Use `EvalException::parser_error()` instead of `EvalException::new_anyhow()` in `error_expected()` and `error_at()` so that parse errors are correctly categorized as `ErrorKind::Parser`. 2. `test_during_parse.golden.stderr`: Update expected error message from the old LALRPOP format (long list of expected tokens) to the new recursive descent format (concise expected description). ___ Differential Revision: D107078049 fbshipit-source-id: f5e03f20b900d8df413758a8ae3a7240aeba5625
Summary: Automated migration to enable Pyrefly type checking for `fbcode/buck2/tests`. - Added `python.set_pyrefly(True)` to PACKAGE file - Suppressed pre-existing type errors Pyrefly is Meta's next-generation Python type checker, replacing Pyre. If you encounter issues, you can revert the PACKAGE change by removing the `python.set_pyrefly(True)` line. #pyreupgrade Differential Revision: D107133347 fbshipit-source-id: 0a12aa2b52c1687369af7509e9a2216ff1497a62
Summary: As documented [here](https://buck2.build/docs/getting_started/install/), every release contains artifacts for Windows and macOS. I'd strongly recommend going through the docs to remove such outdated information because it's tainting AI model responses even with RAG/live search e.g. https://chatgpt.com/share/6a1e4148-95cc-83ea-b8ff-ba182f2fbb89 Pull Request resolved: #1333 Reviewed By: scottcao Differential Revision: D107195834 fbshipit-source-id: db0fa31e032fc44702abccbf42d9977502b4336e
Summary: Contains this API breaking change: {D106680484}
Reviewed By: ndmitchell
Differential Revision: D106946669
fbshipit-source-id: 654bb3b8fbf48285bef643bb245ebc359f5bcd7f
Reviewed By: ndmitchell Differential Revision: D106946750 fbshipit-source-id: f8fd0873ff8ae4430d27626bbfd13873b9921f5a
Summary: ^ ___ Differential Revision: D107208345 fbshipit-source-id: eb707683010d842a1824ee7b02c7f083e73c89a1
Summary: The `tracing::debug!` log for dmesg last entry was inside an `if let Some` guard, so it only fired when `dmesg --since` returned output. When `dmesg --since` returns empty output (e.g. due to wall-clock drift filtering out the OOM message), no diagnostic was emitted at all. Make the log unconditional and include the `--since` value and line count so the debug output is useful for diagnosing flaky OOM detection. ___ Differential Revision: D107202396 fbshipit-source-id: fca834e81367a34e0eb9881be85feb39760bad2e
Summary: Pagable frozen-heap metadata stored each value's `deser_type_id` as its full Rust type name (e.g. `starlark::values::string::StarlarkStr`, 30-135 bytes). This replaces it with a compact `u32` index into the vtable registry (1-3 bytes varint-encoded), assigned by sorting registered type names so it is stable across runs of the same binary (like `StaticValueId`). Only the wire encoding changes — `DeserTypeId` still wraps the type-name string in memory. Reviewed By: christolliday Differential Revision: D107188069 fbshipit-source-id: 9a89bf1fd86786922a672fdb05d62c42f159c0f4
Summary: Teach `allocative` to account for `chrono::DateTime<Tz>` as an inline sized value behind an optional `chrono` feature. This lets callers walk time fields instead of skipping them. Required for Allocative on the materializer's `ArtifactTree`. Reviewed By: JakobDegen Differential Revision: D106530457 fbshipit-source-id: dcba87ee5af2e4306d06a112abb2174cbc899b50
Summary: Update the `Allocative` implementations for `std::collections::HashMap` and `HashSet` to include estimated hashbrown backing-table capacity and unused capacity, matching the existing `hashbrown::HashTable` accounting style. Right now, these account for some of jemalloc's allocated memory, but it's not reported in the allocative. This is _only_ an estimate, because the exact layout is an implementation detail hidden from us. Reviewed By: JakobDegen Differential Revision: D106530456 fbshipit-source-id: b84dd1fa0c4cd889f5d7637b4df6210f280aae05
Summary:
# Context
When RE rejects a test action (e.g. RESOURCE_EXHAUSTED for GPU queue full),
buck2 has the structured error info internally via CommandExecutionStatus::Error,
but collapses it to ExecutionStatus::Finished { exitcode: 1 } at the TPX boundary.
TPX misclassifies these as FATAL instead of INFRA_FAILURE.
before {F1990601289}
after {F1990601288}
# This diff
Phase 1: Fix infra error classification using the new CommandExecution object
Buck2 already has a rich CommandExecution proto with a 6-variant status oneof: Success, Failure, WorkerFailure, Error, Timeout, Cancelled
Propagate this proto from buck2 to TPX alongside the existing ExecutionDetails (D107105386)
TPX reads CommandExecution.status — when it is Error, classify as INFRA_FAILURE instead of FATAL
Gate behind QE experiment tpx_infra_error_classification on diff-version grain for safe rollout (D107139332, D107139433)
Reviewed By: krallin
Differential Revision: D107105386
fbshipit-source-id: 5bf7ed740488ce61c38311b93c71dff407de6c68
Summary: adding e2e test to validate feature behaviour Reviewed By: krallin Differential Revision: D107121983 fbshipit-source-id: d37f224d32f7e3bb833fde5a7cfdc0c7fc933f37
Summary: Gh repo is gone ___ Differential Revision: D107281246 fbshipit-source-id: 0f9e8bd7ddcb02c843ed0ff7201b1fefda6dc91f
Summary: `static_extension_utils.cpp` chooses how to call a Python module init function based on Python version and available Meta-specific APIs. This diff fixes conda/static CPython builds while keeping stock CPython as the default behavior in the open-source Buck2 prelude: 1. Removes the dead `_Ci_PyImport_FinishSinglePhaseExtension` path. It was only reachable for Python 3.13, but there is no supported Meta/Cinder Python 3.13 build and the symbol is not defined. 2. Uses `META_PYTHON` from Python 3.14 `pyconfig.h` for the Python 3.14 Meta-specific path and falls back to `PyImport_CreateModuleFromInitfunc()` for stock Python 3.14. 3. Makes Python 3.13 use plain `initfunc()`, since there is no supported Meta/Cinder Python 3.13 build and stock Python 3.13 has no `_Py_PackageContext`. 4. Gates the Python 3.12 Meta-only `_Ci_PyImport_CallInitFuncWithContext` path on `META_PYTHON_STATIC_EXTENSION_APIS`, a positive marker passed by the prelude when `use_oss_python = False`, instead of requiring stock Python builds to opt out. 5. Wires `use_oss_python = True` for conda builds in `python_test_common.bzl` and `python_binary.bzl`, so Python 3.12 conda builds use the stock `initfunc()` path. The AIRStore telemetry unit tests now build under conda and declare `network_access_utils.none()` to satisfy lint. Reviewed By: alexmalyshev, manav-a Differential Revision: D97871434 fbshipit-source-id: f761e53c2587794811c4932c038aa24f33a8515d
Summary: Fix likely incorrect chmod permission since decimal numbers != hexadecimal numbers TL;DR: I gave a talk on this here: https://www.youtube.com/watch?v=tRtxCCRdZOs&t=35227s Pull Request resolved: #1305 Reviewed By: dtolnay Differential Revision: D103134816 fbshipit-source-id: 7b923e9881f832f40d10117e45ebe7660b856c05
Summary:
The Kotlin compiler for the Android build toolchain was bumped to 2.2.0 (`kotlin.kotlin_version`), but the toolchain test code under `prelude//toolchains/android` was never updated, leaving `jvm/kotlin/testutil/compiler:compiler`, `jvm/java/abi:abi`, and `jvm/java/abi:abi-kotlin` red.
`KotlinTestCompiler` called `K2JVMCompilerArguments.setOldInnerClassesLogic`, which Kotlin removed in 2.1+, so the test compiler no longer built. The "old inner classes logic" is gone upstream, so the call is simply dropped and the new (and only) behavior is used.
`StubJarTest` golden expectations are updated to match Kotlin 2.2 output: the `Metadata` binary version is now `mv={2, 2, 0}` (added `isKotlin22()`/`metadata22` next to the existing version-gated variants), inline-lambda classes now carry a `SourceDebugExtension` (SMAP) block, anonymous-object classes emit an extra `INNERCLASS` entry for the implemented interface, and the suspend-lambda `invokeSuspend` bytecode is reordered.
___
Differential Revision: D107287677
fbshipit-source-id: 49700f3dfd4253ab06d35971048569650329f327
Summary: Expose `target_name_glob(name_globs, within = ...)` as a native Starlark value usable in `visibility` and `within_view` attribute lists. `name_globs` is a non-empty list of target-name globs (`*` is the only wildcard; a glob consisting solely of `*` is rejected in favor of `"PUBLIC"`); the optional `within` is a list of package or recursive package patterns that scope the match. A target matches when any glob matches its name and, when `within` is non-empty, its package falls inside any `within` scope. Coerced values are stored in the visibility pattern lists, serialize to a typed `__type`-tagged dict for `uquery`/BXL introspection, and render readable `target_name_glob(...)` display/JSON that round-trips back into the same expression. The coerced `within` scopes reuse `buck2_core`'s existing `PackagePattern` (package-or-recursive) rather than a bespoke type, so the scope matcher and `Display` live in one place. Review-driven refinements: `"PUBLIC"` is rejected as a `within` scope (it is a target name, not a package pattern) with a dedicated error; `name_globs` is positional-only and renders positionally so the repr round-trips (`target_name_glob(["*-test"], within = [...])`); `package()` accepts `Either<str, target_name_glob>` for type-checked unpacking; `Display` goes through `display_container::fmt_container` with the `StarlarkStr::repr` string escaper; and JSON serialization uses an infallible `TargetNameGlobRecord::to_json()` that builds the `Value` directly (no `to_value(...).expect()`) and which `Serialize` delegates to. Covered by unit and PACKAGE-integration tests, including PUBLIC-in-`within` rejection and positional-repr round-tripping. Reviewed By: jtbraun Differential Revision: D106104073 fbshipit-source-id: 7d0098bb5767235dcacc5253e0dae248dd40b778
Summary: `mainShouldExitWithZeroOnSuccess` and `mainShouldExitWithOneOnMissingArgs` spawn a child JVM using `ProcessHandle.current().info().command()` as the executable. Under the test runner that resolves to a wrapper script rather than a usable `java` launcher, so the child process fails to start and returns exit code 127, which auto-disabled both tests. They now resolve the launcher from `java.home/bin/java`. ___ Differential Revision: D107287678 fbshipit-source-id: 321c71b86e54737914be98534dcd63bd5b012647
Summary: Replace `quote_spanned!` with `quote!` in the `starlark_pagable_typetag` macro to match the pattern from D104899872. This removes unnecessary span tracking and simplifies the macro implementation by eliminating `use syn::spanned::Spanned` and the intermediate `span` variables. ___ Differential Revision: D107320253 fbshipit-source-id: 63c4edf86e070b075aa68fc0ae3055a62241684d
Summary: The old `ArenaOffset`-based wire format ties pointer resolution to the arena's exact layout, which only works when the heap is fully pre-allocated and laid out exactly as it was at serialize time. `value_index` is layout-independent — just the value's position in serialization order — so the same wire bytes serve both the eager path and the lazy fresh-heap path introduced later in the stack. Cross-heap pointers and per-value metadata shrink as a side benefit. Reviewed By: christolliday Differential Revision: D105131366 fbshipit-source-id: 32f2c189575986d3e3ea46f2202b207ea0b11c32
Summary: ## Context * The current implementation uses lazy to not recompute the revision. * This however keeps the revision stale within each buck2_client invocation and the revision is only refreshed after the daemon is killed. ## What This Diff Does * Adds a `clear_revision` function and calls it in `version_control_revision.rs` in buck2_server which simply clears the cached revision * Wraps the revision in a RWLock to avoid multiple dependencies trying to recompute it at once * Computes the revision on the first request if it's requested Differential Revision: D107252753 fbshipit-source-id: 0daee2d93f28893ea18d744ed152ae05b822d0bd
Summary: Preparation for moving test `network_access` onto the executor config. The static-listing enumeration tool (gtest-list-tests, coral, ...) is a DotSlash stub that can not resolve under network isolation, so it must stay exempt. Today the orchestrator expresses that by returning `None` from `requested_network_access`. That only works because executor configs carry no network policy yet; once the cutover writes `network_access` onto the listing executor, returning `None` would fall back to that policy (`request.network_access().or(executor_config.network_access)` in `command_executor.rs`) and wrongly isolate static listing. Force `Some(NetworkAccess::All)` instead so the exemption overrides any executor-level policy. Why this is safe: this is a behavioral no-op today. `NetworkAccess::All` and `None` are equivalent -- both mean no isolation -- for as long as executor configs carry no `network_access`, which is the case until the cutover lands. Nothing else reads or depends on this value. The only reason it is a separate, first diff is ordering: it ships in the buck2 binary, which rolls out independently of the prelude, so it must be deployed before the cutover starts writing the listing executor policy. Reviewed By: IanChilds Differential Revision: D107248975 fbshipit-source-id: addfc8353e4ee58e552e847c506105027449b397
…rity Summary: fix incorrect test assertion in SRR exact filter test that was causing prod failures after landing D106057624. The test test_srr_exact_single_test_stays_narrow (formerly test_srr_exact_real_test_name_alone_matches_only_that_test) incorrectly expected Pass 1 but the multi_tests target runs in bundle mode, which emits a synthetic - main worker result alongside the actual test. The correct expectation is Pass 2 (1 test + 1 bundle worker). Also renamed both SRR exact tests for clarity: test_srr_exact_silently_drops_synthetic_main_alongside_real_test_name → test_srr_exact_with_main_expands_to_full_suite test_srr_exact_real_test_name_alone_matches_only_that_test → test_srr_exact_single_test_stays_narrow The original names were overly verbose and described implementation details rather than intent. ___ Differential Revision: D107367552 fbshipit-source-id: de1bec4ae9ce01d159cf090adae567cbc15a4d92
Summary:
The thrift Java runtime began bundling native compression libraries (`libzstd.so`, `liblz4.so`) as of D99339656 ("[thrift][java] Add Java 25 FFI-based ZSTD compressor"), which landed 2026-04-15 and added `zstd_java_native` / `lz4_java_native` as dependencies of `fbcode//thrift/lib/java/runtime:runtime`. From that point, every `java_binary` that transitively depends on the thrift runtime carries native libraries.
`javacd_thrift_worker_tool` and `kotlincd_thrift_worker_tool` depend on thrift (worker tool -> `workertool_thrift` -> `worker_tool_thrift-java-swift` -> thrift `runtime-java17` -> `zstd_java_native`), so the fat jar picked up `libzstd.so` / `liblz4.so`. But `buck_java_binary` pins these binaries to the bootstrap Java toolchain, whose fat-jar tooling rejects native code:
```
fail: Bootstrap java toolchain could not be used for java_binary() with native code.
```
Why the bootstrap toolchain can't package native code: the JVM cannot load a `.so` from inside a jar, so a fat jar that carries native libs needs a runtime launcher (`FatJarMain`, supplied by the toolchain's `fat_jar_main_class_lib`) that unpacks the `.so`s to a temp dir and loads them before invoking the real main. The bootstrap toolchain leaves `fat_jar_main_class_lib` unset (`None`): it is intentionally minimal, existing only to compile the toolchain's own sources (including `FatJarMain` itself) with plain `javac`, so it cannot depend on those not-yet-built tools without a cycle. With no launcher to inject it cannot assemble a native-lib-loading jar, so the rule fails fast instead of emitting one that would throw `UnsatisfiedLinkError` at runtime.
These targets built fine from when they were introduced (D81607382, Oct 2025) until D99339656 landed; this is the same regression that took out the thrift-dependent JVM binaries tracked in T265022276 (dent/spark/scala, tableau, and others) -- the worker tools were collateral.
Fix: `_set_buck2_java_toolchain` now applies the bootstrap default only when the caller has not specified a toolchain (a no-op for every existing caller), and the two worker-tool binaries opt into `toolchains//:java_for_android` -- a non-bootstrap toolchain whose fat-jar builder packages native libraries. This unblocks the `javacd` / `kotlincd` `remote_worker` and `thrift_worker_tool` build rules.
Reviewed By: NavidQar
Differential Revision: D107287675
fbshipit-source-id: 4b6b8a8cbdf67ee005876fd15eacb480c567fe21
Summary: Enabling `buck2.log_artifact_count_sketch` / `buck2.log_artifact_size_sketch` on CI caused a large regression in buck2 invocation time. The likely root cause is in `compute_artifact_path_sketches_for_target` (`app/buck2_build_api/src/build/detailed_aggregated_metrics/buck2_sketches.rs`): it walks `value.entry()` and `value.deps()` and pushes every leaf path into a flat list, then feeds that list to the `SetSketcher`. There is no dedup at the per-target level (a path appearing in both the entry tree and the deps tree), causing potential traversal multiple itmes. This diff adds a unit test that demonstrates the current "no dedup" behavior. The underlying perf bug is not fixed. ___ Differential Revision: D107338296 fbshipit-source-id: 089d06622781bf4efee4efd28482e26055737e7d
Summary: I'm not going to do a release now, but in D107344084 I had to avoid the nfast cases because this was missing Reviewed By: ndmitchell Differential Revision: D107350061 fbshipit-source-id: 14934ff77cd532bb39d528d8a69c52cc18866a0f
Summary: This is a workaround to not break users, but still make the UX okay. I suspect that inside fb, there are lots of people that do: buck test //... --include myproject myotherproject I chose not to error out on this case, since I suspect scripts might do `["buck", "test", *targets, "--include", *labels]`, which is valid for no targets and shouldn't be an edge case. Fixes: #1243 Test plan with reproducer in //foobar: ``` $ target/debug/buck2 test --exclude meow //foobar/... No target patterns specified, but --include/--exclude flags are set. This is likely a mistake: put targets first, then --include/--exclude, since include/exclude consume all remaining args hint: The following requested labels look like target patterns: '//foobar/...' hint: Try putting them before --include/--exclude. hint: For example: buck2 test //foo --include mylabel Build ID: 925dd280-7479-4ddb-82d8-2f0773b40412 Command: test. Time elapsed: 0.0s Tests finished: Pass 0. Fail 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0 NO TESTS RAN $ target/debug/buck2 test //foobar/... --exclude meow ✓ Pass: gh_facebook_buck2//foobar:test_without_label (0.0s) ---- STDOUT ---- ---- STDERR ---- ✓ Pass: gh_facebook_buck2//foobar:test_with_label (0.0s) ---- STDOUT ---- ---- STDERR ---- Build ID: a979dac1-d6b0-4cab-ae66-98020371b729 Loading targets. Remaining 0/9 80 targets declared Analyzing targets. Remaining 0/16 1 actions, 1 artifacts declared Command: test. Time elapsed: 0.3s Tests finished: Pass 2. Fail 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0 ``` Pull Request resolved: #1244 Reviewed By: scottcao Differential Revision: D93647271 Pulled By: JakobDegen fbshipit-source-id: 9c0237a1668d782cd18b9fc7011825e2ab1ae813
Summary: Disables cgroup isolation when `BUCK2_DAEMON_UUID` is present in the environment, which indicates a nested buck2 invocation. This prevents resource control issues when buck2 is invoked from within an action, similar to how `BUCK2_TEST_DISABLE_DAEMON_CGROUP` works for tests. --- AI generated Summary & Test Plan from DEV356803760 Reviewed By: AnonymousMonkey2021, christolliday Differential Revision: D107445811 fbshipit-source-id: f2b2438f0ea0473b3889156cd1a324981d510d92
Summary: Populate late-stamped ELF build-info library_versions from linker dependency metadata instead of leaving the field empty. * For C++ links, thread the final LinkArgs into stamp_build_info() and derive the same semicolon-separated, deduped, truncated version string used by the linker-wrapper build-info path. * For native Python packaging, reuse the PAR manifest shared-library metadata computation and copy it into the late-stamped _build_info before the runtime binary is stamped. Reviewed By: ambv Differential Revision: D106923418 fbshipit-source-id: 1711d8e2b47f3163577a160c0e915cdbb6c342fd
Summary: `ArtifactTag.identity` was a process-global `AtomicI64` nonce, serialized inline as the keys of `RunActionDepFiles.labels`, so a `RunAction` that uses `dep_files` re-serialized to different bytes after a daemon restart — the last non-deterministic `RunAction` field. Mirror the `TypeInstanceId` fix: `ArtifactTag::from_identity(owner, index)` hashes the analysis `owner` (`DeferredHolderKey`) plus a per-analysis sequence number (a new counter on `ActionsRegistry`, minted by `next_artifact_tag`). The `index` only needs to be unique within one analysis (tags are never compared across analyses); `owner` makes it globally unique. `ArtifactTag::new` is kept for tests only. Reviewed By: christolliday Differential Revision: D108842733 fbshipit-source-id: c4066dfc5fb4a82b1d0f44cce8023f157e86a878
Summary: This was a convenience thing so we didn't need to manually create umbrella headers in mixed modules (https://fb.workplace.com/groups/ig.swift/posts/4278276462433097), but may be affecting build times. It's been disabled in ig_apple_library / fb_apple_library in previous diffs, so now we turn it off completely. Differential Revision: D109030714 fbshipit-source-id: aae62ce890105817c0dc72a3e45cb9b3b88a7806
Summary: Release notes: https://github.com/rust-itertools/itertools/blob/v0.15.0/CHANGELOG.md Reviewed By: diliop Differential Revision: D109052853 fbshipit-source-id: a678bb75faef0e00e84ecaed3c36a466981ebb06
Differential Revision: D109071058 fbshipit-source-id: 7a975dd0f7aba33277ae5491c4e386016b7c072b
Summary: Apply starlark_fmt formatting to Buck/Starlark files in the buckformat migration list. This migrates 25 directory subtree(s) off buildifier and onto starlark_fmt by removing them from the migration/exclude list (`tools/lint/starlark/buckformat_buck_migration_dirs.txt`) and reformatting their BUCK files with `arc lint -a --take BUCKFORMAT`. Pure formatting change, mechanically generated. Reproduces the `CodemodConfigStarlarkFmtRollout` codemod transform. Report any issues in [starlark-fmt rollout](https://fb.workplace.com/groups/26797133029938925). Dirsync groups co-batched atomically in this diff: xplat_arfx_clang_format,air_llms_rules aml_integrity_solutions_sgnn,binary_transparency_if executorch_boltnn_custom_ops,buck2_protobuf_definitions c2p_secure_thrift_client_config_h,caffe2 cathode_messaging.thrift,cinder amil_thrift bypass-github-export-checks #nocancel Reviewed By: adamjernst Differential Revision: D109047295 fbshipit-source-id: 7625e3908cab452fa801b7cc763b23d691d5cbb0
Summary: Introduces `DetailedAggregatedMetricsHandle` as the single daemon-global entry point stored in DICE global data which owns the tracker (`DetailedAggregatedMetricsEventHandler`), used in the next diff which initializes the tracker conditionally. No behavior change: `start()` (used by `configure_dice`) eagerly spawns the tracker as before, and `disabled()` (used by tests) leaves the `OnceLock` empty. Reviewed By: jtbraun Differential Revision: D108967696 fbshipit-source-id: 92b0bdd7aad884d476ca66f714cd36991746ef2b
…bled Summary: The detailed-aggregated-metrics tracker keeps a daemon-lifetime map of all `analysis_nodes`. If we are paging things out this prevents that memory from being freed. Only `compute_detailed_metrics` (enabled by `[buck2] detailed_aggregated_metrics`) and `compute_action_graph_sketch` (enabled by `[buck2] log_action_graph_sketch`) read the tracker which should only be enabled in CI. Changing this to only start the track and record analysis nodes if either of these are enabled. This adds some complexity in that the metrics/sketches will be incomplete if you run a build and turn the flags on after, in which case this throws a soft_error and will output empty metrics and/or an empty sketch. In order for paging out to ultimately work in CI with these flags enabled will likely require dropping the tracker after the command that does the analysis and only supporting these outputs in the build report for that same command, which can be done later (along with adding safeguards and validating that is safe to do in CI). Reviewed By: jtbraun Differential Revision: D108969910 fbshipit-source-id: 20dfe399b9beef08e9d0a317c517e553bd988131
Summary: Follow-up from D97371147: move the `ValueSerialize` trait from `dice` into the `pagable` crate so that other crates can add ValueSerialize impls without depending on dice. Moving this in order to add a generic impl for `ResultMaybeCompatible` where that is defined without adding a dice dependency. The name ValueSerialize is somewhat specific to how this is used in dice, PagableMaybeSerialize would be more descriptive and less DICE specific, but is kind of long and would need to be renamed in tons of places so doesn't seem worth it. ___ Differential Revision: D109080752 fbshipit-source-id: a900979d316ae5c67874b8f083cb4c9aa39a308c
Summary: This was only in `graph_properties.rs` in order to not add a `dice` dependency. Can now be moved to `buck2_core` and used elsewhere. ___ Differential Revision: D109082458 fbshipit-source-id: e45c3fa905151d16c9269330f3d627f21b27bd53
Summary: D108949114 broke paging out in cases where incompatible ConfiguredTargetNodeKeys are in the graph. This change causes us to keep those compatibility errors in memory instead of trying to page them out (which fails). Reviewed By: scottcao Differential Revision: D109082459 fbshipit-source-id: 2b704b983c22bce1452b1fc913fbca60c72e01d7
Summary: Bump `http` from `1.4.0` to `1.4.1` and update generated `Cargo.toml`, `Cargo.lock`, and vendored Buck metadata. This relands the version update on top of the empty-path normalization and `pingora` CONNECT authority-form fixes that handle the regressions from the previous attempt. Reviewed By: dtolnay Differential Revision: D108443841 fbshipit-source-id: 539fe4195da40b9fbbb0d09d72a0a3f762ffeca0
Reviewed By: diliop Differential Revision: D107958650 fbshipit-source-id: 2253fe089cc74319edfd0b48e8e3262253979727
Summary: The OSS RE client batches `FindMissingBlobs` requests at a hard-coded limit of 100 digests per RPC. With many digests this serializes into a long chain of small round-trips: 10k digests at ~300ms RTT becomes a 30-second wall-clock pause on the FMB stage. Expose the limit as `[buck2_re_client] find_missing_blobs_batch_size` (default 100, preserving existing behavior). Operators with deduped get_digests_ttl calls and a server that tolerates larger requests can raise this to collapse the FMB stage into a single round-trip. Larger values are only safe when paired with `[buck2] deduplicate_get_digests_ttl_calls = true`. Without dedup, N concurrent actions each issue an N-digest request simultaneously, producing a thundering herd against the RE backend; the existing 100 default was implicitly throttling that fanout via sequential batching. Pull Request resolved: #1330 Reviewed By: IanChilds Differential Revision: D106717561 Pulled By: JakobDegen fbshipit-source-id: c41ef089a9eccbaa47ec3e8e244af06166e4eb10
Summary: Fixes tests like https://www.internalfb.com/intern/test/562950216630029, where we setup an edenfs checkout, which auto-created buck-out, but there's no .gitignore to tell sl to ignore the auto-created buck-out redirection. ___ Differential Revision: D109089445 fbshipit-source-id: 786020fba81672454e06a7dcabccd7e9b68e9dc9
Summary: We want to make sure that this doesn't prevent actions from being deduped. Anon-targets use a hash based on the action graph and that can differ between builds, so best to make sure the output is content-based too. Reviewed By: JakobDegen Differential Revision: D109016571 fbshipit-source-id: 0df220ecfe7fd6e32bbd9cac91c2fb9bd3a90f06
Reviewed By: JakobDegen Differential Revision: D109015258 fbshipit-source-id: 85aa158b0845d532fafdf099914209f281c06df1
…btargets. Summary: Repoint every build-graph reference of the `debug_style` aliases (`split-dwarf-disabled`, `split-dwarf-separate`, `split-dwarf-single`) to the direct `ovr_config//build_mode/constraints:debug_style[<v>]` subtarget. The `configuration_alias` is pure forwarding, so this is behavior-preserving. Phase 1 of dropping the `debug_style` aliases; the alias definitions come out next. Non-graph refs (docs) deferred. Reviewed By: 8Keep Differential Revision: D108856350 fbshipit-source-id: 6d47f903e8b74221909ca5f4ce629031f8546a3d
Summary: Passes the resources relative destination, required for functionality later on. Reviewed By: cosminconst Differential Revision: D108872293 fbshipit-source-id: e51b3af82bca9c9f1b84312ade84e46343ad3243
Summary: Adds a `include_build_info_file` attrib to bundle-like rules which get threaded through to the bundling script. Reviewed By: benb Differential Revision: D108872294 fbshipit-source-id: 19cf50032d34d25e697d86b8edcd8a829dabbd95
Summary: First in a stack that adds in-memory materialization to the deferred materializer. This one is a pure refactor with no behavior change. `materialize_artifact` decides what to do with an artifact via an `entry_and_method: Option<(entry, method)>`, where `Some` means "materialize this entry to disk via this method" and `None` means "nothing to materialize, only deps". The upcoming in-memory work adds two more cases (spill in-memory bytes to disk, and spill an in-flight in-memory materialization) that don't fit the `Option<(entry, method)>` shape. Replace the `Option` tuple with an `EntryDetails` enum carrying `Entry` and `DepsOnly` variants, so later diffs can add `Spill` and `SpillFromFuture` variants without contorting the control flow. Drop the now-unused `Either` and box the materialization future instead. Reviewed By: christolliday Differential Revision: D108929122 fbshipit-source-id: 411915059b10f85bfa663b911255da5dc46463c7
Summary: Automated semver-compatible version bump. bypass-github-export-checks Reviewed By: dtolnay Differential Revision: D109161615 fbshipit-source-id: 9dba143616e028a0aee5b589109484a38ef508f3
Summary: buck2's scheduled materializer clean can run in an adaptive low-disk mode, selected by `buck2.clean_stale_low_disk_artifact_ttl_hours = adaptive`. We want to know, per invocation, whether this mode is active and — when it is — what its parameters are set to, so we can analyze its rollout and behavior in Scuba. This adds new free-form invocation tags (via the existing `buck2_data::TagEvent` → `InvocationRecord.tags` path that already carries tags like `miniperf:true`): - Not active: `adaptive-clean-stale:false` - Active: `adaptive-clean-stale:true`, `adaptive-clean-stale-threshold-percent:<n>`, `adaptive-clean-stale-min-ttl-hours:<n>` `adaptive-clean-stale:false` is always emitted when the mode is not active so Scuba can distinguish "off" from "no data". The tag-producing logic lives in a new `CleanStaleConfig::adaptive_telemetry_tags` associated fn, co-located with the config parsing and unit-tested. `ctx.rs` re-parses the clean-stale config (cheap buckconfig lookups, consistent with the other inline `root_config.parse(...)` calls there) and appends its tags to the per-command `TagEvent`. No proto change is needed. Reviewed By: IanChilds Differential Revision: D108810911 fbshipit-source-id: 805c1a41818f4914f37b43299362324863e6dd40
Summary: Automated semver-compatible version bump. bypass-github-export-checks Reviewed By: dtolnay Differential Revision: D109170488 fbshipit-source-id: dc1a371bfe9bca27e1638062da98f43722d2a8eb
Summary: Automated semver-compatible version bump. bypass-github-export-checks Reviewed By: dtolnay Differential Revision: D109179310 fbshipit-source-id: 1a83c871530edc8fd9602a9c51b6a8e62822cbb2
Summary: Automated semver-compatible version bump. bypass-github-export-checks Reviewed By: dtolnay Differential Revision: D109179309 fbshipit-source-id: f36a659d033b9e961aaafef4b0247db70645d842
Summary: Automated semver-compatible version bump. bypass-github-export-checks Reviewed By: dtolnay Differential Revision: D109179300 fbshipit-source-id: bab3f63d55e8779c9a24421e94d35238e2cdbc78
Summary:
Since {D109214752} `rust-project develop` is failing on projects that depend on `cxx`.
```lang=log,counterexample
2026-06-21T06:09:37.357348Z INFO rust_project::cli::develop: resolving aliased libraries kind="progress"
2026-06-21T06:09:37.357398Z INFO rust_project::buck: resolving aliased dependencies
2026-06-21T06:09:37.764930Z ERROR rust_project: error=failed to deserialize command output error.sources=[command `cd "/data/users/dtolnay/fbsource" && env -u RUST_BACKTRACE -u RUST_LIB_BACKTRACE "buck2" "--isolation-dir" ".rust-analyzer" "--client-metadata=id=rust-project" "cquery" "--oncall" "rust_devx" "-c=rust.rust_project_build=true" "-c=project.package_boundary_exceptions=." "--output-attribute" "actual" "kind('^alias$', deps(%Ss))" "fbcode//buck2/integrations/rust-project:rust-project" "fbcode//buck2/integrations/rust-project:rust-project-unittest" "--target-universe" "fbcode//buck2/integrations/rust-project:rust-project,fbcode//buck2/integrations/rust-project:rust-project-unittest"` (exit code: exit status: 0)
source.sources=[JSON parse error in object 'fbsource//third-party/rust/fixups/cxx:cxx-core-toolchain (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang21-no-san-opt-by-default#f64fcafa79f2a2cf).actual': invalid type: null, expected a string at line 1269 column 18] kind="error"
```
The error ***invalid type: null, expected a string at line 1269 column 18*** is from this part of the cquery output:
```lang=json
{
...
"fbsource//third-party/toolchains/jdk:java (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang19-no-san-opt-by-default#dba890a13cfe4d88)": {
"actual": "fbsource//third-party/toolchains/jdk/21:java (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang19-no-san-opt-by-default#dba890a13cfe4d88)"
},
"fbsource//third-party/rust/fixups/cxx:cxx-core-toolchain (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang21-no-san-opt-by-default#591b18a9ce45c958)": {
"actual": null
},
"fbsource//third-party/rust:cxx (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang21-no-san-opt-by-default#591b18a9ce45c958)": {
"actual": "fbsource//third-party/rust/vendor/cxx:1 (cfg:core_build_mode-linux-x86_64-fbcode-platform010-clang21-no-san-opt-by-default#591b18a9ce45c958)"
},
...
}
```
Reviewed By: JakobDegen
Differential Revision: D109233496
fbshipit-source-id: c4326b51fb6f14995521d7e00a7ef4c277b8db6e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.