diff mbox series

[b4] prep-pre-flight-checks doesn't seem to work

Message ID a8bc0958-6c46-4622-96ef-b1e55c15f30f@cherry.de (mailing list archive)
State New
Headers show
Series [b4] prep-pre-flight-checks doesn't seem to work | expand

Commit Message

Quentin Schulz Jan. 17, 2025, 11:35 a.m. UTC
Hi all,

I believe prep-pre-flight-checks doesn't work.

I've added

[b4]
   prep-pre-flight-checks = disable-all

in my local git repo .b4-config, but b4 send still complains.

Adding --debug to b4 shows the following (stripped down to what I 
believe is important):

Loading worktree configs from 
/home/qschulz/work/upstream/yocto/yocto-docs/.b4-config
Running git --no-pager config --file 
/home/qschulz/work/upstream/yocto/yocto-docs/.b4-config -z --get-regexp 
b4\..*
wtcfg={'send-series-cc': 'yocto-docs@lists.yoctoproject.org', 
'prep-pre-flight-checks': 'disable-all'}
wtcfg: send-series-cc=yocto-docs@lists.yoctoproject.org

Now if I dump cfg_checks from 
https://git.kernel.org/pub/scm/utils/b4/b4.git/tree/src/b4/ez.py?id=33ea697cc3d0bc77d2f3fb58176116608a0f1332#n1923 
I only get "enable-all" the default value if the prep-pre-flight-checks 
key is missing from the config dict.

"""
      multivals = ['keyringsrc', 'am-perpatch-check-cmd', 
'prep-perpatch-check-cmd']
      if topdir:
          wtcfg = os.path.join(topdir, '.b4-config')
"""

patching b4 with the above makes the property persist. No clue if that 
is the proper way to fix it nor what makes a setting worthy of being in 
that list.

Have I missed/misconfigured something somehow and this should work?

If it helps in anyway, running Fedora 41, Python 3.13.1. b4 tested from 
master (33ea697cc3d0 ("b4: stop generating full object IDs for 
non-binary diffs")) with b4.sh and also from v0.14.2 from pypi.

Let me know if there's anything I can do.

Cheers,
Quentin

Comments

Konstantin Ryabitsev Jan. 17, 2025, 3:20 p.m. UTC | #1
On Fri, Jan 17, 2025 at 12:35:16PM +0100, Quentin Schulz wrote:
> Hi all,
> 
> I believe prep-pre-flight-checks doesn't work.
> 
> I've added
> 
> [b4]
>   prep-pre-flight-checks = disable-all
> 
> in my local git repo .b4-config, but b4 send still complains.

Right, we only pay attention to a small subset of configuration options
coming from .b4-config and prep-pre-flight-checks isn't one of them, because
it's not something that should be configured project-wide.

What problems are you seeing that makes you want to disable pre-flight checks
for everyone?

-K
Quentin Schulz Jan. 17, 2025, 3:49 p.m. UTC | #2
Hi Konstantin,

On 1/17/25 4:20 PM, Konstantin Ryabitsev wrote:
> On Fri, Jan 17, 2025 at 12:35:16PM +0100, Quentin Schulz wrote:
>> Hi all,
>>
>> I believe prep-pre-flight-checks doesn't work.
>>
>> I've added
>>
>> [b4]
>>    prep-pre-flight-checks = disable-all
>>
>> in my local git repo .b4-config, but b4 send still complains.
> 
> Right, we only pay attention to a small subset of configuration options
> coming from .b4-config and prep-pre-flight-checks isn't one of them, because
> it's not something that should be configured project-wide.
> 
> What problems are you seeing that makes you want to disable pre-flight checks
> for everyone?
> 

We do not have checks nor auto-to-cc commands, so there's no point in 
telling the user to run b4 prep --auto-to-cc and b4 prep --check before 
sending the patches as they'll do nothing.

Cheers,
Quentin
Konstantin Ryabitsev Jan. 17, 2025, 4:17 p.m. UTC | #3
On Fri, Jan 17, 2025 at 04:49:36PM +0100, Quentin Schulz wrote:
> > What problems are you seeing that makes you want to disable pre-flight checks
> > for everyone?
> > 
> 
> We do not have checks nor auto-to-cc commands, so there's no point in
> telling the user to run b4 prep --auto-to-cc and b4 prep --check before
> sending the patches as they'll do nothing.

Okay, I'm more inclined to treat this as a bug, because we shouldn't be
invoking obviously irrelevant pre-flight checks. I don't advise turning it off
entirely, because some pre-flight checks (like the dependency checker) are
still valid in your case.

I'll work to better recognize when certain pre-flight checks are irrelevant
and disable them automatically.

bugspray tag me

-K
Bugspray Bot Jan. 17, 2025, 4:20 p.m. UTC | #4
Hello:

This conversation is now tracked by Kernel.org Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=219705

There is no need to do anything else, just keep talking.
Quentin Schulz Jan. 17, 2025, 4:21 p.m. UTC | #5
Hi Konstantin,

On 1/17/25 5:17 PM, Konstantin Ryabitsev wrote:
> On Fri, Jan 17, 2025 at 04:49:36PM +0100, Quentin Schulz wrote:
>>> What problems are you seeing that makes you want to disable pre-flight checks
>>> for everyone?
>>>
>>
>> We do not have checks nor auto-to-cc commands, so there's no point in
>> telling the user to run b4 prep --auto-to-cc and b4 prep --check before
>> sending the patches as they'll do nothing.
> 
> Okay, I'm more inclined to treat this as a bug, because we shouldn't be
> invoking obviously irrelevant pre-flight checks. I don't advise turning it off
> entirely, because some pre-flight checks (like the dependency checker) are
> still valid in your case.
> 

Indeed, I actually only disable needs-checking or needs-auto-to-cc 
wherever appropriate. It's just that disable-all was shorter to write 
and check if things were happening the way I expected them to :)

> I'll work to better recognize when certain pre-flight checks are irrelevant
> and disable them automatically.
> 

Thanks!

Cheers,
Quentin
diff mbox series

Patch

diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index 814413e..b514556 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -2883,7 +2883,7 @@  def _setup_main_config(cmdargs: 
Optional[argparse.Namespace] = None) -> None:
      # some options can be provided via the toplevel .b4-config file,
      # so load them up and use as defaults
      topdir = git_get_toplevel()
-    wtglobs = ['prep-*-check-cmd', 'send-*', '*mask', '*template*', 
'trailer*', 'pw-*']
+    wtglobs = ['prep-*-check-cmd', 'send-*', '*mask', '*template*', 
'trailer*', 'pw-*', 'prep-pre-flight-checks']