Thanks for raising the correctness aspect, José. We currently have a compromise solution since PRs are not required to be up-to-date with trunk before merging. Basically, as long as a PR does not have conflicts and has passing tests, it can be merged. That's the situation today. We rely on the trunk builds to retroactively inform us about problems.
The merge queue is probably the solution to your concern. This would allow us to guarantee that each PR has run the tests with the latest code on trunk one at a time. We still can't turn this feature on, but I'm hopeful it will be available to us soon. For this PR, I have kept the "Compile and Check Java" step building the merge ref (trunk + PR). This will retain some of the previous behavior and at least help prevent breaking trunk due to compilation errors. In order to benefit from the build cache, contributors will need to pull in trunk often. I'm hoping this is a good incentive to keep the branch updated. > I never found that the limiting factor in merging a PR to Apache Kafka is the build times. I have :) It really depends on the nature of the change. Right now, the community is driving a lot of small cleanup/removal PRs for 4.0 which are easy to review but take time to test and build (and re-build). -David A On Fri, Jan 17, 2025 at 4:30 PM José Armando García Sancio <jsan...@confluent.io.invalid> wrote: > Thanks David. > > On Fri, Jan 17, 2025 at 11:55 AM David Arthur <mum...@gmail.com> wrote: > > > > I have a simple patch which changes our PRs to build the HEAD of the PR > > rather than the merge ref. > > > > https://github.com/apache/kafka/pull/18449 > > We shouldn't sacrifice correctness for performance. The tests need to > run against what has been committed to the trunk branch. Otherwise the > onus is on the contributor and committer to make sure that the PR > branch is up to date enough. > > I never found that the limiting factor in merging a PR to Apache Kafka > is the build times. The limiting factor is committer review time. > > Thanks, > -- > -José > -- David Arthur