Modify

Ticket #158 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

mkdir races svn export on first run

Reported by: benpjohnson@… Owned by: hans
Priority: major Milestone:
Component: phing-core Version: 2.3.0RC1
Keywords: Cc:

Description

There appears to be a strange "race" condition between the subversion export task and the mkdir task. The first time my build is executed it ignores the mkdir task and hence creates an error. The second time the build is run the build works correctly so it is not really a race condition just a strange issue I haven't be able to work around so far.

I have tried various things: putting the tasks in seperate targets, sleeping for a few seconds, etc. to no avail.

The first run error is:

Buildfile: /Users/ben/build.xml

fresh > clean:

   [delete] Deleting directory /Users/ben/build_temp

fresh > build:

[svnexport] Exporting SVN repository to './build_temp/export/'
Execution of target "build" failed for the following reason: /Users/ben/build.xml:6:39: Failed to run the 'svn export' command: svn: Can't create directory 'build_temp/export': No such file or directory (cmd: /usr/local/bin/svn export --non-interactive http://<svn_url> ./build_temp/export/)

BUILD FAILED
/Users/ben/build.xml:6:39: Failed to run the 'svn export' command: svn: Can't create directory 'build_temp/export': No such file or directory (cmd: /usr/local/bin/svn export --non-interactive http://<svn_url> ./build_temp/export/)
Total time: 0.8195 seconds

Then on the second run:

Buildfile: /Users/ben/build.xml

fresh > clean:


fresh > build:

    [mkdir] Created dir: /Users/ben/build_temp
[svnexport] Exporting SVN repository to './build_temp/export/'

BUILD FINISHED

Total time: 34.1547 seconds

I have attached the minimal build.xml used to get this result.

Attachments

build.xml Download (386 bytes) - added by benpjohnson@… 4 years ago.
build.xml to highlight mkdir/svnexport issue

Change History

Changed 4 years ago by benpjohnson@…

build.xml to highlight mkdir/svnexport issue

comment:1 Changed 4 years ago by hans

This is very odd. The funny thing is that I cannot duplicate this. Here's my output the first time running the command:

$ phing
Buildfile: /home/hans/phingtest/build.xml

fresh > clean:


fresh > build:

    [mkdir] Created dir: /home/hans/phingtest/build_temp
[svnexport] Exporting SVN repository to './build_temp/export/'

BUILD FINISHED

Total time: 0.1642 seconds

Subsequent runs also work fine, but obviously include the [delete] line too (since dir then exists).

comment:2 Changed 4 years ago by benpjohnson@…

Maybe it is a platform issue. I will try it out on some other os's when I'm back in work (currently building on OSX but have windows/linux boxes).

comment:3 Changed 4 years ago by hans

Wanted to follow up on this issue to see if there's anything further we can do to help here. We're getting ready to release 2.3.0, so going through tickets waiting on feedback.

comment:4 Changed 4 years ago by benpjohnson@…

I would suggest moving this to some future release. Unfortunately I have too much urgent stuff on at the moment to get the chance to have a proper look.

Its down in my companies own trac so hopefully someone will be able to shed some light on in the future.

comment:5 Changed 4 years ago by mrook

  • Status changed from new to closed
  • Resolution set to worksforme

Closing for now; any additional feedback on this subject would be appreciated (we are unable to reproduce this).

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.