-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump debhelper compat to 11 #643
base: master
Are you sure you want to change the base?
Conversation
All supported Ubuntu distros have at least 11: https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=debhelper
This enables parallel builds by default and more, see man debhelper for a list. |
This is a potentially high-impact change. I don't think the ROS buildfarm is set up to handle parallel builds within the binarydeb jobs in a deterministic fashion. From the debhelper(7) page in Buster:
|
Hi Steven, thanks for commenting.
* Steven! Ragnarök ***@***.***> [2021-07-12 10:59]:
> This enables parallel builds by default and more, see man debhelper for a list
This is a potentially high-impact change. I don't think the ROS buildfarm is set up to handle parallel builds within the binarydeb jobs in a deterministic fashion.
Can you explain what your fear here?
To give you some background, we are talking about debhelper, cmake and
make here which all support parallel build so well that the Debian
project enabled it by default. I successfully tested this on a some
bigger private ROS build farms as well. The only thing I see problematic
is the number of parallel jobs on the build farm but you can customize
that with: DEB_BUILD_OPTIONS parallel.
The other changes in debhelper are mostly not relevant for ROS or strict
improvements, but I'm happy to discuss details.
Cheers Jochen
|
My biggest concerns are cross-build resource usage and log output determinism. We currently provision the build farm to run 4 executors (4 simultaneous Jenkins jobs) on a 4 core CPU VM instance, that is, 1 CPU core per executor, and if we enable the parallel features then there will be more contention between jobs running on the same instance resulting in less consistent and predictable build times. As you mention there are ways to influence the number of parallel jobs but we'd want to make sure that we employ these in our build farm configurations rather than in the bloom templates since otherwise the updated feature would not bring any benefit to others who want to opt in to the parallel builds. I'm additionally concerned about build log output being out of order or inconsistently ordered in our build farm logs, thus making problems harder to diagnose. The other changes do look like benefits on the surface. My experience tells me that any change, positive or not, usually comes with some consequences. The separation between bloom execution time and package build time also makes this more challenging to partially roll out or roll back if needed. My favorite approach for things like this is to roll them out in stages. First trying it in Rolling and then extending it to other distributions as it proves itself. But that doesn't make it easy to deploy for your own distributions until the general rollout. |
I think this is a point in favor of bumping the compat level, because with Debhelper 10+ you can fully determine parallelism via the
I agree that parallelism for the ROS build farm is likely more trouble than it is worth, considering that the workload if the builder is generally high enough to achieve parallelism by building multiple packages. But as outlined above, the compat bump gives more flexibility to others without sacrificing anything for the build farm.
I think you overestimate the complexity of this migration, because unlike the vast Debian ecosystem, all ROS packages are built from the very restricted template files in
Personally, I would go even further and bump to compat level 12, at least for distributions that use Ubuntu 20.04 or later. |
> I'm additionally concerned about build log output being out of order or inconsistently ordered in our build farm logs, thus making problems harder to diagnose.
I agree that parallelism for the ROS build farm is likely more trouble than it is worth, considering that the workload if the builder is generally high enough to achieve parallelism by building multiple packages in parallel.
My experience is different here. The ROS build farm triggers all
downstream jobs by default. Reducing the build time of single jobs by
building in parallel, reduced the time for the complete chain
significantly. It would probably be good to collect some statistics if
the job tree is rather deep or wide and decide based on this.
Still, as discussed, this would be something to tune on the build farm
level not in user controlled bloom.
What *will* become more problematic is Debhelper 13, because it turns uninstalled files from `debian/tmp` into a hard error, and Debhelper 14, which will disable `RPATH` unconditionally for `cmake` and thus affect `dh_auto_test` runs.
13 would only be a problem with `.install` files selecting what to
install, this is not supported by bloom.
|
Off the cuff, I would say that the public Now that said, we haven't used Bloom for years as needing to create tags to get binaries doesn't fit our development model. And I know some other groups have gone to similar approaches with containerization, bazel-based ROS builds, and so on. So it probably doesn't make too much sense to optimize Bloom for anything other than the needs of the OSRF-maintained build farm. |
* Mike Purvis ***@***.***> [2021-07-16 13:18]:
Now that said, we haven't used Bloom for years as needing to create tags to get binaries doesn't fit our development model. And I know some other groups have gone to similar approaches with containerization, bazel-based ROS builds, and so on. So it probably doesn't make too much sense to optimize Bloom for anything other than the needs of the OSRF-maintained build farm.
I disagree here. I use bloom in private and public CI systems, lately
for example:
ros-industrial/industrial_ci#697 (comment)
|
Oh I don't doubt that it's usable (and indeed used) in private systems, but I guess another way to look at it is that the deeper your dependency tree is, the more you will run up against the limitations of not being able to do broad-scale integration testing ahead of merging or even tagging. That "one repo at a time" approach to prerelease testing hinges on a) the APIs of your dependencies being completely locked down and b) no feature or piece of functionality ever spanning multiple repos in a way that could require simultaneous updates. Anyway, didn't mean to hijack here— despite that I believe |
Oh I don't doubt that it's usable (and indeed used) in private systems, but I guess another way to look at it is that the deeper your dependency tree is, the more you will run up against the limitations of not being able to do broad-scale integration testing ahead of merging or even tagging. That "one repo at a time" approach to prerelease testing hinges on a) the APIs of your dependencies being completely locked down and b) no feature or piece of functionality ever spanning multiple repos in a way that could require simultaneous updates.
Uhm, the script I posted above can run ahead of merging and tagging. You can run it from a workspace like you run catkin or colcon and test API breaks over multiple repos as well. It is also really fast if you apply the hints from https://wiki.debian.org/sbuild.
|
I am getting this when building on Ubuntu jammy:
This issue should probably be revisited. |
Yep. It has been in my queue. It hasn't been a top priority item because things which are "deprecated" will remain present for the lifetime of Ubuntu 22.04. That isn't an excuse to wait until the last minute but we've been hitherto occupied with changes that are happening in 22.04 rather than after 22.04. As previously discussed, the question is not whether to make the change. We must. But how to do it in a way that is well tested, minimally disruptive, and still satisfying to highly motivated bloom use cases like @jspricke's. I'm pretty resistant to making the debhelper compat version a configurable setting as Bloom is meant to help package maintainers by trying to insulate them from the intricacies of packaging by adhering to a common set of practices that are mostly suitable for most packages. It is possible right now for a package to change the debhelper compat version on a per-package basis using bloom's patch workflow.
No disagreement that this is a better, more consistent interface, but that does not mean getting from here to there requires no engineering time compared with retaining the status quo (where it is neither parallel nor configurable by default).
The right thing to do is measure and given the time there are dozens of different combinations and configurations I would love to test. But by my observation many ROS 2 packages are on the small side and the majority of the build time is spent configuring the environment rather than building the package. In-build parallelization will help some of the larger packages like rclcpp and rviz but my expectation is that it won't be worth the loss of deterministic build logs or multi-executor agent hosts. If we move to parallel builds on the build farm it would most likely be as part of a much larger effort to improve build farm throughput.
Thanks for taking the time to review the changelogs and share your summary! It's great to have additional eyes on these things.
I'm not so much estimating the complexity but rather the small, subtle, changes which may not even be captured in the changelog documentation. This is not meant to disparage the efforts of the Debian project and team, who in general produce fantastic change logs and documentation, but to acknowledge that when working with complex software at this scale there's almost always "something" that wasn't anticipated. This isn't an urgent change that needs to be made because the status quo is unsound and as such I'd like to be deliberate enough that we don't upset that stability.
I find this idea appealing because it pushes us to start being more proactive
Bloom was originally written with debian/compat at 7, updated to 9 in #277 (then conditionally in #279) which was 2014 and then not changed since then. It would be nice to have a strategy for reviewing and phasing in new compat versions as they become available so we do the research and testing more frequently and while eyes are on a new platform, rather than making a change that would retroactively affect earlier platforms, which is one concern about rolling out compat 11 on all platforms now.
As @jspricke mentioned above, I'm not sure the that change in debhelper 13 affects bloom while we're still producing only a single package per source package. If we ever do implement package splitting handling that will be one of things we have to do to bring that up. The I think the next steps for this change are:
Not listed above is buying @jspricke a 🍺, mostly because we shouldn't wait until the end to do so. |
That's what default config is for, right? Purposefully not making things configurable just decreases your user base. For example, I would like to use bloom generators to work with ROS packages, even though I don't want to use the gbp release process, but things like this make me want to get away from a dependency on bloom as soon as I can (or hard fork it). |
This is actually not that hard, see my minimal example here: ros-industrial/industrial_ci#697 (comment) I actually think it would be easier if the buildfarm does the blooming and accepts tagged upstream repos instead of gbp releases. That way it would be easy to bump the compat version and test it or do other fixes. I did that for the last big buildfarm I build and it worked really well. |
Yes, I guess I should rephrase: I am already using the bloom generators in my custom build, but wishing I could configure the debhelper compat version without a fork.
@nuclearsandwich could you elaborate on this? I'm having trouble finding how to do this in the docs |
See my script linked above ;). |
Oh, I missed the key line you were referring to. You are just overriding it in the file after the fact. I suppose that is simple enough. Thanks!
|
just to say, nowadays we prefer a |
By now the version might as well be 12: https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=debhelper |
All supported Ubuntu distros have at least 11:
https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=debhelper