Repository navigation
bazel/rc: Rationalize flags - #47806
Conversation
c70c945 to
b2a7be9
Compare
3273e17 to
af61757
Compare
ee721c9 to
ef6356a
Compare
|
/retest |
jwendell
left a comment
There was a problem hiding this comment.
Thanks for this cleanup, it simplifies things a lot. A few things I noticed, mostly about moving flags around (inline below).
Nit (file not in the diff): .devcontainer/README.md (lines 28-31) still tells users to pass --config=remote, which no longer exists in .bazelrc.
| build --per_file_copt=contrib/kafka/.*\.cc@-Wno-old-style-cast | ||
|
|
||
| # protobuf | ||
| common --incompatible_enable_proto_toolchain_resolution=true |
There was a problem hiding this comment.
Dropping prefer_prebuilt_protoc looks fine, since it defaults to True now. But --incompatible_enable_proto_toolchain_resolution still defaults to false on Bazel 8.8.0 (bazel help build). Without it, protobuf's toolchain_helpers.bzl falls back to the legacy --proto_compiler path. I think that means we go back to building protoc from source, which undoes #46570.
I'm not sure the --THIS_CC_TOOLCHAIN_IS_BROKEN guard below would catch this. It matches bazel-out/.*/bin/external/protobuf.*/protoc, but protoc's sources are under external/protobuf+/src/....
Also, bazel/tests/external/.bazelrc and bazel/tests/codeql/.bazelrc still set this flag. Was removing it from the root intentional? If not, could we keep it here, or in ci.bazelrc so every workspace gets it?
There was a problem hiding this comment.
so i originally removed all on bot advice - then tested and saw it was using the non-prebuilt so put back in external - will update
| # TODO(phlax): Remove this once ci lands | ||
| if [[ -e repo.bazelrc ]]; then | ||
| cp -a repo.bazelrc user.bazelrc | ||
| fi |
There was a problem hiding this comment.
This copy runs after build_setup.sh is sourced. build_setup.sh already calls bazel info --announce_rc to detect remote exec/cache, and uses that to set --test_tmpdir and the new BAZEL_QUERY_OPTIONS. With .bazelrc no longer try-importing repo.bazelrc, runs that still write repo.bazelrc would miss the remote config there.
Would it make sense to do the copy before sourcing build_setup.sh? Also, this overwrites any existing user.bazelrc. That's probably fine in CI, but I wanted to mention it.
There was a problem hiding this comment.
yeah - will move it higher - its a disaster waiting to happen so will need to be removed immediately after landing
| ) | ||
|
|
||
| bool_flag( | ||
| name = "libc++", |
There was a problem hiding this comment.
@envoy//bazel:libc++ and @envoy//bazel:libstdc++ have been public flags since #39755. Downstreams that set --@envoy//bazel:libc++=true in their rc files will now fail with "no such target". force_libcpp got a back-compat alias. Could these get either a deprecated no-op bool_flag for one release, or a line in the build__remove-config-clang.rst changelog?
There was a problem hiding this comment.
ill update the changelog - i think it makes more sense to not keep non-functional flags around
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
…the two carried patches it contains are dropped (#980) (#1643) The pin is one fact in three places and moves as one: envoy and envoy_api (proxy/MODULE.bazel) and the envoyproxy/bazel-registry commit (proxy/.bazelrc, 5db29c09de17218d24f58c665be38208284754d8), written by scripts/bump-envoy-pin.sh. rules_python follows what the envoy module requests (2.2.0 -> 2.3.3). The lockfile is refreshed. Dropped, because Envoy 189f198 contains them: - envoy-47743-udp-hot-restart-forwarding-netns (envoyproxy/envoy#47743, a644fc670e): the carried hunks reverse-apply cleanly to the snapshot. - envoy-aether1022-exec-in-netns-thread-self (envoyproxy/envoy#47776, 7d6ca3273c): the snapshot opens /proc/thread-self/ns/net. The carried fallback for kernels older than 3.17 and its per-thread model test go with it. Kept, in the same order: - 47740 (still open upstream): unchanged content, hunk positions refreshed. - aether1050: replaced by the diff of its upstream pull request, envoyproxy/envoy#47834 at 72408727eb, docs and changelog dropped. Same source as before plus three counters, server.hot_restart_udp_forwarding_{datagrams,retries,dropped}; the test hunks no longer carry the 47743 test changes. - aether1054: rebased over envoyproxy/envoy#47991, which rewrote ConnectionManagerImpl::onDrain() to drain idle connections proactively in the last third of the drain time. That arms nothing when the drain time leaves no room after the drain timeout (the chart's 10s with the default 5s), so the carried idle HTTP/3 drain stays, armed beside it from armIdleHttp3DrainTimer(). Upstream's ProactiveDrain* tests notify the drain before a codec exists and turn the carried timer off; the carried gradual case now asserts both timers. - aether1054b, aether1054c, aether1074, aether1126: unchanged content. proxy/.bazelrc: envoyproxy/envoy#47806 removed the --@envoy//bazel:libc++ flag and the force_libcpp define, so both leave the libc++ config; nothing else upstream removed from its own .bazelrc is required to go, and the rest is kept as built before. Refs #980 Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5.5 <[email protected]>
When envoyproxy#1627 synced .bazelrc with upstream Envoy PR envoyproxy/envoy#47806, it removed try-import %workspace%/repo.bazelrc from the bottom of .bazelrc. However, .github/workflows/_ci.yml still writes the CI compiler and resource configurations to repo.bazelrc, so Bazel no longer loads those settings during CI runs. This PR replaces repo.bazelrc with user.bazelrc in .github/workflows/_ci.yml (and adds the upstream Envoy fallback in ci/do_ci.sh to copy repo.bazelrc to user.bazelrc if present), as user.bazelrc remains imported at the bottom of .bazelrc and ignored by .gitignore. Signed-off-by: tomjzzhang <[email protected]>
…7893) Commit Message: http3: keep the persistent QUIC info alive while its pools use it Additional Description: Removing an HTTP/3 upstream cluster while it has requests in flight can crash Envoy with a use-after-free in the QUIC client connection (SIGSEGV/SIGBUS in `quic::QuicConnection::OnCanWrite` → `CanWrite`, reached from `EnvoyQuicClientConnection::onFileEvent`, or from an alarm). `Quic::PersistentQuicInfoImpl` holds the QUIC helpers shared by a cluster's HTTP/3 connections: the connection helper with its `EnvoyQuicClock`, the alarm factory, the QUIC config, the crypto stream factory and the writer factory. Since #19862 it is owned by the thread-local `ClusterEntry` (`quic_info_`, a `unique_ptr`), `Http3ConnPoolImpl` and `ConnectivityGrid` hold it by reference, and every upstream QUIC connection keeps raw pointers into it (`QuicConnection::clock_`, each alarm's clock). When CDS removes the cluster, the worker erases the thread-local cluster and `~ClusterEntry` calls `drainConnPools()` with `DrainAndDelete`, which lets busy clients finish their streams, and then destroys its members, including the info. The pools live on in `host_http_conn_pool_map_` until their streams end, with connections pointing into freed memory; the next write-ready event or alarm reads the freed clock. It needs streams in flight at the removal, so it is intermittent. `Http3ConnPoolImpl`'s destructor already makes sure connections are torn down before the pool drops the info; the cluster entry's ordering was the gap. Fix: `PersistentQuicInfoPtr` becomes a `shared_ptr`, and `Http3ConnPoolImpl`, `Http3::allocateConnPool` and `ConnectivityGrid` take and hold it instead of a reference. The cluster keeps creating and holding the info and passes its pointer to the pools, so the info lives until the last pool using it is gone (a pool destroys its connections first). `createQuicNetworkConnection` still takes a reference; it is only called by a pool that holds the info. No behavior change on a healthy path. Testing: `Http3ConnPoolImplTest.PoolKeepsPersistentQuicInfoAliveAfterItsCreatorReleasesIt` creates the info as the cluster manager does, builds a pool on it and releases the creator's reference: the info must stay alive while the pool exists and be freed with it (fails without the fix: freed at release). The HTTP/3 pool, connection grid, cluster manager and QUIC client connection factory tests and the QUIC HTTP and multiplexed integration tests pass. Found through a crash on a deployment that removed HTTP/3 clusters under load; the fault was symbolized to the clock read in `QuicConnection::CanWrite`. Verified on main (after #47806): the new test and the HTTP/3 pool and grid tests pass, and CI is green. Risk Level: low Testing: unit test (new), existing HTTP/3 pool, grid, cluster manager and QUIC integration tests Docs Changes: N/A Release Notes: bug_fixes Platform Specific Features: N/A --------- Signed-off-by: Bruno Palermo <[email protected]>
…lrc (#1638) * ci: write CI Bazel flags to user.bazelrc instead of removed repo.bazelrc When #1627 synced .bazelrc with upstream Envoy PR envoyproxy/envoy#47806, it removed try-import %workspace%/repo.bazelrc from the bottom of .bazelrc. However, .github/workflows/_ci.yml still writes the CI compiler and resource configurations to repo.bazelrc, so Bazel no longer loads those settings during CI runs. This PR replaces repo.bazelrc with user.bazelrc in .github/workflows/_ci.yml (and adds the upstream Envoy fallback in ci/do_ci.sh to copy repo.bazelrc to user.bazelrc if present), as user.bazelrc remains imported at the bottom of .bazelrc and ignored by .gitignore. Signed-off-by: tomjzzhang <[email protected]> * ci: trigger CI run 2 to verify stability Signed-off-by: tomjzzhang <[email protected]> * ci: trigger CI run 3 to verify stability Signed-off-by: tomjzzhang <[email protected]> --------- Signed-off-by: tomjzzhang <[email protected]>
…1654) In Bzlmod (envoyproxy/envoy#47806), single_version_override declarations and dev_dependency module extensions in a non-root module (@envoy) are ignored by Bazel and only take effect in the root MODULE.bazel. Previously, Nighthawk's Envoy update process only synced bazel_dep versions, leaving Envoy's dependency overrides and shared module extensions out of sync. This PR places Envoy's single_version_override dependencies in Nighthawk's root MODULE.bazel and updates both the automated updater script and manual update guide to keep single_version_override pins and shared module extensions synced with Envoy. Signed-off-by: tomjzzhang <[email protected]>
--config=clang