Don't recurse submodules as part of fetch
ClosedPublic

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

Details

Reviewers
mmodell
demon
awight
Group Reviewers
Release-Engineering-Team
Commits
rMSCA953ed6a3fbbd: Don't recurse submodules as part of fetch
rMSCAc91d08ad02ca: Don't recurse submodules as part of fetch
Patch without arc
git checkout -b D1066 && curl -L https://phabricator.wikimedia.org/D1066?download=true | git apply
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.

Diff Detail

Repository
rMSCA Scap
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thcipriani created this revision.Jun 7 2018, 6:27 PM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptJun 7 2018, 6:27 PM
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
thcipriani requested review of this revision.Jun 7 2018, 6:32 PM
mmodell accepted this revision.Jun 7 2018, 10:36 PM

makes sense

This revision is now accepted and ready to land.Jun 7 2018, 10:36 PM
This revision was automatically updated to reflect the committed changes.