[Issue 3580] New - Workspace deleted when subversion checkout happens

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Issue 3580] New - Workspace deleted when subversion checkout happens

kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580
                 Issue #|3580
                 Summary|Workspace deleted when subversion checkout happens
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|subversion
             Assigned to|kaxelson
             Reported by|kaxelson






------- Additional comments from [hidden email] Mon Apr 27 20:35:08 +0000 2009 -------
When a subversion checkout is done, the entire workspace is deleted - not just
the previous checkout folder.  There may be other files held in the workspace
outside the checkout folder - especially when the same workspace is share by
multiple jobs.  Code should be changed so that only the previous checkout
folder, if there is one, is deleted before a checkout is done.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

scm_issue_link
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580



User scm_issue_link changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Mon Apr 27 21:45:27 +0000 2009 -------
Code changed in hudson
User: : kaxelson
Path:
 trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java
http://fisheye4.cenqua.com/changelog/hudson/?cs=17550
Log:
HUDSON-3580: [FIXED HUDSON-3580]
When a checkout occurs, only the existing checkout location(s) is/are deleted, not the entire workspace.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

scm_issue_link
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Mon Apr 27 21:59:40 +0000 2009 -------
Code changed in hudson
User: : kaxelson
Path:
 trunk/www/changelog.html
http://fisheye4.cenqua.com/changelog/hudson/?cs=17552
Log:
HUDSON-3580:
Added changelog message


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

Kohsuke Kawaguchi
Administrator
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |REOPENED
--------------------------------------------------------------------------------
              Resolution|FIXED                     |
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu May  7 02:19:07 +0000 2009 -------
Within several days of a release, we have two people independently noticing this
behavior change.

See http://www.nabble.com/Subversion-workspace-deletion-in-1.302-td23413270.html
and http://www.nabble.com/Issue-3580---regression-td23402321.html

So I think we need to revert this change. kaxelson, what you can do is to write
a plugin that subclasses SubversionSCM, and changes its behavior in a way you
want. Your plugin can also remove SubversionSCM descriptor from the list, so
that your Hudson has only one "Subversion" implementation.

Would that do?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

mdonohue
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 03:24:24 +0000 2009 -------
*** Issue 3634 has been marked as a duplicate of this issue. ***

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kev009
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580



User kev009 changed the following:

                What    |Old value                 |New value
================================================================================
                      CC|''                        |'kev009'
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu May  7 03:33:15 +0000 2009 -------
add cc

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kaxelson-2
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 14:05:15 +0000 2009 -------
My apologies to those whose builds were broken by this fix.

We can certainly revert this change if necessary, but I would argue that the
current behavior is more correct.  There is a difference between the workspace
and the checkout location.  This may go unnoticed by those who have one job per
workspace, but for those with multiple jobs sharing a single workspace, it
becomes immediately evident.  The SCM module is overstepping its bounds by
killing the entire workspace.  As I see it, the SCM module's scope should be
limited to the checkout locations it controls.

I'd suggest that a better solution would be to make the same change (keep
workspace, wipeout checkout location only) in all SCM modules/plugins and create
a build wrapper that wipes out the workspace only if that behaviour is
explicitly requested.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kev009
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 15:00:00 +0000 2009 -------
The problem is, your "fix" DOES overstep and delete the ENTIRE workspace
directory, where previously hudson did not.  I have 5 projects defined, and some
of them have dependencies on shared libraries and such built in the other
workspace directories.

Example:
/home/hudson/workspace/project1 - gets built and has shared libs
/home/hudson/workspace/project2 - start build.  Hudson 1.302 DELETES project1's
workspace

It seems like your intent is to leave workspace intact, project2 should only ever
touch project2's directory from the SCM module, but that is not what is
happening.

Your checkin is doing the exact opposite of what it is supposed to and doing the
equivalent of `rm -Rf /home/hudson/workspace/*`.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kaxelson-2
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 15:19:59 +0000 2009 -------
The behavior described by kev009 is not consistent with the issue reported here:
http://www.nabble.com/Subversion-workspace-deletion-in-1.302-td23413270.html

What kev009 has described is the way hudson behaved prior to my change.  The
whole point of the change was to stop the subversion scm module from deleting
the entire workspace and have it only delete what it had previously checkout out.

kev009, please clarify

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kev009
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 16:30:50 +0000 2009 -------
I'm not sure what needs clarification.

