Patching mechanism for releasing third party package in ROS2

I am releasing a (third party) package for the first time, and #33777 has just been merged. The build log is showing compilation and clang-tidy warnings. I have 2 questions regarding this problem:

  1. I followed this ROS1 bloom tutorial and made patches to the upstream CMakeLists.txt to exclude building some of the targets. However, from the build log, it seems like the upstream repository instead of the release repository is cloned and it results in building the full sets of (default target) declared in the upstream repo. The compile warnings also come from the build targets that are supposed to be excluded. How does patching works for the ROS2 build farm? Is it still the same as what’s shown in the ROS1 tutorial?
  2. Is clang-tidy run on the entire codebase on the upstream repo? Since I do not have direct control over the upstream repo, is there a way to ignore clang-tidy warnings for third-party packages like the one I am releasing for?

This is probably better suited to either a question on ROS Answers or the Buildfarm - ROS Discourse category here (maybe a mod can move it there?).

This is a “devel” or “source build” job rather than a packaging job. The build farm configures devel jobs for all repositories by default and builds from the upstream source. If you’re not a maintainer of the package upstream, it’s probably easiest to just turn off the devel and PR jobs on the build farm for the third party package by adding the entries test_commits and test_pull_requests both to false in the source entry for this repository as we do for fastrtps.

I’m not actually sure if clang-tidy is being run. llvm and clang are not being installed in the build environment. It looks like the compiler warnings for this build are being mistaken matched as clang-tidy by the regular expression-based warning parser. As mentioned above, disabling the devel jobs for third party packages (which likely have their own CI infrastructure) is the usual course of action.

Thanks for the suggestions! A PR is create here.