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

Re: [PATCH 3/3] scalar: only warn when background maintenance fails

From
Derrick Stolee <derrickstolee@github.com>
Date
Jan 27, 2023, 22:18 UTC
Message-ID
<4913381a-769f-aba0-c04d-559d103e8396@github.com>
In-Reply-To
<xmqqleln90ka.fsf@gitster.g>
On 1/27/2023 3:36 PM, Junio C Hamano wrote:
Show 24 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: Derrick Stolee <derrickstolee@github.com>
>>
>> A user reported issues with 'scalar clone' and 'scalar register' when
>> working in an environment that had locked down the ability to run
>> 'crontab' or 'systemctl' in that those commands registered as _failures_
>> instead of opportunistically reporting a success with just a warning
>> about background maintenance.
>>
>> As a workaround, they can use GIT_TEST_MAINT_SCHEDULER to fake a
>> successful background maintenance, but this is not a viable strategy for
>> long-term.
>>
>> Update 'scalar register' and 'scalar clone' to no longer fail by
>> modifying register_dir() to only warn when toggle_maintenance(1) fails.
>>
>> Since background maintenance is a "nice to have" and not a requirement
>> for a working repository, it is best to move this from hard error to
>> gentle warning.
> 
> Wasn't the main selling point of scalar that users do not have to
> worry about various minute details of configuration settings to
> maintain their clone of projects on the larger side?

Yes, and that includes things like partial clone, sparse-checkout, and FS Monitor which are independent of this maintenance change.

Show 11 quoted lines
>  The "maintain
> their clone" certainly should include running periodic maintenance
> tasks without them having to worry about it.  It feels like this is
> calling for an explicit "disable periodic maintenance tasks in this
> repository" option to help these esoteric environments that disable
> cron-like system services, while keeping the default safer,
> i.e. fail loudly when the periodic maintenance tasks that the users
> expect to happen cannot be enabled, or something.
> 
> Perhaps I am not the primary audience, but hmph, I have a feeling
> that this is not exactly going into a healthy direction.

Here, we are in an environment where background maintenance is unavailable in an unexpected way. If that feature is not available to the user, should they not get the benefits of the others?

Not having background maintenance is definitely a downside, but it's different from failing to connect to the server or being unable to complete setting up the working directory. The warning communicates the issue, so users can realize the problem exists and work to resolve it in their own way.

Thanks, -Stolee

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 16 in “Allow scalar to succeed despite maintenance failures”
  1. 0/3 Allow scalar to succeed despite maintenance failuresDerrick Stolee via GitGitGadget, Jan 27, 2023
  2. 3/3 scalar: only warn when background maintenance failsDerrick Stolee via GitGitGadget, Jan 27, 2023
  3. Junio C HamanoJan 27, 2023
  4. Derrick StoleeJan 27, 2023
  5. Junio C HamanoJan 28, 2023
  6. Derrick StoleeJan 30, 2023
  7. Junio C HamanoJan 30, 2023
  8. Victoria DyeJan 30, 2023
  9. Junio C HamanoJan 30, 2023
  10. Derrick StoleeJan 30, 2023
  11. Victoria DyeJan 27, 2023
  12. Derrick StoleeJan 30, 2023
  13. Victoria DyeJan 27, 2023
  14. Derrick StoleeJan 27, 2023
  15. 2/3 t921*: test scalar behavior starting maintenanceDerrick Stolee via GitGitGadget, Jan 27, 2023
  16. 1/3 t: allow 'scalar' in test_must_failDerrick Stolee via GitGitGadget, Jan 27, 2023

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.