Bug #12557
The mergebasebranch option does the base branch merge too late
0%
Description
[Note that this problem predates the mergebasebranch
option, since we did the same (but only on Jenkins) before]
Right now when we run rake build
in a non-base branch it will be run at the Git state before the base branch merge, resulting in mixed Git state. And since the merge happens in auto/build
it will obviously also be run in an pre-merge state.
The cleanest solution I can think of is:
- remove the
mergebasebranch
option and the base branch merge code inauto/build
- introduce a Rake task
prepare-ci-build
that does the base branch merge - make jenkins build with:
rake prepare-ci-build && rake build
This way we limit this problem to only prepare-ci-build
, which should be so simple that it essentially never will change.
Subtasks
Related issues
Related to Tails - |
Resolved | 2017-08-28 |
History
#1 Updated by intrigeri 2017-05-17 09:46:31
- Target version changed from Tails_3.0 to Tails_3.2
(This class of problems has been around forever, let’s focus on what we really need to do during the 3.0 cycle.)
#2 Updated by anonym 2017-06-29 13:33:02
- blocks
Feature #13239: Core work 2017Q3: Test suite maintenance added
#3 Updated by anonym 2017-06-29 13:50:23
- blocked by deleted (
)Feature #13239: Core work 2017Q3: Test suite maintenance
#4 Updated by anonym 2017-06-29 13:50:45
- blocks
Feature #13234: Core work 2017Q3: Foundations Team added
#5 Updated by intrigeri 2017-09-02 10:48:50
- related to
Bug #14459: Some branches fail to build an ISO because we merge their base branch too late added
#6 Updated by intrigeri 2017-09-02 10:49:29
- Category changed from Continuous Integration to Build system
- Target version deleted (
Tails_3.2)
Let’s handle the short-term fix on Bug #14459, and the long-term, better solution here.
#7 Updated by intrigeri 2017-10-01 09:49:52
- blocked by deleted (
)Feature #13234: Core work 2017Q3: Foundations Team
#8 Updated by intrigeri 2017-11-10 10:38:51
Another problem caused by this one: when something in our build system gets a new dependency that must be installed in the basebox, everything’s fine in the base branch, but it wasn’t (manually) merged into some topic branch, then the build of said topic branch fails because it’ll be using an older basebox that lacks this dependency, but we will merge the base branch later and then run code that has this dependency. This just happened to me (/usr/bin/env: 'ruby': No such file or directory
on a branch based on devel).
#9 Updated by intrigeri 2019-05-19 08:28:04
anonym wrote:
> The cleanest solution I can think of is:
>
> * remove the mergebasebranch
option and the base branch merge code in auto/build
> * introduce a Rake task prepare-ci-build
that does the base branch merge
> * make jenkins build with: rake prepare-ci-build && rake build
>
> This way we limit this problem to only prepare-ci-build
, which should be so simple that it essentially never will change.
I like this design!
One nitpick though: the naming of this new Rake task suggests that merging the base branch is only relevant for CI purposes, which discourages developers from using it, while IMO we should instead encourage developers to use it (I see too often fellow devs who don’t understand why their branch builds & works locally, while it either FTBFS or does not work on Jenkins, the discrepancy being explained by the fact their topic branch lags behind its base branch). So I would give it a less loaded and more factual name, such as rake merge_base_branch
(we use underscores and no hyphens in our current task names).
#10 Updated by intrigeri 2019-05-19 08:29:14
(Context: while working on Bug #16730 today, I had once again to deal with the fact we do crazy Git operations in auto/config
, which is obviously not the right place to change under our feet the state of the code we’re going to run.)