git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] fixup??? Merge branch 'ab/ci-updates' into seen
Date: Tue, 23 Nov 2021 09:58:53 -0800	[thread overview]
Message-ID: <xmqqo86a92jm.fsf@gitster.g> (raw)
In-Reply-To: <211123.86ilwjujmd.gmgdl@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Tue, 23 Nov 2021 13:18:09 +0100")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> I'm pointing out that your patch to "master" has a logic error where you
> added the scalar tests after that case/esac, but on "master" any new
> "make new-test" needs to be added thusly:
>
>     diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
>     index cc62616d806..37df8e2397a 100755
>     --- a/ci/run-build-and-tests.sh
>     +++ b/ci/run-build-and-tests.sh
>     @@ -34,21 +34,28 @@ linux-gcc)
> ...
>      *)
>             make test
>     +       make new-test
>             ;;
>      esac
>     +"and not here, as it would run under pedantic"
>      
>      check_unignored_build_artifacts
>      
> As a result if you look at your own CI run's "pedantic" job at
> https://github.com/gitgitgadget/git/runs/4292915519?check_suite_focus=true
> you'll see that it runs the scalar test, which is not the
> intention. That job should be compile-only job with the -pedantic flag.

I think the above shows that it is a bug in the topic itself, but
the presense of the ab/ci-updates topic makes the issue harder to
see.  It makes the problem manifest in quite a different way.  The
band-aid we saw from Dscho does "fix" the manifestation after two
topics get merged (i.e. scalar build or test must follow the primary
build and cannot be done by itself), without correcting the original
bug (i.e.  scalar test is done in a wrong CI job).

Also, when writing recipes for CI, if you know that scalar build or
test must be preceded by primary build, I wonder if it is with more
good manners to write

	make test
-	make -C scalar test
+	make && make -C scalar test

to make the dendency clear?  In addition, it would be courteous to
the fellow developers to make the public entry points like "all" and
"test" self contained.  The Makefile of scalar knows as well as, or
better than, the developers that going up to the top-level of the
working tree and running "make" is required before "all" target can
be built, so automating that would help everybody from the trouble,
and the silly ugliness of "make && make -C there" I suggested above.

I do not, for example, mind at all if something silly like this was
done in contrib/scalar/Makefile:

    all: ../../git
    ../../git:
	$(MAKE) -C ../..
    test: all
	...

which is with clearly broken dependencies (e.g. if you edit
revision.c, scalar will not be rebuilt or the change would not
affect scalar's tests), but for the purpose of "letting CI build and
test from scratch to smoke out problems early", it is good enough.

Perhaps Ævar's suggestions were a lot more perfectionist than what
pragmatic me would say, and didn't mesh well with the test of Dscho
who is even more pragmatic than me?  In a separate message, Dscho
talks about weeks of delay, but it does not look to me that it is
solely Ævar's fault.

We know we hope to be able to make scalar as part of the top-level
offering from the project someday, but before that, we should make
sure it is as good as it has been advertiesed so far, and by not
even being able to easily integrate "correctly" (i.e. in line with
the design of the surrounding code) with the CI, we are stumbling at
the first step.

Thanks, both.

      reply	other threads:[~2021-11-23 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 11:02 [PATCH] fixup??? Merge branch 'ab/ci-updates' into seen Johannes Schindelin via GitGitGadget
2021-11-22 15:57 ` Ævar Arnfjörð Bjarmason
2021-11-22 21:58   ` Johannes Schindelin
2021-11-22 23:12     ` Ævar Arnfjörð Bjarmason
2021-11-23 12:02       ` Johannes Schindelin
2021-11-23 12:18         ` Ævar Arnfjörð Bjarmason
2021-11-23 17:58           ` Junio C Hamano [this message]

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=xmqqo86a92jm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@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).