[go: up one dir, main page]

Page MenuHomePhabricator

Update calls to Maintenance::runChild to instead call Maintenance::createChild
Open, Needs TriagePublic

Description

The Maintenance::runChild method was marked as stable to override until it was renamed to Maintenance::createChild, leaving the old name as a deprecated alias. Because it was marked as stable to override we might need to wait for a release cycle to ensure that anyone who is overriding it can rename their overrides.

This task is to replace usages of Maintenance::runChild with ::createChild once this is appropriate per the stable interface policy and to do the pre-work necessary to reach this point.

Event Timeline

Change #1072783 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CirrusSearch@master] Rename Maintenance::runChild to ::createChild following core rename

https://gerrit.wikimedia.org/r/1072783

Change #1072784 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/core@master] Mark overriding Maintenance::runChild as hard-deprecated

https://gerrit.wikimedia.org/r/1072784

Change #1072783 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Rename Maintenance::runChild to ::createChild following core rename

https://gerrit.wikimedia.org/r/1072783

Added MW-1.43-release, as I would like to have https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1072784 merged before the release (so that the hard-deprecation can be in for that release and it be possible to update callers sooner).

It's only been marked stable to override since 2022 and it seems that it was never actually overridden by anything.

I asked @daniel about it on Slack, and he said:

It seems unused now, so the "shortcut" clause of the Stable Interface Policy applies:

Obsolete behavior MAY be removed right away if it appears to have never been used within the Wikimedia maintained code and the MediaWiki ecosystem (except in the repo that defines it), and seems unlikely to be used elsewhere.

Best send a message to wikitech-l in that case, so anyone who overrides the method in a private extension get a chance to react.

Obsolete behavior MAY be removed right away if it appears to have never been used within the Wikimedia maintained code and the MediaWiki ecosystem (except in the repo that defines it), and seems unlikely to be used elsewhere.

But it was overriden in CirrusSearch ( https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CirrusSearch/+/1072783 ) which is Wikimedia maintained code and is not the repo that defines it?

But it was overriden in CirrusSearch ( https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CirrusSearch/+/1072783 ) which is Wikimedia maintained code and is not the repo that defines it?

Huh, I wonder why I didn't find that when I searched for it last Thursday...

Per the policy, that would indeed mean that we'd have to go through the full process. Of course, we can also ignore the policy - that just means that people can be justifiably mad at us when we break their stuff, and could reasonably expect us to fix it by reverting the change and making a bug fix release. If we are reasonably sure we are not breaking anyone's stuff, we can still go ahead.

On the other hand, keeping a hard-deprecated method around for a release isn't so bad either. We just need to remember to actually remove it later.

In the end, the question is whether fixing a somewhat misleading name on a rarely used method is worth the trouble. I personally don't feel strongly about it either way.

In the end, the question is whether fixing a somewhat misleading name on a rarely used method is worth the trouble. I personally don't feel strongly about it either way.

I wanted to fix it as I got mislead by the name enough that a broken usage of the method was merged and left for a few weeks. It's only when I looked at the method again for a different script did I notice my mistake.

With the better documentation, it should be harder to make that incorrect assumption but I think it makes sense to remove the alias just from the point of view of the misleading name.

With the MW-1.43-release branching cut happening in 8 days, is this task still a blocker to the release?

With the MW-1.43-release branching cut happening in 8 days, is this task still a blocker to the release?

Yes.

All that needs done is to merge https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1072784/ so that the hard-deprecation can be in for 1.43. Otherwise, this ticket would have to be stalled until after the release of 1.44.

Change #1072784 merged by jenkins-bot:

[mediawiki/core@master] Mark overriding Maintenance::runChild as hard-deprecated

https://gerrit.wikimedia.org/r/1072784