On 2/20/24 15:48, Ard Biesheuvel wrote: > Hello Mike, > > I understand the desire to be pedantic about cc'ing the right > maintainers, but I'm not convinced this is the way. > > - the presence of a cc: tag does not guarantee that the person was > cc'ed - only git send-email will take CC:s in the message body into > account by default (but this can also be disabled), but generally, the > sender has to ensure the cc list is copied into the cc: field > - the absence of a cc: tag does not imply that the person was not cc'ed, > > - in Linux, the cc: tag has slightly different semantics from the ones > we appear to be assuming here: a cc tag in patch going into the > repository is a statement by the maintainer that the person in > question has been cc'ed, may have some 'jurisdiction' over the area, > but hasn't bothered to respond. IOW, it is to record the fact that > this person has been given the opportunity to respond. > > Then there is the matter of a maintainer that has reviewed the patch > themselves. I usually remove the cc lines listing people that have > reviewed/acked/tested the patch, as those tags already convey that the > person is aware of it cc'ed or not.
I've noticed this (on patches you merged), and -- not having similar maintainer experience in Linux -- I was surprised. I more or less deduced the intent, but it felt a bit foreign (or at least novel!) to edk2. To me, the greatest benefits of Cc's in commit messages are (as opposed to command line specified Cc's): - fine-grained: each patch can target a specific set of reviewers / maintainers, - long-lived: the CC list survives rebases / v2, v3 etc iterations! (Of course, if a patch undergoes serious scope changes when revised, then the Cc list will have to be updated manually. But that's quite rare.) > > So perhaps it would be better to make this check part of the > contributor workflow but not the GitHub PR/CI workflow? I agree that adding Cc's to the commit message body is not fool-proof (like you explain), but like Mike, I have no better idea for preventing contributors from posting patches without properly CC'ing reviewers/maintainers (be it with whatever particular CC'ing method they prefer). I tend to run PatchCheck locally (not solely relying on CI for that -- PatchCheck is quick and has no intrusive dependencies, plus seeing CI fail just because of PatchCheck is super irritating), so in my workflow, this patch would fit well. Of course, with the same effort of remembering to run PatchCheck locally, I also remember to add Cc's in the first place... I admit that reviewer assignment is a significant shortcoming of the email-based workflow. What we'd really need is a groups.io-level action :) -- if the subject contains PATCH or Patch in brackets, but the body lacks ^Cc or ^CC, *reject* the email. (Rejection gives the sender an explanation.) Alas, rejection is currently only a manual action that's available to moderators (and only on messages for senders that have not been unmoderated yet). So, my take: not perfect, but much better than nothing. Laszlo > > > On Sun, 18 Feb 2024 at 22:00, Michael D Kinney > <michael.d.kin...@intel.com> wrote: >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4694 >> >> If no Cc tags are detected in a commit message, then generate an >> error. All patches sent for review are required to provide the set >> of maintainers and reviewers responsible for the directories/files >> modified. The set of maintainers and reviewers are documented in >> Maintainers.txt and can be retrieved using the script >> BaseTools/Scripts/GetMaintainer.py. >> >> Cc: Rebecca Cran <rebe...@bsdio.com> >> Cc: Liming Gao <gaolim...@byosoft.com.cn> >> Cc: Bob Feng <bob.c.f...@intel.com> >> Cc: Yuwei Chen <yuwei.c...@intel.com> >> Cc: Michael Kubacki <mikub...@linux.microsoft.com> >> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> >> --- >> BaseTools/Scripts/PatchCheck.py | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/BaseTools/Scripts/PatchCheck.py >> b/BaseTools/Scripts/PatchCheck.py >> index 158a2b30a5ce..415198e3824e 100755 >> --- a/BaseTools/Scripts/PatchCheck.py >> +++ b/BaseTools/Scripts/PatchCheck.py >> @@ -229,8 +229,10 @@ class CommitMessageCheck: >> ) >> >> def check_misc_signatures(self): >> - for sig in self.sig_types: >> - self.find_signatures(sig) >> + for sigtype in self.sig_types: >> + sigs = self.find_signatures(sigtype) >> + if sigtype == 'Cc' and len(sigs) == 0: >> + self.error('No Cc: tags for maintainers/reviewers found!') >> >> cve_re = re.compile('CVE-[0-9]{4}-[0-9]{5}[^0-9]') >> >> -- >> 2.40.1.windows.1 >> >> >> >> >> >> > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115745): https://edk2.groups.io/g/devel/message/115745 Mute This Topic: https://groups.io/mt/104434584/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-