git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] travis-ci: record and skip successfully built trees

From
Lars Schneider <larsxschneider@gmail.com>
Date
Dec 28, 2017, 11:12 UTC
Message-ID
<2523A364-25A1-4E4C-B3EC-7F90D810D5DF@gmail.com>
In-Reply-To
<CAM0VKjmCodQgmTa8bjEc02N99cPjrFdp4rFGF3yQOA-VMer4hw@mail.gmail.com>
Show 46 quoted lines
> 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
Previous: SZEDER GáborNext: Junio C Hamano
Message 12 of 22 in “Travis CI: skip commits with successfully built and tested trees”
  1. 0/2 Travis CI: skip commits with successfully built and tested treesSZEDER Gábor, Dec 27, 2017
  2. 2/2 travis-ci: record and skip successfully built treesSZEDER Gábor, Dec 27, 2017
  3. Lars SchneiderDec 27, 2017
  4. SZEDER GáborDec 27, 2017
  5. SZEDER GáborDec 27, 2017
  6. Lars SchneiderDec 28, 2017
  7. SZEDER GáborDec 29, 2017
  8. SZEDER GáborDec 29, 2017
  9. Lars SchneiderDec 30, 2017
  10. Lars SchneiderDec 27, 2017
  11. SZEDER GáborDec 28, 2017
  12. Lars SchneiderDec 28, 2017
  13. Junio C HamanoDec 28, 2017
  14. 1/2 travis-ci: don't try to create the cache directory unnecessarilySZEDER Gábor, Dec 27, 2017
  15. Jonathan NiederDec 27, 2017
  16. SZEDER GáborDec 28, 2017
  17. Jonathan NiederDec 28, 2017
  18. 0/3 Travis CI: skip commits with successfully built and tested treesSZEDER Gábor, Dec 31, 2017
  19. 1/3 travis-ci: print the "tip of branch is exactly at tag" message in colorSZEDER Gábor, Dec 31, 2017
  20. 2/3 travis-ci: create the cache directory early in the build processSZEDER Gábor, Dec 31, 2017
  21. 3/3 travis-ci: record and skip successfully built treesSZEDER Gábor, Dec 31, 2017
  22. Lars SchneiderDec 31, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.