You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Ittay Dror (JIRA)" <ji...@apache.org> on 2009/06/18 07:27:07 UTC

[jira] Created: (BUILDR-287) buildr should download temporary files to the destination folder, not the temp directory

buildr should download temporary files to the destination folder, not the temp directory
----------------------------------------------------------------------------------------

                 Key: BUILDR-287
                 URL: https://issues.apache.org/jira/browse/BUILDR-287
             Project: Buildr
          Issue Type: Bug
          Components: Dependency management
    Affects Versions: 1.3.4
            Reporter: Ittay Dror
             Fix For: 1.3.5


when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 

In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
2. moving files between partitions is actually copy and delete

If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 

The fix is to use
    Tempfile.open File.basename(target), File.dirname(target)

When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-287) Optionally use destination folder as temporary storage during download (instead of default TMPDIR)

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721348#action_12721348 ] 

Assaf Arkin commented on BUILDR-287:
------------------------------------

Storing a partially downloaded file that should not be used until fully downloaded and checksum verified, and being able to easily discard left over files (from aborted downloads) -- sounds to me exactly like what a temporary directory is for. I don't understand why we'll want to change this behavior.

If the issue is which directory to use because /tmp runs full, why not use a different directory? Just change TMPDIR, TMP or TEMP (Ruby will use them in that order) to whichever directory can hold all the temporary files for that build. If you want to, you can locate it inside your local repository.

As a side note, if you're running a build farm you certainly do not want to use /tmp for security reasons: give each account their own temporary directory. I think OS X does the right thing setting TMPDIR for you, mine happens to be /var/folders/SB/SBuTKVyzEaSrTCAXjJtEZk+++TI/-Tmp-, and a different directory exists for OS services.

> Optionally use destination folder as temporary storage during download (instead of default TMPDIR)
> --------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.5
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-287) Optionally use destination folder as temporary storage during download (instead of default TMPDIR)

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-287:
---------------------------------

    Fix Version/s:     (was: 1.3.5)
                   1.4

> Optionally use destination folder as temporary storage during download (instead of default TMPDIR)
> --------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.4
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-287) Optionally use destination folder as temporary storage during download (instead of default TMPDIR)

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme resolved BUILDR-287.
-----------------------------------

    Resolution: Won't Fix

Marking as won't fix. Assaf provided a workaround that should work for the 20% of cases that don't work with the current system.

> Optionally use destination folder as temporary storage during download (instead of default TMPDIR)
> --------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.4
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-287) Optionally use destination folder as temporary storage during download (instead of default TMPDIR)

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-287:
---------------------------------

    Summary: Optionally use destination folder as temporary storage during download (instead of default TMPDIR)  (was: Optionally use destination folder as temporary storage during download instead of using default TMPDIR env variable)

> Optionally use destination folder as temporary storage during download (instead of default TMPDIR)
> --------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.5
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-287) Optionally use destination folder as temporary storage during download instead of using default TMPDIR env variable

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-287:
---------------------------------

    Issue Type: New Feature  (was: Bug)
       Summary: Optionally use destination folder as temporary storage during download instead of using default TMPDIR env variable  (was: buildr should download temporary files to the destination folder, not the temp directory)

If you guys don't mind, I'm rewording this as an enhancement request rather than a bug.    Using TMPDIR is fairly standard and I think the right thing to do by default.

> Optionally use destination folder as temporary storage during download instead of using default TMPDIR env variable
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.5
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-287) buildr should download temporary files to the destination folder, not the temp directory

Posted by "Daniel Spiewak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721073#action_12721073 ] 

Daniel Spiewak commented on BUILDR-287:
---------------------------------------

I vote +1 on this.  There are some advantages to using /tmp (safer failures, *better* performance on some systems), but I don't think the advantages are sufficiently ubiquitus.  Is there any way to make this configurable perhaps?  That way, we could still satisfy the one or two people who actually need this functionality.

> buildr should download temporary files to the destination folder, not the temp directory
> ----------------------------------------------------------------------------------------
>
>                 Key: BUILDR-287
>                 URL: https://issues.apache.org/jira/browse/BUILDR-287
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>    Affects Versions: 1.3.4
>            Reporter: Ittay Dror
>             Fix For: 1.3.5
>
>
> when downloading artifacts, BuildR first downloads to a temporary file in the temporary directory (/tmp) and then moves the file to the repository location (Generic#download in transports.rb). 
> In many unix systems, /tmp is a separate mount from /. This creates two drawbacks:
> 1. if there is not enough space in /tmp, the download fails (this happens to us many times, and during a nightly build)
> 2. moving files between partitions is actually copy and delete
> If instead, BuildR will download the file to the directory in the repository and then rename to the actual file name, these problems will be solved. 
> The fix is to use
>     Tempfile.open File.basename(target), File.dirname(target)
> When creating the temporary file for download

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.