Page MenuHomePhabricator

Error: Typed property GrowthExperiments\Maintenance\RevalidateLinkRecommendations::$allowedChecksums must not be accessed before initialization
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Error: Typed property GrowthExperiments\Maintenance\RevalidateLinkRecommendations::$allowedChecksums must not be accessed before initialization
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(250)
#0/srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(185)GrowthExperiments\Maintenance\RevalidateLinkRecommendations->getAllowedChecksums()
#1/srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(137)GrowthExperiments\Maintenance\RevalidateLinkRecommendations->validateRecommendation(GrowthExperiments\NewcomerTasks\AddLink\LinkRecommendation)
#2/srv/mediawiki/php-1.44.0-wmf.17/maintenance/includes/MaintenanceRunner.php(695)GrowthExperiments\Maintenance\RevalidateLinkRecommendations->execute()
#3/srv/mediawiki/php-1.44.0-wmf.17/maintenance/run.php(51)MediaWiki\Maintenance\MaintenanceRunner->run()
#4/srv/mediawiki/multiversion/MWScript.php(156)require_once(string)
#5{main}
Impact

The revalidateLinkRecommendations.php script cannot be used

Notes

Execution was as follows:

[urbanecm@deploy2002 ~]$ cat frwiki-checksum.txt 
0c8608674ef53f41d491ae2918bb444df90b8c37ad94675416847b54c753e1c7
[urbanecm@deploy2002 ~]$ mwscript-k8s --file frwiki-checksum.txt -f -- GrowthExperiments:revalidateLinkRecommendations.php --wiki=frwiki --exceptDatasetChecksums=frwiki-checksum.txt --deleteNullRecommendations
⏳ Starting GrowthExperiments:revalidateLinkRecommendations.php on Kubernetes as job mw-script.codfw.fs06mfc3 ...
⏳ Waiting for the container to start...
🚀 Job is running.
📜 Streaming logs:
Revalidating link recommendations:
  fetching task batch starting with page 0
[55cc8dd764be2c0fcd4b880c] [no req]   Error: Typed property GrowthExperiments\Maintenance\RevalidateLinkRecommendations::$allowedChecksums must not be accessed before initialization
Backtrace:
from /srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(250)
#0 /srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(185): GrowthExperiments\Maintenance\RevalidateLinkRecommendations->getAllowedChecksums()
#1 /srv/mediawiki/php-1.44.0-wmf.17/extensions/GrowthExperiments/maintenance/revalidateLinkRecommendations.php(137): GrowthExperiments\Maintenance\RevalidateLinkRecommendations->validateRecommendation(GrowthExperiments\NewcomerTasks\AddLink\LinkRecommendation)
#2 /srv/mediawiki/php-1.44.0-wmf.17/maintenance/includes/MaintenanceRunner.php(695): GrowthExperiments\Maintenance\RevalidateLinkRecommendations->execute()
#3 /srv/mediawiki/php-1.44.0-wmf.17/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#4 /srv/mediawiki/multiversion/MWScript.php(156): require_once(string)
#5 {main}
[urbanecm@deploy2002 ~]$

Event Timeline

Urbanecm_WMF triaged this task as High priority.

Change #1121580 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] revalidateLinkRecommendations: Initialize $allowedChecksums

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

Change #1121580 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] revalidateLinkRecommendations: Initialize $allowedChecksums

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

Change #1121600 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.17] revalidateLinkRecommendations: Initialize $allowedChecksums

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

Change #1121600 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.17] revalidateLinkRecommendations: Initialize $allowedChecksums

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

Mentioned in SAL (#wikimedia-operations) [2025-02-24T08:30:44Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1121600|revalidateLinkRecommendations: Initialize $allowedChecksums (T387001)]]

Mentioned in SAL (#wikimedia-operations) [2025-02-24T08:52:46Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1121600|revalidateLinkRecommendations: Initialize $allowedChecksums (T387001)]] (duration: 22m 02s)

Now works with no problems:

[urbanecm@deploy2002 ~]$ mwscript-k8s --file frwiki-checksum.txt -f -- GrowthExperiments:revalidateLinkRecommendations.php --wiki=frwiki --exceptDatasetChecksums=frwiki-checksum.txt --deleteNullRecommendations --verbose
⏳ Starting GrowthExperiments:revalidateLinkRecommendations.php on Kubernetes as job mw-script.codfw.znnzgj3h ...
⏳ Waiting for the container to start...
🚀 Job is running.
📜 Streaming logs:
Revalidating link recommendations:
  fetching task batch starting with page 0
  Fullerène is outdated, regenerating... success
  Polychlorodibenzo-p-dioxine is outdated, regenerating... success
  Entreprise de services du numérique is outdated, regenerating... success
  Pléiades (astronomie) is outdated, regenerating... number of good links too small (1)
  Préfecture d'Akita is outdated, regenerating... number of good links too small (1)
  Écliptique is outdated, regenerating... success
  Acide chlorhydrique is outdated, regenerating... success
  Déclinaison (grammaire) is outdated, regenerating... success
[...]