Bug 40486 - Clean the working directory after uploading to rietveld
Summary: Clean the working directory after uploading to rietveld
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 11:35 PDT by Ojan Vafai
Modified: 2010-06-30 14:18 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.21 KB, patch)
2010-06-11 11:36 PDT, Ojan Vafai
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2010-06-11 11:35:30 PDT
Clean the working directory after uploading to rietveld
Comment 1 Ojan Vafai 2010-06-11 11:36:37 PDT
Created attachment 58491 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-06-11 12:04:47 PDT
Comment on attachment 58491 [details]
Patch

Why clean at the end?  That seems silly.  Won't it just clean again at the beginning?  All of our queues which appiles patches hae this problem.  Is this a solution which would work for all of them?

How do we test this?
Comment 3 Ojan Vafai 2010-06-11 12:27:55 PDT
(In reply to comment #2)
> (From update of attachment 58491 [details])
> Why clean at the end?  That seems silly.  Won't it just clean again at the beginning? 

If the patch being pulled in breaks webkit-patch itself (e.g. syntax error), then the next run won't startup and won't be able to cleanup. I encountered a case of this running the queue on my machine.

> All of our queues which appiles patches hae this problem.  Is this a solution which would work for all of them?

I think we probably want to do this for all the queues. Again, it needs to be part of the same invocation of webkit-patch that pulled in the broken patch. It doesn't work if you need to call webkit-patch again later.

> How do we test this?

Yeah, not really sure how. We could maybe extend MockSCM to have ways of dirtying the tree and cleaning it up. Then we could check that the working directory is clean. Sounds like a lot of work. :(

Another way to solve this problem would be to have the queues running code outside the repo (e.g. from another repo). That also sounds like a lot of work.
Comment 4 Eric Seidel (no email) 2010-06-11 12:32:19 PDT
webkit-patch is designed to support being run from another repo.  I can't promise the support is perfect though. :)
Comment 5 Adam Barth 2010-06-11 14:01:45 PDT
We run the queues in a wrapper script that does a lot of cleanup every so often.  We've been running the queues for a long time without this being a problem.
Comment 6 Ojan Vafai 2010-06-11 17:24:17 PDT
(In reply to comment #5)
> We run the queues in a wrapper script that does a lot of cleanup every so often.  We've been running the queues for a long time without this being a problem.

Where's the code for the wrapper script? I don't see anything in webkitpy that would cleanup a patch that breaks webkit-patch itself.

Also, cleaning up "every so often" would mean that every patch between the breaking patch and the cleanup would error.
Comment 7 Adam Barth 2010-06-18 15:36:05 PDT
Comment on attachment 58491 [details]
Patch

The wrapper scripts are in WebKitTools/EWSTools.  If we actually see this happening, we can do something more heavy weigh.  In general, our approach has been to try to solve problems as they occur rather than trying to solve every problem that might occur.
Comment 8 Ojan Vafai 2010-06-30 14:18:56 PDT
Well, I thought I saw this actually happen. I may have been wrong. In either case, the queue has been running for ~2 weeks now without problems. So, I'll close this bug for now. Can always reopen if it comes up again.