Conversation
shs96c
left a comment
There was a problem hiding this comment.
Where we host the image is the only thing I'm seeing here I'm not comfortable with
| "/usr/include/c++/11/backward", | ||
| ], | ||
| cxx_flags = ["-std=c++0x"], | ||
| cxx_flags = ["-std=c++17"], |
There was a problem hiding this comment.
If we're setting this here, I think we can remove the equivalent entries in the .bazelrc. Can be done in a follow up PR.
There was a problem hiding this comment.
Hmm, isn't this file only enabled on RBE, while .bazelrc is enabled for everything?
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Review Summary by QodoUpdate Bazel C++ toolchain to Bazel 9 with C++20 modules and Ubuntu 22
WalkthroughsDescription• Update Bazel C++ toolchain configuration to Bazel 9 with rules_cc migration • Add support for C++20 modules and modern compiler features • Update RBE container image to Ubuntu 22 with GCC 11 • Switch from JRuby to MRI Ruby for RBE builds • Add sanitizer features (ASAN, TSAN, UBSAN) and improved macOS support Diagramflowchart LR
A["Bazel 9 Migration"] --> B["rules_cc Updates"]
B --> C["C++20 Module Support"]
B --> D["Toolchain Config Refactor"]
E["Ubuntu 22 RBE Image"] --> F["GCC 11 Compiler"]
F --> G["Updated Include Paths"]
H["MRI Ruby Support"] --> I["Remove JRuby Dependency"]
D --> J["New Features: Sanitizers, macOS Support"]
File Changes1. common/remote-build/cc/cc_toolchain_config.bzl
|
Code Review by Qodo
1. parse_option can exit wrapper
|
|
Code review by qodo was updated up to the latest commit 7adbc4d |
| set -eu | ||
|
|
||
| OUTPUT= | ||
|
|
||
| parse_option() { | ||
| opt=$1 | ||
| if [ "$OUTPUT" = "1" ]; then | ||
| OUTPUT=$opt | ||
| elif [ "$opt" = "-o" ]; then | ||
| # output is coming | ||
| OUTPUT=1 | ||
| fi | ||
| } |
There was a problem hiding this comment.
1. parse_option can exit wrapper 📘 Rule violation ☼ Reliability
cc_wrapper.sh enables set -e but parse_option() can return a non-zero status for most arguments, which can prematurely terminate the wrapper and break header parsing/compilation. This violates the expectation that CI/automation scripts behave fail-safely with robust command handling.
Agent Prompt
## Issue description
`common/remote-build/cc/cc_wrapper.sh` uses `set -eu` and calls `parse_option` as a simple command. In POSIX `sh`, a function’s return status is the status of its last executed command; here that can be the `[ ... ]` test, which returns `1` for most args. With `set -e`, that non-zero return can abort the wrapper.
## Issue Context
This wrapper runs in build actions; unexpected early exits can cause flaky or consistently failing builds in RBE/CI.
## Fix Focus Areas
- common/remote-build/cc/cc_wrapper.sh[19-31]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Updates the Ruby ruleset for Bazel, which now supports MRI (CRuby) toolchains on RBE. We no longer need to use JRuby for the RBE job and can stick to the default Ruby interpreter.