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

[PATCH v2] travis-ci: do not skip successfully tested trees in debug mode

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Sep 21, 2019, 07:40 UTC
Message-ID
<20190921074055.8214-1-szeder.dev@gmail.com>
In-Reply-To
<xmqqblvevn44.fsf@gitster-ct.c.googlers.com>

Travis CI offers shell access to its virtual machine environment running the build jobs, called "debug mode" [1]. After restarting a build job in debug mode and logging in, the first thing I usually do is to install dependencies, i.e. run './ci/install-dependencies.sh'. This works just fine when I restarted a failed build job in debug mode. However, after restarting a successful build job in debug mode our CI scripts get all clever, and exit without doing anything useful, claiming that "This commit's tree has already been built and tested successfully" [2]. Our CI scripts are right, and we do want to skip building and testing already known good trees in "regular" CI builds. In debug mode, however, this is a nuisiance, because one has to delete the cache (or at least the 'good-trees' file in the cache) to proceed.

Let's update our CI scripts, in particular the common 'ci/lib.sh', to not skip previously successfully built and tested trees in debug mode, so all those scripts will do what there were supposed to do even when a successful build job was restarted in debug mode.

[1] https://docs.travis-ci.com/user/running-build-in-debug-mode/
[2] 9cc2c76f5e (travis-ci: record and skip successfully built trees,
    2017-12-31)
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
Range-diff:
1:  e9badc7483 ! 1:  a1959d3e16 travis-ci: ignore already tested trees in debug mode
    @@ Metadata
     Author: SZEDER Gábor <szeder.dev@gmail.com>
     
      ## Commit message ##
    -    travis-ci: ignore already tested trees in debug mode
    +    travis-ci: do not skip successfully tested trees in debug mode
     
         Travis CI offers shell access to its virtual machine environment
         running the build jobs, called "debug mode" [1].  After restarting a
    @@ Commit message
         the cache (or at least the 'good-trees' file in the cache) to proceed.
     
         Let's update our CI scripts, in particular the common 'ci/lib.sh', to
    -    ignore previously successfully built and tested trees in debug mode,
    +    not skip previously successfully built and tested trees in debug mode,
         so all those scripts will do what there were supposed to do even when
         a successful build job was restarted in debug mode.
     
 ci/lib.sh | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/ci/lib.sh b/ci/lib.sh
index 44db2d5cbb..1a09ac4b34 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -34,6 +34,11 @@ save_good_tree () {
 # successfully before (e.g. because the branch got rebased, changing only
 # the commit messages).
 skip_good_tree () {
+	if test "$TRAVIS_DEBUG_MODE" = true
+	then
+		return
+	fi
+
 	if ! good_tree_info="$(grep "^$(git rev-parse $CI_COMMIT^{tree}) " "$good_trees_file")"
 	then
 		# Haven't seen this tree yet, or no cached good trees file yet.
-- 
2.23.0.331.g4e51dcdf11
Previous: SZEDER Gábor
Message 6 of 6 in “travis-ci: ignore already tested trees in debug mode”
  1. travis-ci: ignore already tested trees in debug modeSZEDER Gábor, Sep 19, 2019
  2. Junio C HamanoSep 20, 2019
  3. SZEDER GáborSep 20, 2019
  4. Junio C HamanoSep 20, 2019
  5. SZEDER GáborSep 20, 2019
  6. travis-ci: do not skip successfully tested trees in debug modeSZEDER Gábor, Sep 21, 2019

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.