Tracking task for known incompatibilities between the new and old rule parser, before we can re-enabling the new parser.
Previous issues of site performance, citing AbuseFilter as contributing factor or root cause:
* {T172447}
* {T138550}
As the parser will be working, unit tests for it should be enabled (see https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/453996/)
----
##### Plan for finishing AbuseFilterCachingParser
# {icon check-square-o} Fix "Short-circuit evaluation with multiple comparisons". – T218906, <https://gerrit.wikimedia.org/r/498127>
# {icon check-square-o} Fix "Short circuit with assignments . –" T214674 (only if the fix is easy; to be discussed...)
# {icon check-square-o} Fix and re-enable unit tests for CachingParser. – <https://gerrit.wikimedia.org/r/454557>
# {icon check-square-o} Deprecate "wild" abusefilter syntax. – T156096
** {icon check-square-o} Introduce "AFPData::DNONE" concept. – <https://gerrit.wikimedia.org/r/512135>, <https://gerrit.wikimedia.org/r/478424>
# {icon check-square-o} Investigate and fix AbuseFilterCachingParser bug with "if" conditions. – T152281
# {icon check-square-o} Improve parameters handling - https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/531140/
# {icon check-square-o} Allow ifs without else and reject empty conditions (because CachingParser doesn't support empty if). – T230727
# {icon check-square-o} Speed up hoisting for the CachingParser – T230982
# {icon check-square-o} Report errors inside short-circuited blocks when checking syntax. – T232498
# {icon check-square-o} Change the CachingParser to throw an AFPUserVisibleException instead of a TypeError for empty operands. – T156096, T153251
# {icon check-square-o} Fix any on-wiki filters that use "wild" abusefilter syntax, including trailing commas in function calls (T153251) – T156096
** {icon check-square-o} This would be way easier with https://meta.wikimedia.org/wiki/Requests_for_comment/Creating_abusefilter-manager_global_group
# {icon square-o} Right before enabling the new parser, re-check logstash and ensure no empty operands are logged – T156096, T153251
# {icon square-o} Enable CachingParser in production according to the plan below
# {icon square-o} Use CachingParser as default in extension.json - Not before completing the switch in production, ensuring that we have no regressions, and completing the deprecations above; tentatively proposing MW 1.36.
##### Plan for deploying AbuseFilterCachingParser
(See T156095#5434572 for a preview)
# {icon square-o} Establish base line metric for amount of time spent in AbuseFilter during saving of edits. For example, the time spent in AbuseFilter within Backend Save Timing (mean avg, median, p75; for three different days in a given week), as well as the total amount of time (median, p75, for three different days).
# {icon square-o} Enable on Beta Cluster and group0 wikis and monitor impact on the above metrics as well as the general Save Timing and Backend Save Timing dashboards in Grafana.
# {icon square-o} If no performance degradation (T156095#5425912), enable on group1.
# {icon square-o} If no performance degradation, enable on group2.
##### Nice-to-haves
# {icon square-o} Fix AbuseFilterCachingParser bug causing stack overflow. – T148660 (not a blocker, per T148660#5411970)
##### Other perf work on AbuseFilter
# {icon check-square-o} Reduce the frequency at which we store send data to the cache.
** {icon check-square-o} Move AbuseFilter logic from static methods to a new `AbuseFilterRunner` class. – <https://gerrit.wikimedia.org/r/478232>
** {icon check-square-o} Centralise perf data resets. – <https://gerrit.wikimedia.org/r/498725> (and underlying stack of more changes).
# {icon check-square-o} {T53294}
# {icon check-square-o} {T219092}