Project

General

Profile

Bug #9406

Jenkins builds sometime fail with "Your local changes to the following files would be overwritten by merge"

Added by intrigeri over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Continuous Integration
Target version:
Start date:
05/14/2015
Due date:
% Done:

100%

Feature Branch:
bugfix/9406-jenkins-build-in-clean-git
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

E.g.:

+ git merge --no-edit origin/devel
error: Your local changes to the following files would be overwritten by merge:
    wiki/src/doc/about/features.de.po
    wiki/src/doc/about/features.fr.po
    wiki/src/doc/about/features.pt.po
    wiki/src/doc/advanced_topics.index.de.po
    wiki/src/doc/advanced_topics.index.fr.po
    wiki/src/doc/advanced_topics.index.pt.po
    wiki/src/doc/anonymous_internet/Tor_Browser.de.po
    wiki/src/doc/anonymous_internet/Tor_Browser.fr.po
    wiki/src/doc/anonymous_internet/Tor_Browser.pt.po
    wiki/src/doc/first_steps/installation.de.po
    wiki/src/news/version_1.4.de.po
    wiki/src/news/version_1.4.fr.po
    wiki/src/news/version_1.4.pt.po
    wiki/src/support/faq.de.po
    wiki/src/support/faq.fr.po
    wiki/src/support/faq.pt.po
    wiki/src/support/known_issues.de.po
    wiki/src/support/known_issues.fr.po
    wiki/src/support/known_issues.pt.po
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
    wiki/src/doc/advanced_topics/paperkey.de.po
    wiki/src/doc/advanced_topics/paperkey.fr.po
    wiki/src/doc/advanced_topics/paperkey.pt.po
Please move or remove them before you can merge.

I suspect that running git clean -fdx before merging would be enough to fix that.

Associated revisions

Revision 8eb7e7c9 (diff)
Added by intrigeri over 4 years ago

Remove files that are not under version control when building in Jenkins.

Jenkins is keeping per-build workspaces around, as shown by errors seen when it
merges the base branch into the to-be-built branch: "The following untracked
working tree files would be overwritten by merge". That's probably a useful
optimization, except it breaks the build e.g. when new translatable files have
been introduced without the corresponding PO files at some point.

Will-fix: #9406

Revision d81c8c33 (diff)
Added by intrigeri over 4 years ago

Don't modify files in the source tree before having possibly merged the base branch into it.

Previously, when building in Jenkins, we refreshed the wiki (twice) and
translations before merging the base branch. As a result, we're seeing build
failures with the "Your local changes to the following files would be
overwritten by merge" error message.

Let's now build the wiki and refresh translations only after having merged the
base branch, which makes more sense anyway: we want to include changes from the
base branch into the wiki and translations. And while we're at it, let's refresh
the wiki only once when building in Jenkins.

Note that Vagrant builds will still build the wiki before setting up the ramdisk
and running live-build: those builds don't merge the base branch anyway, so they
can as well keep the wiki build caching mechanism, which is a nice optimization.

Will-fix: #9406

Revision 96a1c939
Added by anonym over 4 years ago

Merge remote-tracking branch 'origin/bugfix/9406-jenkins-build-in-clean-git' into stable

Fix-committed: #9406

History

#1 Updated by intrigeri over 4 years ago

  • Status changed from Confirmed to In Progress

#2 Updated by intrigeri over 4 years ago

#3 Updated by intrigeri over 4 years ago

  • % Done changed from 0 to 10
  • Feature Branch set to bugfix/9406-jenkins-build-in-clean-git

#4 Updated by intrigeri over 4 years ago

  • Assignee deleted (intrigeri)
  • % Done changed from 10 to 50
  • QA Check set to Ready for QA

#5 Updated by intrigeri over 4 years ago

  • Assignee set to anonym

Explicitly assigning to the current RM, since apparently anonym missed it last time he said he had cleaned his review'n'merge plate. anonym, when you're RM, please make sure you take care for Ready for QA tickets that are assigned to nobody :)

#6 Updated by anonym over 4 years ago

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

#7 Updated by BitingBird over 4 years ago

  • QA Check changed from Ready for QA to Pass

#8 Updated by anonym over 4 years ago

  • Assignee deleted (anonym)

#9 Updated by intrigeri about 4 years ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF