Opened on 09/15/2014 at 01:16:34 PM

Closed on 10/10/2014 at 06:30:34 PM

#1377 closed defect (fixed)

Blacklist resources managed by ensure_dependencies.py in Git

Reported by: matze Assignee: AAlvz
Priority: P4 Milestone:
Module: Automation Keywords: infrastructure hg git
Cc: trev, fhd, poz2k4444, AAlvz Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5934936779390976
https://github.com/mjhennig/adblockplus-infrastructure/pull/7

Description

Observed Behavior

When working with the new ensure_dependencies.py script and git(1), one currently needs to manually ensure that the contents of fetched modules are not added to the git index.

Possible Workarounds

Below please find a list of possible workarounds beside manually maintaining the module paths in a .gitignore file - without necessity of completeness but in order of recommendation:

  • Use git-update-index(1) in to blacklist the resource paths from being added to the index.
  • Manually maintain the destination paths in the .git/info/exclude file.
  • Create some fancy githooks(5) to circumvent the issue.

Expected Behavior

The ensure_dependencies.py script should *automagically* apply one of the aforementioned workarounds (except the .gitignore file solution, of course).

Attachments (0)

Change History (9)

comment:1 Changed on 09/15/2014 at 01:17:20 PM by matze

comment:3 Changed on 09/16/2014 at 09:51:23 PM by trev

  • Component changed from Unknown to Build-and-Release-Tools
  • Priority changed from Unknown to P4
  • Ready set

You shouldn't modify the copy in the infrastructure repository but rather the master in the buildtools repository.

comment:4 Changed on 09/18/2014 at 07:50:02 AM by matze

  • Owner set to poz2k4444

We will, the Git version is only used for collaboration and testing right now. The patch-set for review will address the buildtools version, however.

comment:5 Changed on 09/22/2014 at 01:29:34 PM by matze

  • Review URL(s) modified (diff)

comment:6 Changed on 09/23/2014 at 09:14:50 AM by matze

  • Owner changed from poz2k4444 to AAlvz
  • Review URL(s) modified (diff)

In addition to the circumstances explained in the ticket description, there are also a few more cases that may need to be addressed:

  • When only one of the dependency versions is available (e.g. during development, when testing an upgrade to a more recent version or when waiting for the HG=>Git sync), it's possible that the script uses e.g. the Git dependencies although the root repository has been cloned via Mercurial (or vice-versa). In that case, the Mercurial mechanism of ignoring directories that feature a .hg sub-directory is circumvented, of course.
  • When working with both Mercurial and Git in the same directory (quite common, even in our office), it's actually the Python hashing algorithm that will decide whether the Mercurial or Git versions of the dependencies are preferred when updating. Thus, one may consider converting the repo_types variable into an ordered set or similar (it's currently a hash, although there's no need for string-associative access anywhere in the script).

Note that the first item is addressed in the first patch-set for review - in addition to the ticket's general changes -, while the latter is currently just a side-note to consider.

comment:7 Changed on 09/23/2014 at 09:15:00 AM by matze

  • Status changed from new to reviewing

comment:8 Changed on 10/10/2014 at 11:44:29 AM by matze

@trev @fhd
Please make sure the changes are pushed to the buildtools repo.

@AAlvz
As soon as the buildtools repo has been updated this ticket can be closed.

comment:9 Changed on 10/10/2014 at 06:30:34 PM by trev

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from AAlvz.
 
Note: See TracTickets for help on using tickets.