[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-09 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. In T362084#9700072 , @Reedy wrote: > In theory, it should be "just" compiling/validating the regex, and then it woudn't surprise me if for say null, it then short circuits and doesn't actually

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-09 Thread JMeybohm
JMeybohm added a comment. In T362084#9700057 , @Lucas_Werkmeister_WMDE wrote: > Can someone clarify what the problem here is? From WBQC’s perspective, it’s totally expected that some of these regex checks will fail (though there’s some

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-09 Thread Reedy
Reedy added a comment. In T362084#9700057 , @Lucas_Werkmeister_WMDE wrote: >> Seemingly you can do "regex validation" in PHP by testing against `null`/`''`, and see if `preg_match` returns `false`. > > That’s an interesting idea… do

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-09 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. Can someone clarify what the problem here is? From WBQC’s perspective, it’s totally expected that some of these regex checks will fail (though there’s some confusion about which shellbox errors we should or shouldn’t try to catch, see T304084

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-09 Thread Lydia_Pintscher
Lydia_Pintscher added a project: Wikidata Dev Team. TASK DETAIL https://phabricator.wikimedia.org/T362084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lydia_Pintscher Cc: Reedy, akosiaris, Clement_Goubert, JMeybohm, Aklapper,

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. The tests fail as we'd expect/hope: 20:14:29 There were 2 errors: 20:14:29 20:14:29 1) WikibaseQuality\ConstraintReport\Tests\Checker\FormatChecker\FormatCheckerTest::testT362084 with data set #0 ('(people|institutions|sources)...-9]\d*',

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. ^ Sticking those two into a test... Lets see what happens TASK DETAIL https://phabricator.wikimedia.org/T362084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Reedy Cc: Reedy, akosiaris, Clement_Goubert, JMeybohm,

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread gerritbot
gerritbot added a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T362084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: gerritbot Cc: Reedy, akosiaris, Clement_Goubert, JMeybohm, Aklapper, Danny_Benjafield_WMDE,

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread gerritbot
gerritbot added a comment. Change #1017926 had a related patch set uploaded (by Reedy; author: Reedy): [mediawiki/extensions/WikibaseQualityConstraints@master] FormatCheckerTest: Add regexes and values that fail for T362084 https://gerrit.wikimedia.org/r/1017926 TASK DETAIL

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. The other is the text on https://www.wikidata.org/wiki/Q6739335, leading to https://www.wikidata.org/wiki/Property:P490, which has a regex on the wikipage as `[0-9A-Za-z\-\/\(\) ]*` which becomes `"/^(?:[0-9A-Za-z\\-/\\(\\) ]*)$/u"`

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. https://www.wikidata.org/wiki/Property:P5504 is `"/^(?:(people|institutions|sources)/[1-9]\\d*)$/u"` but it hasn't been changed recently - https://www.wikidata.org/w/index.php?title=Property:P5504=history TASK DETAIL https://phabricator.wikimedia.org/T362084

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. As there's many parts to this... Seemingly you can do "regex validation" in PHP by testing against `null`/`''`, and see if `preg_match` returns `false`. I wonder if WDQC should be doing that before shelling out to shellbox, and display a nice user error

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a comment. Last edit to any of this code was rEBQCd7564ee12be3: Fix regex checking using preg_match() in August 2021... So depending on how long this has been going on, especially if it's

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a project: Wikidata. TASK DETAIL https://phabricator.wikimedia.org/T362084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Reedy Cc: Reedy, akosiaris, Clement_Goubert, JMeybohm, Aklapper, Danny_Benjafield_WMDE, Kappakayala, S8321414,

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added a project: wmde-wikidata-tech. TASK DETAIL https://phabricator.wikimedia.org/T362084 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Reedy Cc: Reedy, akosiaris, Clement_Goubert, JMeybohm, Aklapper, Kappakayala, Arnoldokoth, wkandek,

[Wikidata-bugs] [Maniphest] T362084: shellbox-constraints returning 500 on preg_match error

2024-04-08 Thread Reedy
Reedy added projects: Wikibase-Quality-Constraints, Wikimedia-production-error. Reedy added a comment. Pretty sure these examples are from #wikibase-quality-constraints : private function