From: Lars Schneider <larsxschneider@gmail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] travis-ci: record and skip successfully built trees
Date: Thu, 28 Dec 2017 12:12:50 +0100 [thread overview]
Message-ID: <2523A364-25A1-4E4C-B3EC-7F90D810D5DF@gmail.com> (raw)
In-Reply-To: <CAM0VKjmCodQgmTa8bjEc02N99cPjrFdp4rFGF3yQOA-VMer4hw@mail.gmail.com>
> On 28 Dec 2017, at 11:31, SZEDER Gábor <szeder.dev@gmail.com> wrote:
>
> On Wed, Dec 27, 2017 at 8:35 PM, Lars Schneider
> <larsxschneider@gmail.com> wrote:
>>
>>> On 27 Dec 2017, at 17:49, SZEDER Gábor <szeder.dev@gmail.com> wrote:
>
>>> Using an ever-growing flat text file might seem like asking for
>>> trouble on the long run, but it's perfectly adequate for this purpose.
>>> Contributors' topic branches are short-lived in general, so this file
>>> won't grow large enough to cause any issues. Grepping through several
>>> tens of thousands such lines is sufficiently fast, so not even
>>> git/git's forever living integration branches will cause scalability
>>> issues with the current rate of ~1 push/day for a couple of decades.
>>> And even if we reach the point that this file grows too big, the
>>> caches can be deleted on Travis CI's web interface.
>>
>> One more thing:
>> Maybe we could delete "$HOME/travis-cache/good-trees" if the file
>> has more than 1000 lines *before* we add a new tree?
>>
>> Or we use something like this to cap the file:
>>
>> echo "$(tail -1000 $HOME/travis-cache/good-trees)" > $HOME/travis-cache/good-trees
>
> Well, there is always something new to learn.
> I was aware that things like 'cmd file >file' don't work, because the
> shell opens and truncates 'file' before executing the command, so 'cmd'
> will open the already empty file, but I didn't know that 'echo "$(cmd
> file)" >file' works. Thanks for letting me know.
>
> However, this is subject to the portability issues of the shell's
> 'echo', i.e. try
>
> echo "$(cat git.c)" >git.c
>
> with Bash and Dash. Bash produces the exact same contents, but Dash
> turns all '\n' in help and error strings to real newline characters.
>
> Now, Git's object names will never contain such characters, and most
> likely $TRAVIS_JOB_{NUMBER,ID} won't ever do that, either, so this is
> not an issue for this 'good-trees' file. Still, I think it'd be better
> to stick to using a good old temporary file:
>
> tail -1000 good-trees >tmp
> mv tmp good-trees
Agreed!
- Lars
next prev parent reply other threads:[~2017-12-28 11:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 16:49 [PATCH 0/2] Travis CI: skip commits with successfully built and tested trees SZEDER Gábor
2017-12-27 16:49 ` [PATCH 1/2] travis-ci: don't try to create the cache directory unnecessarily SZEDER Gábor
2017-12-27 19:46 ` Jonathan Nieder
2017-12-28 11:04 ` SZEDER Gábor
2017-12-28 18:13 ` Jonathan Nieder
2017-12-27 16:49 ` [PATCH 2/2] travis-ci: record and skip successfully built trees SZEDER Gábor
2017-12-27 19:15 ` Lars Schneider
2017-12-27 23:00 ` SZEDER Gábor
2017-12-27 23:24 ` SZEDER Gábor
2017-12-28 11:16 ` Lars Schneider
2017-12-29 20:03 ` SZEDER Gábor
2017-12-29 20:16 ` SZEDER Gábor
2017-12-30 19:17 ` Lars Schneider
2017-12-27 19:35 ` Lars Schneider
2017-12-28 10:31 ` SZEDER Gábor
2017-12-28 11:12 ` Lars Schneider [this message]
2017-12-28 19:01 ` Junio C Hamano
2017-12-31 10:12 ` [PATCHv2 0/3] Travis CI: skip commits with successfully built and tested trees SZEDER Gábor
2017-12-31 10:12 ` [PATCHv2 1/3] travis-ci: print the "tip of branch is exactly at tag" message in color SZEDER Gábor
2017-12-31 10:12 ` [PATCHv2 2/3] travis-ci: create the cache directory early in the build process SZEDER Gábor
2017-12-31 10:12 ` [PATCHv2 3/3] travis-ci: record and skip successfully built trees SZEDER Gábor
2017-12-31 11:27 ` [PATCHv2 0/3] Travis CI: skip commits with successfully built and tested trees Lars Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2523A364-25A1-4E4C-B3EC-7F90D810D5DF@gmail.com \
--to=larsxschneider@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).