[wp-trac] [WordPress Trac] #54410: GH Actions: Consider revising the Coding Standards actions to only scan modified files.
WordPress Trac
noreply at wordpress.org
Thu Nov 11 17:15:12 UTC 2021
#54410: GH Actions: Consider revising the Coding Standards actions to only scan
modified files.
------------------------------+------------------------------
Reporter: costdev | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by costdev):
Most recently it happened a number of times leading up to the feature
freeze. Given that it's a busy and stressful time, this increased the
frequency of the issue and its impact.
In general, I would say that it ranges from a minor inconvenience during
quiet periods, to unnecessary additional stress/work for Committers during
an already very busy/stressful period.
I totally agree that the underlying issue is that commits are being made
that don't meet Coding Standards and that ideally this shouldn't be
happening, but mistakes will happen and we should try to mitigate the
impact they have in all ways that we can.
As we know, not all sniffs will have autofixes if the issues need human
attention. This leaves it down to Coding Standards being part of the
commit workflow, which I trust it already is and that Committers do
everything they can to make sure they cover everything on the list.
Currently:
- When a Pull Request fails on Coding Standards, this doesn't affect
commits to `trunk` or other Pull Requests.
- When a commit to `trunk` fails on Coding Standards, this affects
everything.
IMO, in order to minimise confusion, Coding Standards errors ''should''
only affect where they occur.
By only scanning modified files on Pull Requests for Coding Standards
errors, we can let those Pull Requests run through CI, pass and be ready
for Review/Commit whenever the Coding Standards are fixed on `trunk`. This
improves the Contributor experience and also keeps things running
smoothly.
In addition, especially leading up to a freeze, Committers won't have to
manually re-run CI on each of the Pull Requests, answer requests for help
or be put under additional stress by people panicking and possibly getting
frustrated if the issues are happening frequently.
Although the last two paragraphs are re-iterating the ticket description -
Sorry!
When it comes to negatives, one would be:
1. A Committer makes a commit with Coding Standards errors.
2. A Contributor fetches from `trunk`, creates a branch and submits a Pull
Request. The Pull Request will fail on the same Coding Standards issue.
The solution: Rebase with `trunk` (which we should all be doing before
submitting a Pull Request anyway).
----
Aside from this ticket's initial proposal, another is that every single
commit to `trunk` is submitted as a Pull Request on GitHub (or SVN
equivalent, if there is one... I don't know SVN) to make sure that CI is
forced. If that's possible/agreeable, I believe that would also work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54410#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list