A bit of a gotcha with git externals in svn
For the last couple of weeks I've been noticing some very weird behaviour in the two Jenkins build jobs where the svn repo has GitHub externals. The projects simply build all the time, whether or not there's been any change to any of the repos (svn or git).
We can't have that, of course; it's only happening to two repos right now, but it as more mini sub-projects get shared between repos, we'd end up with Jenkins simply queuing builds endlessly.
I'm still researching this, but I suspect it might have something to do with branch information; when (say) the DVPP repo is subscribed to the master branch of the staticSearch git repo, the master branch may not change, but the dev branch might; that means you end up with weird svn info like this (running svn info .
in the external directory inside the Keats project):
URL: https://github.com/projectEndings/staticSearch.git/branches/master Relative URL: ^/branches/master Repository Root: https://github.com/projectEndings/staticSearch.git Repository UUID: 04f9d699-67a6-817a-6227-ce57b7db7bff Revision: 588 Node Kind: directory Schedule: normal Last Changed Author: martindholmes Last Changed Rev: 570 Last Changed Date: 2020-01-13 11:41:56 -0800 (Mon, 13 Jan 2020)
You'll see that there are two revision numbers; the last-changed is 570, but the current revision is 588. Presumably that's because the master branch last changed in 570 but the dev branch changed more recently (as you'd expect). I have a suspicion that the svn polling mechanism in Jenkins interprets this to mean that there are new changes, and does a build. But it may be some other bug.
Anyway, I'm thinking that it might be a better alternative to pull static copies of the remote repo contents during the build process. The only disadvantage of this is that you can't live-edit the remote repo's code in the context of one of the projects using it, then commit from there back into the real repo. But that really just means that you have to have solid testing components in the original repo rather than relying on the consumer projects to do testing during active development.