Re: [PATCH 1/2] travis-ci: don't try to create the cache directory unnecessarily

2017-12-28 Thread Jonathan Nieder
SZEDER Gábor wrote:
> On Wed, Dec 27, 2017 at 8:46 PM, Jonathan Nieder  wrote:
> > SZEDER Gábor wrote:

>>> Travis CI creates that directory for us anyway, even when a previous
>>> cache doesn't exist for the current build job.
>>>
>>> In itself it doesn't hurt to try, of course, but the following patch
>>> will access the Travis CI cache much earlier in the build process, and
>>> then creating the cache directory this late might cause confusion.
[...]
>> Is this behavior documented anywhere?
>> https://docs.travis-ci.com/user/caching#Arbitrary-directories doesn't
>> say anything about it.
>
> No, I'm afraid it isn't explicitly mentioned.
> I seem to remember an example implicitly relying on it, though, but
> can't find it anymore, so either misremembered or misunderstood one of
> the examples.
> OK, then I'll move this 'mkdir' to 'ci/lib-travisci.sh', to ensure that
> the cache directory exists in all build jobs.

Thanks.  Sounds good to me.

Another alternative would be to contact Travis CI folks to get the
behavior documented more clearly.  But here an early 'mkdir' doesn't
hurt, so it seems simplest to do it.

Sincerely,
Jonathan


Re: [PATCH 1/2] travis-ci: don't try to create the cache directory unnecessarily

2017-12-28 Thread SZEDER Gábor
On Wed, Dec 27, 2017 at 8:46 PM, Jonathan Nieder  wrote:
> SZEDER Gábor wrote:
>
>> Travis CI creates that directory for us anyway, even when a previous
>> cache doesn't exist for the current build job.
>>
>> In itself it doesn't hurt to try, of course, but the following patch
>> will access the Travis CI cache much earlier in the build process, and
>> then creating the cache directory this late might cause confusion.
>>
>> Signed-off-by: SZEDER Gábor 
>> ---
>>  ci/run-tests.sh | 1 -
>>  1 file changed, 1 deletion(-)
>
> Is this behavior documented anywhere?
> https://docs.travis-ci.com/user/caching#Arbitrary-directories doesn't
> say anything about it.

No, I'm afraid it isn't explicitly mentioned.
I seem to remember an example implicitly relying on it, though, but
can't find it anymore, so either misremembered or misunderstood one of
the examples.
OK, then I'll move this 'mkdir' to 'ci/lib-travisci.sh', to ensure that
the cache directory exists in all build jobs.

Gábor


Re: [PATCH 1/2] travis-ci: don't try to create the cache directory unnecessarily

2017-12-27 Thread Jonathan Nieder
SZEDER Gábor wrote:

> Travis CI creates that directory for us anyway, even when a previous
> cache doesn't exist for the current build job.
>
> In itself it doesn't hurt to try, of course, but the following patch
> will access the Travis CI cache much earlier in the build process, and
> then creating the cache directory this late might cause confusion.
>
> Signed-off-by: SZEDER Gábor 
> ---
>  ci/run-tests.sh | 1 -
>  1 file changed, 1 deletion(-)

Is this behavior documented anywhere?
https://docs.travis-ci.com/user/caching#Arbitrary-directories doesn't
say anything about it.

Thanks,
Jonathan