Page MenuHomePhabricator

Puppet compiler not working properly with submodules
Closed, ResolvedPublic

Description

Hello!

I tried to use the puppet compiler for https://gerrit.wikimedia.org/r/#/c/278713/ (Analytics cdh submodule update) but apparently no change was found. More info:

https://integration.wikimedia.org/ci/job/operations-puppet-catalog-compiler/2112/console

With the help of @hashar we discovered that it might be something related to:

https://github.com/wikimedia/operations-software-puppet-compiler/blob/master/puppet_compiler/prepare.py#L135-L141

Submodules changes are not pulled, maybe just adding --recurse-submodules=yes could solve the issue?

Event Timeline

When preparing the puppet dir for a change, the sequence is:

git clone
git fetch refs/changes/ef/abcdef
git checkout
git pull --rebase origin production

git pull does not process submodules per default, hence if the refs/changes/ef/abcdef is a submodule bump, it is not taken in account :(

Change 279097 had a related patch set uploaded (by Elukey):
Add support for submodules in git pull.

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

Change 279097 merged by Giuseppe Lavagetto:
Add support for submodules in git pull.

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

Change 279117 had a related patch set uploaded (by Elukey):
Adding submodules support to the prepare module.

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

Change 279117 merged by Elukey:
Adding submodules support to the prepare module. Version bump to 0.1.2

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