Commit graph

8 commits

Author SHA1 Message Date
gerritbot 756926c479 Update moved class WikiMap
See T321882. Moved in I60cf4b9ef02b9d5

Bug: T321681
Change-Id: I4bd035a77ac80e9b408e63b35f3116e1901df7cb
2023-04-25 09:54:46 +00:00
Reedy 033c69cfab ScribuntoException: Use value property not dynamic property
Bug: T330524
Change-Id: I69a102497fffb939c849d2836302068ac9eff3d0
2023-02-25 00:57:56 +00:00
Thiemo Kreuz 912324993f Apply some minor PHP code modernizations
* Make use of the ?? syntax.
* Use an upstream function.
* Fix an incomplete type hint.

Change-Id: I7b1916418f4b1e65cc8396cfd646224f55c137a4
2022-09-29 21:45:09 -04:00
Kunal Mehta 4ccebcdf4b Simplify creating JSON pages in the Module namespace
Pages ending with a ".json" suffix in the Module namespace will use the
built-in JSON content model by default. Previously editors had to use
Special:ChangeContentModel to get a JSON page, which requires the
"editcontentmodel" userright that is not granted to a wide set of users
by default.

Bug: T144475
Change-Id: I1546fcad823a55a8c5a93177df8715844de1e87c
2022-09-22 19:48:52 -07:00
Alexander Vorwerk 738ca8d72d Bump scribunto-stats cache version
The addition of PSquare::__serialize() in wikimedia/running-stat is
having the same cache implication as the issue this was meant to fix.

The legacy PHP serialized form is not compatible with the stable
serialize form that we're switching to.

Bug: T313341
Change-Id: Iec4c1c958e10560abcbd4184a0ca4e1a0c19183a
2022-08-16 19:09:36 +00:00
Timo Tijhof e9988b8473 Hooks: Minor clean up, remove redundant PSquare check
PSquare is part of wikimedia/running-stat which is bundled with
MediaWiki core. There is no valid way to install a wiki without
the vendor libraries present.

The check was introduced in 2015 with I0d39920733fe7 when the class
was newly added to the package and deployment was happening
concurrently to the extension change.

Bug: T313341
Change-Id: I6717151c39b589f2e5b5e87da6896f62252cb5d8
2022-07-19 14:58:17 -05:00
Timo Tijhof e5362f639e Hooks: Bump scribunto-stats cache version
The Wikimedia\PSquare class has changed such that its serialization
is incompatible with its prior version. We should probably refactor
this to use an actually supported serialization format, possibly
by enhancing PSquare with some kind of getter method that provides
a plain array that its constructor can accept again instead of relying
on internal PHP serialisation format, but for now we can bump the
cache version.

The side-effect of this will be that the performance stats captured
by Scribunto for visualiation in Grafana, will briefly split its
sampling logic between two versions instead of being global across
all wikis until the train is fully deployed. This does not have any
effect on its business logic or runtime behaviour, and is presumably
by design as that's the only way to bump the cache version, which was
a pre-existing factor in its cache key.

Basically, this means that during the deployment days on weeks where
this is bumped, we will briefly capture fewer samples as there are then
two separate counters trying to reach 1000 before flushing a median
to Graphite. We can remedy that by backporting and deploying to both.

While at it, I'm changing the cache key to conform to our conventions
and make it an explicit, greppable, lowercase and descriptive name
(scribuntu-stats) instead of the implicit __METHOD__ which expanded
to "Scribunto\Hooks::reportTiming". I note that this means the split
brain sampling actually happened at least once before during the week
where the namespace was introduced as that will have implicily changed
the cache-key. Another reason not to use __METHOD__ in a cache key.

Bug: T313341
Change-Id: Ic9dad0f55cba18ec03272b87366a091a396beb74
2022-07-19 14:53:53 -05:00
Reedy 8e73003fee Start namespacing extension
Change-Id: Ib632434861c2df03dfcddbd195f556c937812196
2022-05-12 01:33:11 +00:00
Renamed from includes/common/Hooks.php (Browse further)