Project

General

Profile

Bug #12557

The mergebasebranch option does the base branch merge too late

Added by anonym over 2 years ago. Updated 3 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Build system
Target version:
-
Start date:
05/17/2017
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

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 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.


Related issues

Related to Tails - Bug #14459: Some branches fail to build an ISO because we merge their base branch too late Resolved 08/28/2017

History

#1 Updated by intrigeri over 2 years ago

  • 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 about 2 years ago

  • Blocks Feature #13239: Core work 2017Q3: Test suite maintenance added

#3 Updated by anonym about 2 years ago

  • Blocks deleted (Feature #13239: Core work 2017Q3: Test suite maintenance)

#4 Updated by anonym about 2 years ago

#5 Updated by intrigeri almost 2 years ago

  • Related to Bug #14459: Some branches fail to build an ISO because we merge their base branch too late added

#6 Updated by intrigeri almost 2 years ago

  • Category changed from Continuous Integration to Build system
  • Target version deleted (Tails_3.2)

Let's handle the short-term fix on #14459, and the long-term, better solution here.

#7 Updated by intrigeri almost 2 years ago

#8 Updated by intrigeri almost 2 years ago

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 3 months ago

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 3 months ago

(Context: while working on #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.)

Also available in: Atom PDF