b4 bugs / future improvements
Hi Konstantin,
Thanks again for b4, it's really great :)
There's a bunch of things I have noticed in the recent weeks:
- It looks like 87e0e464959c breaks msmtp which doesn't recognize the -f option, and will just error out
- Generally speaking, rebasing a b4 series is a bit troublesome:
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
- If one sends a version, rebases, and then runs b4 trailers -u, then no tag is found for that series. I assume it's because the change-id has changed, but maybe for series that differ from the last sent version we could also look for the last sent change-id?
And finally, and this is more of a feature request, now that it looks like we have the list of all the older versions in the cover letter and their base, could we have a subcommand to start a range-diff between an older version and its base, and the current base and HEAD?
Thanks!
Maxime
Quoted 3 lines · Maxime Ripard
Hi Konstantin,
Thanks again for b4, it's really great :)
I'm glad you're trying out the "send" functionality, despite its experimental state -- your feedback is very welcome.
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error out
There's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html
(see under "options specific to sendmail mode")
Quoted 6 lines
- Generally speaking, rebasing a b4 series is a bit troublesome:
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Is there a reason why you have to manually edit the cover letter after a rebase?
Quoted 4 lines
- If one sends a version, rebases, and then runs b4 trailers -u, then no tag is found for that series. I assume it's because the change-id has changed, but maybe for series that differ from the last sent version we could also look for the last sent change-id?
This is really strange, there's got to be something else going on. Here's a simple test I just did:
First, I create a new b4 prep branch from a random patch series, and base it off of tag v6.0:
$ b4 prep -n test-rebase -F [email protected] -f v6.0 Checking attestation on all messages, may take a moment... --- ✓ [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR ✓ [PATCH 2/4] vdpa/mlx5: Move some definitions to a new header file ✓ [PATCH 3/4] vdpa/mlx5: Add debugfs subtree ✓ [PATCH 4/4] vdpa/mlx5: Add RX counters to debugfs --- ✓ Signed: DKIM/nvidia.com --- Created new branch b4/test-rebase Applying 4 patches --- Applying: vdpa/mlx5: Fix rule forwarding VLAN to TIR Applying: vdpa/mlx5: Move some definitions to a new header file Applying: vdpa/mlx5: Add debugfs subtree Applying: vdpa/mlx5: Add RX counters to debugfs --- NOTE: any follow-up trailers were ignored; apply them with b4 trailers -u
Next, I rebase it on v6.1-rc1:
$ git rebase v6.1-rc1
Successfully rebased and updated refs/heads/b4/test-rebase.Now I update the trailers:
$ b4 trailers -u
Calculating patch-ids from 4 commits
Checking change-id "20221018-test-rebase-108ba0501f16"
Grabbing search results from lore.kernel.org
Nothing matching that query.
Retrieving thread matching [email protected]
Grabbing thread from lore.kernel.org/all/20221018111232.4021-1-elic%40nvidia.com/t.mbox.gz
---
vdpa/mlx5: Fix rule forwarding VLAN to TIR
+ Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com)
vdpa/mlx5: Move some definitions to a new header file
+ Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com)
vdpa/mlx5: Add debugfs subtree
+ Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com)
---
Invoking git-filter-repo to update trailers.
New history written in 1.26 seconds...
Completely finished after 1.57 seconds.
Trailers updated.I think I need to better understand your workflow to grasp where the disconnect is.
Quoted 4 lines
And finally, and this is more of a feature request, now that it looks like we have the list of all the older versions in the cover letter and their base, could we have a subcommand to start a range-diff between an older version and its base, and the current base and HEAD?
It's already in master. :)
b4 prep --compare-to vN
Best regards,
-K
Quoted 9 lines · Konstantin Ryabitsev
Quoted 6 lines · Maxime Ripard
- Generally speaking, rebasing a b4 series is a bit troublesome:
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Quoted 5 lines
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Is there a reason why you have to manually edit the cover letter after a rebase?
If you're doing an inter-version changelog it's common to say something like "rebased against foo" in there. It's a bit clearer about things than base-commit.
Quoted 8 lines · Mark Brown
Quoted 7 lines
Quoted 4 lines
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Quoted 6 lines
Quoted 2 lines
Is there a reason why you have to manually edit the cover letter after a rebase?
If you're doing an inter-version changelog it's common to say something like "rebased against foo" in there. It's a bit clearer about things than base-commit.
No, I don't think that's what Maxime means -- "rebased against foo" can be done using "b4 prep --edit-cover". I think there's two things going on:
1. he's using a different cover strategy that requires base-branch tracking
2. he's rebasing on a different branch, as opposed to a newer tag within the same branch
That would indeed be as cumbersome as described (and why I'm using the "cover letter as an empty commit at the start of the series" strategy as the default).
Maxime, is that correct? I assume you're using "tip-commit"?
-K
Quoted 12 lines · Konstantin Ryabitsev
Quoted 11 lines · Mark Brown
Quoted 10 lines
Quoted 4 lines
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Is there a reason why you have to manually edit the cover letter after a rebase?
Quoted 6 lines
Quoted 3 lines
If you're doing an inter-version changelog it's common to say something like "rebased against foo" in there. It's a bit clearer about things than base-commit.
No, I don't think that's what Maxime means -- "rebased against foo" can be done using "b4 prep --edit-cover".
Yeah, I'm manually editing the JSON part. But tbf, I don't really know why I started doing it, so it might be fixed for a while, or never an issue in the first place.
Quoted 5 lines
I think there's two things going on:
1. he's using a different cover strategy that requires base-branch tracking
2. he's rebasing on a different branch, as opposed to a newer tag within the same branch
If it causes any issue, then it could be the reason yeah. I do rebase across different branches from time to time, so it might be why I started doing so.
Quoted 5 lines
That would indeed be as cumbersome as described (and why I'm using the "cover letter as an empty commit at the start of the series" strategy as the default).
Maxime, is that correct? I assume you're using "tip-commit"?
I'm using the commit strategy
Maxime
Quoted 10 lines · Maxime Ripard
Quoted 6 lines
Quoted 3 lines
If you're doing an inter-version changelog it's common to say something like "rebased against foo" in there. It's a bit clearer about things than base-commit.
No, I don't think that's what Maxime means -- "rebased against foo" can be done using "b4 prep --edit-cover".
Yeah, I'm manually editing the JSON part. But tbf, I don't really know why I started doing it, so it might be fixed for a while, or never an issue in the first place.
If you're using the "commit" (default) strategy, then you really don't need to worry about the base-branch bit in the JSON tracking info.
Quoted 9 lines
Quoted 5 lines
I think there's two things going on:
1. he's using a different cover strategy that requires base-branch tracking
2. he's rebasing on a different branch, as opposed to a newer tag within the same branchIf it causes any issue, then it could be the reason yeah. I do rebase across different branches from time to time, so it might be why I started doing so.
When we keep the cover letter at the start of the series, then we don't really care about the base branch -- we know exactly where the series starts, so we don't need to keep any information about the tracking branch around. Next time you rebase, just ignore the base-branch entry.
I will look at improving the trailers matching logic in the near future (that's unrelated to rebasing -- we just need to have a sane fall-back when the patch-id changes).
-K
Quoted 8 lines · Konstantin Ryabitsev
Quoted 7 lines · Maxime Ripard
Quoted 6 lines
Quoted 3 lines
If you're doing an inter-version changelog it's common to say something like "rebased against foo" in there. It's a bit clearer about things than base-commit.
No, I don't think that's what Maxime means -- "rebased against foo" can be done using "b4 prep --edit-cover".
Quoted 6 lines
Quoted 3 lines
Yeah, I'm manually editing the JSON part. But tbf, I don't really know why I started doing it, so it might be fixed for a while, or never an issue in the first place.
If you're using the "commit" (default) strategy, then you really don't need to worry about the base-branch bit in the JSON tracking info.
I just tested and it indeed just works, sorry for the confusion :)
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines
I think there's two things going on:
1. he's using a different cover strategy that requires base-branch tracking
2. he's rebasing on a different branch, as opposed to a newer tag within the same branchIf it causes any issue, then it could be the reason yeah. I do rebase across different branches from time to time, so it might be why I started doing so.
Quoted 8 lines
When we keep the cover letter at the start of the series, then we don't really care about the base branch -- we know exactly where the series starts, so we don't need to keep any information about the tracking branch around. Next time you rebase, just ignore the base-branch entry.
I will look at improving the trailers matching logic in the near future (that's unrelated to rebasing -- we just need to have a sane fall-back when the patch-id changes).
Awesome, thanks
Maxime
Quoted 33 lines · Konstantin Ryabitsev
Quoted 3 lines · Maxime Ripard
Hi Konstantin,
Thanks again for b4, it's really great :)
I'm glad you're trying out the "send" functionality, despite its experimental state -- your feedback is very welcome.
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error outThere's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html(see under "options specific to sendmail mode")
Quoted 6 lines
- Generally speaking, rebasing a b4 series is a bit troublesome:
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Is there a reason why you have to manually edit the cover letter after a rebase?
Quoted 7 lines
Quoted 4 lines
- If one sends a version, rebases, and then runs b4 trailers -u, then no tag is found for that series. I assume it's because the change-id has changed, but maybe for series that differ from the last sent version we could also look for the last sent change-id?
This is really strange, there's got to be something else going on. Here's a simple test I just did:
Isn't this the same issue I reported where the patch hash changes and no trailers are found.
Rob
Quoted 10 lines · Konstantin Ryabitsev
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error outThere's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html(see under "options specific to sendmail mode")
It might be the auto argument that confuses it then? I'll check.
Quoted 7 lines
Quoted 6 lines
- Generally speaking, rebasing a b4 series is a bit troublesome:
- It's a bit tedious to do. One needs to rebase and then edit the cover letter by hand without b4 being involved. I don't think doing the rebase interface all over again is reasonable, but maybe we could add a subcommand to set a new base?
Quoted 5 lines
Interesting. I'm not sure I fully understand the problem, but then all my rebase tests were all very simple cases of running "git rebase <newtag>"
Is there a reason why you have to manually edit the cover letter after a rebase?
I was under the impression that we needed to update the base-branch field? b4 prep -e sets it, so I was assuming it was important, but I might just be wrong and it's not needed.
Quoted 58 lines
Quoted 4 lines
- If one sends a version, rebases, and then runs b4 trailers -u, then no tag is found for that series. I assume it's because the change-id has changed, but maybe for series that differ from the last sent version we could also look for the last sent change-id?
This is really strange, there's got to be something else going on. Here's a simple test I just did:
First, I create a new b4 prep branch from a random patch series, and base it off of tag v6.0:
$ b4 prep -n test-rebase -F [email protected] -f v6.0 Checking attestation on all messages, may take a moment... --- ✓ [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR ✓ [PATCH 2/4] vdpa/mlx5: Move some definitions to a new header file ✓ [PATCH 3/4] vdpa/mlx5: Add debugfs subtree ✓ [PATCH 4/4] vdpa/mlx5: Add RX counters to debugfs --- ✓ Signed: DKIM/nvidia.com --- Created new branch b4/test-rebase Applying 4 patches --- Applying: vdpa/mlx5: Fix rule forwarding VLAN to TIR Applying: vdpa/mlx5: Move some definitions to a new header file Applying: vdpa/mlx5: Add debugfs subtree Applying: vdpa/mlx5: Add RX counters to debugfs --- NOTE: any follow-up trailers were ignored; apply them with b4 trailers -uNext, I rebase it on v6.1-rc1:
$ git rebase v6.1-rc1 Successfully rebased and updated refs/heads/b4/test-rebase.Now I update the trailers:
$ b4 trailers -u Calculating patch-ids from 4 commits Checking change-id "20221018-test-rebase-108ba0501f16" Grabbing search results from lore.kernel.org Nothing matching that query. Retrieving thread matching [email protected] Grabbing thread from lore.kernel.org/all/20221018111232.4021-1-elic%40nvidia.com/t.mbox.gz --- vdpa/mlx5: Fix rule forwarding VLAN to TIR + Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com) vdpa/mlx5: Move some definitions to a new header file + Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com) vdpa/mlx5: Add debugfs subtree + Reviewed-by: Si-Wei Liu <[email protected]> (✓ DKIM/oracle.com) --- Invoking git-filter-repo to update trailers. New history written in 1.26 seconds... Completely finished after 1.57 seconds. Trailers updated.
Quoted 2 lines
I think I need to better understand your workflow to grasp where the disconnect is.
I just played around some more, and it looks that when the commit is exactly the same, it's indeed able to find the trailers.
However, if there's a conflict (which is still fairly common when one rebases) and we do a merge conflict resolution it's not able to anymore. Rob's hint in his mail that there's a patch hash to retrieve the trailer would explain it, the patch content (and context) has potentially changed after a rebase.
Quoted 8 lines
Quoted 4 lines
And finally, and this is more of a feature request, now that it looks like we have the list of all the older versions in the cover letter and their base, could we have a subcommand to start a range-diff between an older version and its base, and the current base and HEAD?
It's already in master. :)
b4 prep --compare-to vN
Oh, I missed it, it's awesome thanks :)
Maxime
Quoted 6 lines · Maxime Ripard
Quoted 2 lines
Is there a reason why you have to manually edit the cover letter after a rebase?
I was under the impression that we needed to update the base-branch field? b4 prep -e sets it, so I was assuming it was important, but I might just be wrong and it's not needed.
Right, we set it initially for all cover letter strategies, but if you're using the default "commit" strategy (keeping the cover letter in an empty commit at the start of the series), then it's purely informational and we don't use it for anything.
Quoted 5 lines
However, if there's a conflict (which is still fairly common when one rebases) and we do a merge conflict resolution it's not able to anymore. Rob's hint in his mail that there's a patch hash to retrieve the trailer would explain it, the patch content (and context) has potentially changed after a rebase.
I'll work on fixing that -- I just need to do some yak shaving in pytest so I can write some tests around it first.
-K
Quoted 6 lines · Maxime Ripard
Quoted 5 lines · Konstantin Ryabitsev
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error out
Quoted 7 lines
Quoted 5 lines
There's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html(see under "options specific to sendmail mode")
It might be the auto argument that confuses it then? I'll check.
So, here's the behaviour I'm seeing:
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i -f auto [email protected] msmtp: recipient address [email protected] not accepted by the server msmtp: server message: 504 5.5.2 <auto>: Sender address rejected: need fully-qualified address msmtp: could not send mail (account default from /home/max/.config/msmtp/config)
If I drop the -f auto, it works:
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i [email protected] $ echo $? 0
It seems to be related to
https://github.com/marlam/msmtp-mirror/issues/51 except I don't have set_from_header in my config. I've tried to use allow_from_override and force it to off, and it didn't help.
Maxime
Hi,
Quoted 24 lines · Maxime Ripard
Quoted 6 lines · Maxime Ripard
Quoted 5 lines · Konstantin Ryabitsev
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error outQuoted 7 lines
Quoted 5 lines
There's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html(see under "options specific to sendmail mode")
It might be the auto argument that confuses it then? I'll check.
So, here's the behaviour I'm seeing:
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i -f auto [email protected] msmtp: recipient address [email protected] not accepted by the server msmtp: server message: 504 5.5.2 <auto>: Sender address rejected: need fully-qualified address msmtp: could not send mail (account default from /home/max/.config/msmtp/config)If I drop the -f auto, it works:
Quoted 8 lines
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i [email protected] $ echo $? 0It seems to be related to
https://github.com/marlam/msmtp-mirror/issues/51 except I don't haveset_from_headerin my config. I've tried to useallow_from_overrideand force it to off, and it didn't help.
I just discovered something else.
For various reasons, on one of my series I keep a per-commit changelog, in the commit log after a ---
This works generally fine, until I run b4 trailers -u which seems to drop the entire content after --- when adding the tags.
Maxime
Quoted 5 lines · Maxime Ripard
Quoted 4 lines
It seems to be related to
https://github.com/marlam/msmtp-mirror/issues/51 except I don't haveset_from_headerin my config. I've tried to useallow_from_overrideand force it to off, and it didn't help.
Quoted 7 lines
I just discovered something else.
For various reasons, on one of my series I keep a per-commit changelog, in the commit log after a ---
This works generally fine, until I run b4 trailers -u which seems to drop the entire content after --- when adding the tags.
This took a while to track and fix, but this should no longer happen in master and stable-0.10.y. Thank you for the report.
-K
Quoted 8 lines · Konstantin Ryabitsev
Quoted 7 lines · Maxime Ripard
Quoted 4 lines
It seems to be related to
https://github.com/marlam/msmtp-mirror/issues/51 except I don't haveset_from_headerin my config. I've tried to useallow_from_overrideand force it to off, and it didn't help.I just discovered something else.
Quoted 8 lines
Quoted 5 lines
For various reasons, on one of my series I keep a per-commit changelog, in the commit log after a ---
This works generally fine, until I run b4 trailers -u which seems to drop the entire content after --- when adding the tags.
This took a while to track and fix, but this should no longer happen in master and stable-0.10.y. Thank you for the report.
Awesome, I'll give it a try, thanks a lot
Maxime
Quoted 22 lines · Maxime Ripard
Quoted 6 lines · Maxime Ripard
Quoted 5 lines · Konstantin Ryabitsev
Quoted 4 lines
There's a bunch of things I have noticed in the recent weeks:
- It looks like
87e0e464959cbreaks msmtp which doesn't recognize the -f option, and will just error outQuoted 7 lines
Quoted 5 lines
There's got to be something else going on, since -f is required for sendmail compatibility. The msmtp manpage specifically mentions that is supports it:
https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html(see under "options specific to sendmail mode")
It might be the auto argument that confuses it then? I'll check.
So, here's the behaviour I'm seeing:
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i -f auto [email protected] msmtp: recipient address [email protected] not accepted by the server msmtp: server message: 504 5.5.2 <auto>: Sender address rejected: need fully-qualified address msmtp: could not send mail (account default from /home/max/.config/msmtp/config)
Quoted 5 lines
If I drop the -f auto, it works:
$ printf "From: <[email protected]>\nTo: <[email protected]>\nSubject: Test\n\nTest Test." | msmtp -i [email protected] $ echo $? 0
I was finally able to figure that one out.
Git configuration option sendemail.envelopeSender has a special value "auto" that will use the From address and pass that to sendmail's -f.
b4 uses sendemail.envelopeSender directly, passing "auto" directly which results in the behaviour described above.
Maxime