* [PATCH] travis-ci: ignore already tested trees in debug mode
@ 2019-09-19 17:35 SZEDER Gábor
2019-09-20 18:03 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: SZEDER Gábor @ 2019-09-19 17:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, SZEDER Gábor
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
ignore 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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] travis-ci: ignore already tested trees in debug mode
2019-09-19 17:35 [PATCH] travis-ci: ignore already tested trees in debug mode SZEDER Gábor
@ 2019-09-20 18:03 ` Junio C Hamano
2019-09-20 18:17 ` SZEDER Gábor
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2019-09-20 18:03 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: git
SZEDER Gábor <szeder.dev@gmail.com> writes:
> skip_good_tree () {
> + if test "$TRAVIS_DEBUG_MODE" = true
> + then
> + return
> + fi
I think you convinced readers why it is a good idea to avoid
skipping an already tested tree, and technically the title of this
commit is not incorrect per-se. You are teaching to ignore
"already-tested-ness" from a part of the logic).
But in the larger picture, I would expect that readers would more
immediately grasp what it is about if it were titled "do not skip
versions that have already tested good in debug mode" or something
like that (IOW, we do not want to ignore such trees, we want to test
them again).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] travis-ci: ignore already tested trees in debug mode
2019-09-20 18:03 ` Junio C Hamano
@ 2019-09-20 18:17 ` SZEDER Gábor
2019-09-20 18:28 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: SZEDER Gábor @ 2019-09-20 18:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, Sep 20, 2019 at 11:03:48AM -0700, Junio C Hamano wrote:
> SZEDER Gábor <szeder.dev@gmail.com> writes:
>
> > skip_good_tree () {
> > + if test "$TRAVIS_DEBUG_MODE" = true
> > + then
> > + return
> > + fi
>
> I think you convinced readers why it is a good idea to avoid
> skipping an already tested tree, and technically the title of this
> commit is not incorrect per-se. You are teaching to ignore
> "already-tested-ness" from a part of the logic).
Hrm, that's subtle, but you are right.
> But in the larger picture, I would expect that readers would more
> immediately grasp what it is about if it were titled "do not skip
> versions that have already tested good in debug mode"
Will try to come up with a better subject line, but I don't have any
usable ideas at the moment.
> or something
> like that (IOW, we do not want to ignore such trees, we want to test
> them again).
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] travis-ci: ignore already tested trees in debug mode
2019-09-20 18:17 ` SZEDER Gábor
@ 2019-09-20 18:28 ` Junio C Hamano
2019-09-20 21:56 ` SZEDER Gábor
2019-09-21 7:40 ` [PATCH v2] travis-ci: do not skip successfully " SZEDER Gábor
0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2019-09-20 18:28 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: git
SZEDER Gábor <szeder.dev@gmail.com> writes:
>> But in the larger picture, I would expect that readers would more
>> immediately grasp what it is about if it were titled "do not skip
>> versions that have already tested good in debug mode"
>
> Will try to come up with a better subject line, but I don't have any
> usable ideas at the moment.
Subject: [PATCH] travis-ci: do not skip already tested trees in debug mode
???
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] travis-ci: ignore already tested trees in debug mode
2019-09-20 18:28 ` Junio C Hamano
@ 2019-09-20 21:56 ` SZEDER Gábor
2019-09-21 7:40 ` [PATCH v2] travis-ci: do not skip successfully " SZEDER Gábor
1 sibling, 0 replies; 6+ messages in thread
From: SZEDER Gábor @ 2019-09-20 21:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Fri, Sep 20, 2019 at 11:28:11AM -0700, Junio C Hamano wrote:
> SZEDER Gábor <szeder.dev@gmail.com> writes:
>
> >> But in the larger picture, I would expect that readers would more
> >> immediately grasp what it is about if it were titled "do not skip
> >> versions that have already tested good in debug mode"
> >
> > Will try to come up with a better subject line, but I don't have any
> > usable ideas at the moment.
>
> Subject: [PATCH] travis-ci: do not skip already tested trees in debug mode
Wow, that's so obvious it's embarrassing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] travis-ci: do not skip successfully tested trees in debug mode
2019-09-20 18:28 ` Junio C Hamano
2019-09-20 21:56 ` SZEDER Gábor
@ 2019-09-21 7:40 ` SZEDER Gábor
1 sibling, 0 replies; 6+ messages in thread
From: SZEDER Gábor @ 2019-09-21 7:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, SZEDER Gábor
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-21 7:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 17:35 [PATCH] travis-ci: ignore already tested trees in debug mode SZEDER Gábor
2019-09-20 18:03 ` Junio C Hamano
2019-09-20 18:17 ` SZEDER Gábor
2019-09-20 18:28 ` Junio C Hamano
2019-09-20 21:56 ` SZEDER Gábor
2019-09-21 7:40 ` [PATCH v2] travis-ci: do not skip successfully " SZEDER Gábor
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).