Page MenuHomePhabricator

Add complete support for submodules
Closed, ResolvedPublic

Description

https://phabricator.wikimedia.org/T130703 added support for submodules:

  1. $somebody files a code review for module X
  2. code review gets approved and merged in the submodule's repository
  3. $somebody updates the related sha signature in the main puppet repo and files another code review
  4. $somebody can finally use the puppet compiler to check diffs

It would be great to get 4) directly after 1), namely figuring out a way to instruct the puppet compiler that a code review filed for a repository that is not the main puppet one should trigger a fetch/merge to the appropriate submodule folder.

This change should target the fetch_change [1] function. Caveat:

  1. link gerrit repo name with submodule name/path (git config --get-regexp submodule ?)
  2. fetch/merge the code in the appropriate submodule folder (git submodule foreach $magic ?)

[1]: https://github.com/wikimedia/operations-software-puppet-compiler/blob/master/puppet_compiler/prepare.py#L117

Event Timeline

Change 282652 had a related patch set uploaded (by Elukey):
Add complete submodule support to the puppet compiler.

https://gerrit.wikimedia.org/r/282652

Change 282652 merged by Giuseppe Lavagetto:
Add complete submodule support to the puppet compiler.

https://gerrit.wikimedia.org/r/282652

Change 283417 had a related patch set uploaded (by Elukey):
Bumping version to 0.13

https://gerrit.wikimedia.org/r/283417

Change 283417 merged by Elukey:
Bumping version to 0.1.3

https://gerrit.wikimedia.org/r/283417

Just tried https://puppet-compiler.wmflabs.org/2442/oxygen.eqiad.wmnet/ and it seems working fine, waiting for some more testing before closing the task.