{"thread":{"id":"51884","subject":"[PATCH] travis-ci: ignore already tested trees in debug mode","startedAt":"2019-09-19T17:35:24Z","lastAt":"2019-09-21T07:41:01Z","messageCount":6,"participants":["SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"382597","messageId":"20190919173514.24074-1-szeder.dev@gmail.com","threadId":"51884","inReplyTo":null,"subject":"[PATCH] travis-ci: ignore already tested trees in debug mode","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-09-19T17:35:14Z","receivedAt":"2019-09-19T17:35:24Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Travis CI offers shell access to its virtual machine environment\nrunning the build jobs, called \"debug mode\" [1].  After restarting a\nbuild job in debug mode and logging in, the first thing I usually do\nis to install dependencies, i.e. run './ci/install-dependencies.sh'.\nThis works just fine when I restarted a failed build job in debug\nmode.  However, after restarting a successful build job in debug mode\nour CI scripts get all clever, and exit without doing anything useful,\nclaiming that \"This commit's tree has already been built and tested\nsuccessfully\" [2].  Our CI scripts are right, and we do want to skip\nbuilding and testing already known good trees in \"regular\" CI builds.\nIn debug mode, however, this is a nuisiance, because one has to delete\nthe cache (or at least the 'good-trees' file in the cache) to proceed.\n\nLet's update our CI scripts, in particular the common 'ci/lib.sh', to\nignore previously successfully built and tested trees in debug mode,\nso all those scripts will do what there were supposed to do even when\na successful build job was restarted in debug mode.\n\n[1] https://docs.travis-ci.com/user/running-build-in-debug-mode/\n[2] 9cc2c76f5e (travis-ci: record and skip successfully built trees,\n    2017-12-31)\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\n ci/lib.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 44db2d5cbb..1a09ac4b34 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -34,6 +34,11 @@ save_good_tree () {\n # successfully before (e.g. because the branch got rebased, changing only\n # the commit messages).\n skip_good_tree () {\n+\tif test \"$TRAVIS_DEBUG_MODE\" = true\n+\tthen\n+\t\treturn\n+\tfi\n+\n \tif ! good_tree_info=\"$(grep \"^$(git rev-parse $CI_COMMIT^{tree}) \" \"$good_trees_file\")\"\n \tthen\n \t\t# Haven't seen this tree yet, or no cached good trees file yet.\n-- \n2.23.0.331.g4e51dcdf11\n\n"},{"id":"382691","messageId":"xmqqftkqvo8r.fsf@gitster-ct.c.googlers.com","threadId":"51884","inReplyTo":"20190919173514.24074-1-szeder.dev@gmail.com","subject":"Re: [PATCH] travis-ci: ignore already tested trees in debug mode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-09-20T18:03:48Z","receivedAt":"2019-09-20T18:03:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n>  skip_good_tree () {\n> +\tif test \"$TRAVIS_DEBUG_MODE\" = true\n> +\tthen\n> +\t\treturn\n> +\tfi\n\nI think you convinced readers why it is a good idea to avoid\nskipping an already tested tree, and technically the title of this\ncommit is not incorrect per-se.  You are teaching to ignore\n\"already-tested-ness\" from a part of the logic).\n\nBut in the larger picture, I would expect that readers would more\nimmediately grasp what it is about if it were titled \"do not skip\nversions that have already tested good in debug mode\" or something\nlike that (IOW, we do not want to ignore such trees, we want to test\nthem again).\n\n"},{"id":"382694","messageId":"20190920181732.GC26402@szeder.dev","threadId":"51884","inReplyTo":"xmqqftkqvo8r.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] travis-ci: ignore already tested trees in debug mode","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-09-20T18:17:32Z","receivedAt":"2019-09-20T18:17:37Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, Sep 20, 2019 at 11:03:48AM -0700, Junio C Hamano wrote:\n> SZEDER Gábor <szeder.dev@gmail.com> writes:\n> \n> >  skip_good_tree () {\n> > +\tif test \"$TRAVIS_DEBUG_MODE\" = true\n> > +\tthen\n> > +\t\treturn\n> > +\tfi\n> \n> I think you convinced readers why it is a good idea to avoid\n> skipping an already tested tree, and technically the title of this\n> commit is not incorrect per-se.  You are teaching to ignore\n> \"already-tested-ness\" from a part of the logic).\n\nHrm, that's subtle, but you are right.\n\n> But in the larger picture, I would expect that readers would more\n> immediately grasp what it is about if it were titled \"do not skip\n> versions that have already tested good in debug mode\"\n\nWill try to come up with a better subject line, but I don't have any\nusable ideas at the moment.\n\n> or something\n> like that (IOW, we do not want to ignore such trees, we want to test\n> them again).\n> \n"},{"id":"382695","messageId":"xmqqblvevn44.fsf@gitster-ct.c.googlers.com","threadId":"51884","inReplyTo":"20190920181732.GC26402@szeder.dev","subject":"Re: [PATCH] travis-ci: ignore already tested trees in debug mode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-09-20T18:28:11Z","receivedAt":"2019-09-20T18:28:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n>> But in the larger picture, I would expect that readers would more\n>> immediately grasp what it is about if it were titled \"do not skip\n>> versions that have already tested good in debug mode\"\n>\n> Will try to come up with a better subject line, but I don't have any\n> usable ideas at the moment.\n\nSubject: [PATCH] travis-ci: do not skip already tested trees in debug mode\n\n???\n"},{"id":"382713","messageId":"20190920215637.GD26402@szeder.dev","threadId":"51884","inReplyTo":"xmqqblvevn44.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] travis-ci: ignore already tested trees in debug mode","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-09-20T21:56:37Z","receivedAt":"2019-09-20T21:56:43Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, Sep 20, 2019 at 11:28:11AM -0700, Junio C Hamano wrote:\n> SZEDER Gábor <szeder.dev@gmail.com> writes:\n> \n> >> But in the larger picture, I would expect that readers would more\n> >> immediately grasp what it is about if it were titled \"do not skip\n> >> versions that have already tested good in debug mode\"\n> >\n> > Will try to come up with a better subject line, but I don't have any\n> > usable ideas at the moment.\n> \n> Subject: [PATCH] travis-ci: do not skip already tested trees in debug mode\n\nWow, that's so obvious it's embarrassing.\n\n"},{"id":"382719","messageId":"20190921074055.8214-1-szeder.dev@gmail.com","threadId":"51884","inReplyTo":"xmqqblvevn44.fsf@gitster-ct.c.googlers.com","subject":"[PATCH v2] travis-ci: do not skip successfully tested trees in debug mode","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-09-21T07:40:54Z","receivedAt":"2019-09-21T07:41:01Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Travis CI offers shell access to its virtual machine environment\nrunning the build jobs, called \"debug mode\" [1].  After restarting a\nbuild job in debug mode and logging in, the first thing I usually do\nis to install dependencies, i.e. run './ci/install-dependencies.sh'.\nThis works just fine when I restarted a failed build job in debug\nmode.  However, after restarting a successful build job in debug mode\nour CI scripts get all clever, and exit without doing anything useful,\nclaiming that \"This commit's tree has already been built and tested\nsuccessfully\" [2].  Our CI scripts are right, and we do want to skip\nbuilding and testing already known good trees in \"regular\" CI builds.\nIn debug mode, however, this is a nuisiance, because one has to delete\nthe cache (or at least the 'good-trees' file in the cache) to proceed.\n\nLet's update our CI scripts, in particular the common 'ci/lib.sh', to\nnot skip previously successfully built and tested trees in debug mode,\nso all those scripts will do what there were supposed to do even when\na successful build job was restarted in debug mode.\n\n[1] https://docs.travis-ci.com/user/running-build-in-debug-mode/\n[2] 9cc2c76f5e (travis-ci: record and skip successfully built trees,\n    2017-12-31)\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\nRange-diff:\n1:  e9badc7483 ! 1:  a1959d3e16 travis-ci: ignore already tested trees in debug mode\n    @@ Metadata\n     Author: SZEDER Gábor <szeder.dev@gmail.com>\n     \n      ## Commit message ##\n    -    travis-ci: ignore already tested trees in debug mode\n    +    travis-ci: do not skip successfully tested trees in debug mode\n     \n         Travis CI offers shell access to its virtual machine environment\n         running the build jobs, called \"debug mode\" [1].  After restarting a\n    @@ Commit message\n         the cache (or at least the 'good-trees' file in the cache) to proceed.\n     \n         Let's update our CI scripts, in particular the common 'ci/lib.sh', to\n    -    ignore previously successfully built and tested trees in debug mode,\n    +    not skip previously successfully built and tested trees in debug mode,\n         so all those scripts will do what there were supposed to do even when\n         a successful build job was restarted in debug mode.\n     \n\n ci/lib.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 44db2d5cbb..1a09ac4b34 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -34,6 +34,11 @@ save_good_tree () {\n # successfully before (e.g. because the branch got rebased, changing only\n # the commit messages).\n skip_good_tree () {\n+\tif test \"$TRAVIS_DEBUG_MODE\" = true\n+\tthen\n+\t\treturn\n+\tfi\n+\n \tif ! good_tree_info=\"$(grep \"^$(git rev-parse $CI_COMMIT^{tree}) \" \"$good_trees_file\")\"\n \tthen\n \t\t# Haven't seen this tree yet, or no cached good trees file yet.\n-- \n2.23.0.331.g4e51dcdf11\n\n"}]}