Community
Participate
Working Groups
From observing logs in local test builds, it appears getEBuilderForDropDir.sh does not get the correct branch of "EBuilder" ... always using 'master', instead of R4_5_maintenance (when appropriate).
This is pretty esoteric, but command currently looks like git clone --reference $aggDir ${AGGREGATOR_REPO} ${BUILD_DIR}/${EBUILDER} re-reading git clone --help, I see I should also use --no-hardlinks (the whole purpose of this copy/clone is to provide a "safe copy" of some files, that won't change, even if anther build starts). Hence, command should be git clone --reference --no-hardlinks --branch ${EBUILDER_HASH} $aggDir ${AGGREGATOR_REPO} ${BUILD_DIR}/${EBUILDER} EBUILDER_HASH can be a commit hash, branch, or tag. The help document is explicit the latter two are ok (being 'detached' for tag) ... I assume commit hash would work too? To investigate: the --help implies the branch used should be "the HEAD of the branch that is checked out in the reference repository". So ... not sure why that doesn't seem to work ... either the reference is wrong, or, more likely, it is in a "detached" state, and perhaps --reference doesn't really work with detached heads.
Hmmm, first attempt didn't work. Doing git clone using: --reference --no-hardlinks --branch ${EBUILDER_HASH} ${aggDir} ${AGGREGATOR_REPO} ${BUILD_DIR}/${EBUILDER} which evaluates to git clone --reference --no-hardlinks --branch a79d1616994f0560a725a429dc8db6ad521f9606 /shared/eclipse/buildsdavidw/4M/gitCache/eclipse.platform.releng.aggregator file:///gitroot/davidw2/platform/eclipse.platform.releng.aggregator.git /shared/eclipse/buildsdavidw/4M/siteDir/eclipse/downloads/drops4/M20151007-0532/eclipse.platform.releng.aggregator Too many arguments. I see already one issue is that the local "repo" should directly follow --reference
Second attempt didn't work either, at least on test machine. Doing git clone using: --no-hardlinks --branch ${EBUILDER_HASH} --reference ${aggDir} ${AGGREGATOR_REPO} ${BUILD_DIR}/${EBUILDER} which evaluates to git clone --no-hardlinks --branch 03a73387c86b87c7393b737b3e0c342be1902d46 --reference /shared/eclipse/buildsdavidw/4M/gitCache/eclipse.platform.releng.aggregator file:///gitroot/davidw2/platform/eclipse.platform.releng.aggregator.git /shared/eclipse/buildsdavidw/4M/siteDir/eclipse/downloads/drops4/M20151007-1237/eclipse.platform.releng.aggregator Cloning into '/shared/eclipse/buildsdavidw/4M/siteDir/eclipse/downloads/drops4/M20151007-1237/eclipse.platform.releng.aggregator'... fatal: Remote branch 03a73387c86b87c7393b737b3e0c342be1902d46 not found in upstream origin fatal: The remote end hung up unexpectedly [ERROR] Cloning EBUILDER returned non zero return code: 128 This might be a function of test machine, which uses a "mirrored" version of the git repo. But, might be that the 'commit hash' really does not exist or the function doesn't work well with commit hashes, and really needs to be ${BRANCH}. [But, technically ${BRANCH} may have changed already?]
Will remove --branch ${EBUILDER_HASH} Perhaps lack of --no-hardlinks was the problem all along?
The problem is not in this apart of the code, and not this copy of eclipse.platform.releng.aggregator. That all looks right, on build machine(s). The problem is in eclipse.platform.releng.tychoeclipsebuilder which is a folder, in eclipse.platform.releng.aggregator (not a submodule). It is correct in our main repo we build with, but in the copy we make to do post-build work, it is incorrect (we are getting the master version instead of the branch version). Perhaps it is that --reference simply "doesn't work"? Or, more likely, we are doing another "copy" (or, pull?) type operation somewhere just for that tychoeclipsebuilder project and at that time "write over" the correct version? They symptom I see in log output, is that is is getting the "eclpserun-repo" equivalent, BUT, it is hard coded in the post-build scripts, and the output says it is using the version that is in master, not the branch. [This is likely never been noticed before, because until recently, they were always the same version that was hard coded.]
(In reply to David Williams from comment #5) > The problem is not in this apart of the code, and not this copy of > eclipse.platform.releng.aggregator. That all looks right, on build > machine(s). Forget most of this comment. the clone --reference does still checkout 'master' by default. And, in local testing using -branch R4_5_maintenance does provide correct branch ... but, even then, we want the exact same commit, not the branch, and clone doesn't know how to infer what clone -branch (commit hash) means. So, I've discovered it will take two steps ... to do the clone --reference, followed by checkout (commit hash). Do not need to specify branch at all, and the "detached head" copy, still has the right content for that commit hash.
Latest changes look good. There's no "diff" that is enlightening, since it too so many changes, but this is the "whole file", https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/production/getEBuilderForDropDir.sh I ended up taking out the --no-hardlinks flag (upon re-reading help, we should not need that). Also turned out, the code to "checkout (commit hash)" was actually "in the file" .. jut hidden in an else clause, instead of being always done.