From: Derrick Stolee <derrickstolee@github.com>
To: Victoria Dye <vdye@github.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH 3/3] scalar: only warn when background maintenance fails
Date: Fri, 27 Jan 2023 17:14:43 -0500 [thread overview]
Message-ID: <7070bd26-3020-5a17-2f51-2df9ae00df8c@github.com> (raw)
In-Reply-To: <65b1735b-7ea6-5f7c-e1d9-6c986c7beb1d@github.com>
On 1/27/2023 5:06 PM, Victoria Dye wrote:
> Derrick Stolee via GitGitGadget wrote:
>> if (toggle_maintenance(1))
>> - return error(_("could not turn on maintenance"));
>> + warning(_("could not turn on maintenance"));
>
> Should we do the same thing for 'unregister_dir()'? Unlike 'register_dir()',
> it doesn't break immediately (and finishes removing the enlistment), but it
> still returns a nonzero error code from 'scalar unregister'.
The interesting thing about unregister_dir() is that
toggle_maintenance(0) "turns of maintenance" by removing the
maintenance.repo config value pointing to this repository,
not by removing the maintenance schedule. Thus, we don't get
the failure in the same way.
>> -test_expect_success 'scalar clone fails when background maintenance fails' '
>> +test_expect_success 'scalar clone warns when background maintenance fails' '
>> GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
>> - test_must_fail scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
>> + scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
>> grep "could not turn on maintenance" err
>> '
>
> Similarly, it might be nice to show how 'scalar unregister' behaves when
> maintenance fails in the tests.
And the way I found out was by making the same tests, but since
they actually never failed or listed a warning (for this reason)
I left it out.
Thanks,
-Stolee
prev parent reply other threads:[~2023-01-27 22:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 20:06 [PATCH 0/3] Allow scalar to succeed despite maintenance failures Derrick Stolee via GitGitGadget
2023-01-27 20:06 ` [PATCH 1/3] t: allow 'scalar' in test_must_fail Derrick Stolee via GitGitGadget
2023-01-27 20:06 ` [PATCH 2/3] t921*: test scalar behavior starting maintenance Derrick Stolee via GitGitGadget
2023-01-27 20:06 ` [PATCH 3/3] scalar: only warn when background maintenance fails Derrick Stolee via GitGitGadget
2023-01-27 20:36 ` Junio C Hamano
2023-01-27 22:18 ` Derrick Stolee
2023-01-28 0:32 ` Junio C Hamano
2023-01-30 13:44 ` Derrick Stolee
2023-01-30 15:40 ` Junio C Hamano
2023-01-30 17:42 ` Victoria Dye
2023-01-30 18:58 ` Junio C Hamano
2023-01-30 19:06 ` Derrick Stolee
2023-01-27 22:18 ` Victoria Dye
2023-01-30 19:25 ` Derrick Stolee
2023-01-27 22:06 ` Victoria Dye
2023-01-27 22:14 ` Derrick Stolee [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7070bd26-3020-5a17-2f51-2df9ae00df8c@github.com \
--to=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=vdye@github.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.
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 NNTP newsgroup(s).