[BuildBot] Discard all glibc source changes from slaves
Commit Message
Note 1:
I'm trying to fix what's happening with our ppc64 and x86_64 slaves
http://130.211.48.148:8080/builders/glibc-power8-linux/builds/530/steps/sync/logs/stdio
http://130.211.48.148:8080/builders/glibc-x86_64-linux/builds/971/steps/sync/logs/stdio
Note 2:
As this is changing the source code of the build master, I can't test it
myself.
8<-----
This is fixing 2 issues:
- If glibc source code get changed in the slave, the next build will not
run against an identical code from the master branch.
- There is also a change that a new build gets into the master branch
after the build master checked the source code. In that scenario,
the slave would build a commit ID that is not identical to the one
specified by the build master.
---
scripts/master/AnnotatedFactory.py | 3 +++
scripts/slave/glibc-native.sh | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
Comments
Ping?
"Tulio Magno Quites Machado Filho" <tuliom@linux.vnet.ibm.com> writes:
> Note 1:
> I'm trying to fix what's happening with our ppc64 and x86_64 slaves
> http://130.211.48.148:8080/builders/glibc-power8-linux/builds/530/steps/sync/logs/stdio
> http://130.211.48.148:8080/builders/glibc-x86_64-linux/builds/971/steps/sync/logs/stdio
>
> Note 2:
> As this is changing the source code of the build master, I can't test it
> myself.
>
> 8<-----
>
> This is fixing 2 issues:
> - If glibc source code get changed in the slave, the next build will not
> run against an identical code from the master branch.
> - There is also a change that a new build gets into the master branch
> after the build master checked the source code. In that scenario,
> the slave would build a commit ID that is not identical to the one
> specified by the build master.
Sorry it's taken me forever to respond to this.
I just independently made a change that addressed one of these two problems.
That is, making the "sync" stage thoroughly clean the source directory.
I'll post some more about buildbot maintenance shortly.
Thanks,
Roland
@@ -46,6 +46,9 @@ def getGlibcAnnotatedFactory(
selector_script = os.path.join('..', 'glibc-buildbot',
'scripts', 'slave', 'buildbot_selector.py')
+ # Export the commit ID to be built.
+ merged_env['REVISION'] = util.Property('revision')
+
# Run annotated command.
f.addStep(AnnotatedCommand(name='annotate',
description='annotate',
@@ -40,7 +40,8 @@ end_step() {
do_sync() {
start_step sync
if [ -d "${src_dir}" ]; then
- (cd "${src_dir}" && git remote prune origin && git pull)
+ # Discard everything and get the commit specified by the build master.
+ (cd "${src_dir}" && git fetch -p origin && git reset --hard $REVISION)
else
git clone git://sourceware.org/git/glibc.git ${src_dir}
fi