Closed Bug 1135798 Opened 9 years ago Closed 9 years ago

update.py does not update source correctly when switching branches

Categories

(Tree Management :: Treeherder: Infrastructure, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

http://treeherderadm.private.scl3.mozilla.com/chief/treeherder.prod/logs/master.1424720204

[2015-02-23 19:36:44] Running pre_update
[2015-02-23 19:36:44] [localhost] running: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git fetch --prune
[2015-02-23 19:36:45] [localhost] finished: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git fetch --prune (0.813s)
[localhost] err: From https://github.com/mozilla/treeherder-service
[localhost] err: fd7cd20..6fca7fe  master     -> origin/master
[localhost] err: + cebde6a...28a5880 new-structured-log-viewer -> origin/new-structured-log-viewer  (forced update)
[2015-02-23 19:36:45] [localhost] running: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git reset FETCH_HEAD --hard
[2015-02-23 19:36:45] [localhost] finished: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git reset FETCH_HEAD --hard (0.013s)
[localhost] out: HEAD is now at e063922 Bug 1119479 - Fix update script and puppet manifest
[2015-02-23 19:36:45] [localhost] running: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git checkout master
[2015-02-23 19:36:45] [localhost] finished: cd /data/treeherder/src/treeherder.mozilla.org/treeherder-service && git checkout master (0.037s)
[localhost] out: Your branch is behind 'origin/master' by 17 commits, and can be fast-forwarded.
[localhost] out: (use "git pull" to update your local branch)
[localhost] err: Switched to branch 'master'

We should use something other than:
        ctx.local('git fetch --prune')
        ctx.local('git reset FETCH_HEAD --hard')
        ctx.local('git checkout %s' % ref)
Blocks: 1113160
Status: NEW → ASSIGNED
This includes fixes for bug 1059814, bug 1135798, bug 1088705 & bug 1138392.
Please see the individual commit diffs and multi-line commit messages for easier review :-)
Attachment #8571393 - Flags: review?(klibby)
Comment on attachment 8571393 [details] [review]
Deploy script fixes & cleanup

lgtm!
Attachment #8571393 - Flags: review?(klibby) → review+
Commits pushed to master at https://github.com/mozilla/treeherder-service

https://github.com/mozilla/treeherder-service/commit/c3afe9584d93a7167caaa8ea3335d25970ab88f4
Bug 1135798 - Deploy script: Fix the git fetch/reset commands

The current fetch/reset/checkout doesn't correctly update the working
directory when switching between branches. This new approach is
recommended by:
http://stackoverflow.com/a/9589927

https://github.com/mozilla/treeherder-service/commit/d011d2f9bd2b6be3df57da34b3d1045fecaae92d
Bug 1135798 - Deploy script: Remove unnecessary submodule git commands

We don't use git submodules, so let's not bother trying to update them.
Thanks for the review :-)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: