HomePhabricator
Diffusion Scap 953ed6a3fbbd

Don't recurse submodules as part of fetch

Authored by thcipriani on Jun 7 2018, 6:02 PM.

Description

Don't recurse submodules as part of fetch

Summary:
We rewrite submodules to point to the deployment server in the cache
prior to running git submodules update but after we run git fetch.
This is problematic because git fetch will recurse into submodules if
there has been a submodule bump in the parent repo by default. The
correct behavior is to never fetch submodules until after all submodule
urls are rewritten.

This is currently affecting ORES after the deployment server
switch-over.

Fixes: T196663

Test Plan:
in scap-vagrant, I did:

ssh scap-target-01
cd /srv/deployment/mockbase/deploy-cache/cache
printf "%s\n\t%s\n\t%s\n' \
    '[submodule "mockbase"]'
    'path = mockbase'
    'url = http://k/mockbase/deploy/.git/modules/mockbase' > .gitmodules
git submodule sync

This is the current prod situation, running a scap deploy -l scap-target-01
fails the same way as is noted in T196663. This code fixes that. I also tested
this code with a fresh deploy.

Reviewers: mmodell, demon, awight, Release-Engineering-Team

Reviewed By: mmodell, Release-Engineering-Team

Tags: Release-Engineering-Team

Differential Revision: https://phabricator.wikimedia.org/D1066

Details

Committed
thciprianiJun 7 2018, 10:38 PM
Reviewer
Release-Engineering-Team
Differential Revision
D1066: Don't recurse submodules as part of fetch
Parents
rMSCA0661e65794e3: lint.py: Move number of processes to callers
Branches
Unknown
Tags
Unknown
ChangeId
None
Build Status
Buildable 3017
Build 5054: ci-jessieJenkins