Hudson 1.302 DELETES /home/hudson/workspace/*.  The SCM module should NEVER
descend past /home/hudson/workspace/<project name>/ for any reason.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kaxelson-2
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 17:20:08 +0000 2009 -------
The only way I can replicate the behavior described by kev009 is to specify my
local module directory for checkout as "..".  Is this what you're doing kev009?
 If you want to avoid multiple checkouts of the same code, this can be achieved
by having your projects specify the same shared workspace and having your local
module directories be subdirectories of this shared workspace.

The fix for this case causes the local module directory to be deleted (the same
directory into which the code was previously checked out) rather than the workspace.

While hudson will still work if you specify ".." as the local module directory,
it does cause an error message to be displayed on the configuration page.  Not
only my code, but the previous code as well, assumes that the local module
directory is a descendant directory of the workspace.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kev009
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May  7 18:13:46 +0000 2009 -------
I am not.  The projects check out to /home/hudson/<project name>/<working copies>/.

The only thing that stands out in my setup is that /home is an NFS share, and
two remote executors do the work on the projects in that shared /home/hudson
directory.  The projects are not shared by executors.  For instance, there is a
project32 and a project64, and each is tied to a single node.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

mdonohue
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Fri May  8 04:53:31 +0000 2009 -------
I can see how this feature would be useful for a shared workspace, but Hudson
doesn't have first class support for shared workspaces - see issue 682.   Also,
the job distribution mechanism in Hudson assumes each job owns a unique
workspace.   You can hack in a shared workspace by manually specifying a
directory for each of the jobs that need to share, but you also need to make
sure those jobs are always assigned to the same node.   This is a pretty brittle
setup, that issue 682 is supposed to solve more generally.  This makes me think
features designed for shared workspaces are premature to be part of core Hudson.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

scm_issue_link
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Fri May  8 21:20:28 +0000 2009 -------
Code changed in hudson
User: : kaxelson
Path:
 trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java
http://fisheye4.cenqua.com/changelog/hudson/?cs=17876
Log:
HUDSON-3580:
Rolled back changes
merge -r17550:17549


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

scm_issue_link
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Fri May  8 21:24:34 +0000 2009 -------
Code changed in hudson
User: : kaxelson
Path:
 trunk/www/changelog.html
http://fisheye4.cenqua.com/changelog/hudson/?cs=17878
Log:
HUDSON-3580:
Added changelog message for rollback


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kev009
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May 14 18:59:03 +0000 2009 -------
1.304 is still deleting unrelated projects in workspace while 1.300 worked fine,
though it seemed to take longer.

Perhaps some other commit is causing?

The builds were 12 days old from when I had to rebuild after 1.302 nuked
workspace.  They disappeared several hours after upgrading to 1.304 from 1.300.  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

kaxelson-2
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Thu May 14 19:15:16 +0000 2009 -------
I, too, am having issues with workspaces mysteriously disappearing, even after
reverting my changes.  This must be related to another change.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

Kohsuke Kawaguchi
Administrator
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|REOPENED                  |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Fri May 15 01:40:41 +0000 2009 -------
The workspace deletion is addressed in issue #3653. Targetd for 1.305.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

skaze
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580






------- Additional comments from [hidden email] Sat May 16 10:42:59 +0000 2009 -------
I just upgraded from 828 to 304 and now my workspaces are also deleting themselves.

I presume its ist to do with
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580 or
https://hudson.dev.java.net/issues/show_bug.cgi?id=3653 but the fault is so
severe that I may have to roll back.

My projects are using scm polling, SVN update and project security. I don't want
my 400M workspace of libraries deleted each time it  checks for updates.

When is the fix for this planned to be release?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3580] Workspace deleted when subversion checkout happens

skaze
In reply to this post by kaxelson-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=3580



User skaze changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |REOPENED
--------------------------------------------------------------------------------
              Resolution|FIXED                     |
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Sun May 17 17:14:49 +0000 2009 -------
I have upgraded to 306 and just had exactly the same problem again, a workspace
has been deleted with all 500Mb of its contents. Unfortunately this workspace is
used by other projects and so all the other projects break too. I am now having
to move this shared workspace job 'outside' of hudson so at least the other jobs
dont break. However they are still deleting themselves and then performing long
svn checkouts. This bug is having a big detrimental affect on development.

Have attached sys info.

It may be worth noting that I have had some other strange experiences since 306.

Occasionally when saving the system config Hudson has displayed a screen saying
not connected or some such. On another occasion Hudson decided to tell me that i
had two instances sharing the same Hudson home directory (which was incorrect, I
had one tomcat instance running, checked with ps and both 'hudsons' had the same
number before the @ symbol, 'XXX'@hostname).

I have dropped to only having one executor as i thought it maybe related to
locks and latches but as far as i can tell the whole thing is just very
unstable. What is the recommended way of getting back to something functional?
And also many release is great on a project but I dont think more testing is in
order.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

12