Page MenuHomePhabricator

Variables in Parsoid content show older values compared to legacy
Open, Needs TriagePublic

Description

https://incubator.wikimedia.org/wiki/Wq%2Fha%2FBabban_shafi?useparsoid=0
vs
https://incubator.wikimedia.org/wiki/Wq%2Fha%2FBabban_shafi?useparsoid=1

Both {{LOCALDAYNAME}} / {{LOCALDAY}} and {{NUMBEROFARTICLES}} are showing older values. Is that expected based on when the page was parsed and cached, or is some TTL or other cache busting mechanism not happening?

Event Timeline

Looking at the NewPP limit reports

Legacy

<!-- 
...
Cached time: 20250320193341
Cache expiry: 3600
Reduced expiry: true
Complications: []
...
-->
<!-- Saved in parser cache with key incubatorwiki:pcache:3346333:|#|:idhash:canonical and timestamp 20250320193341 and revision id 5744951. Rendering was triggered because: page-view
 -->

Parsoid

<!-- 
...
Cached time: 20250318084347
Cache expiry: 2592000
Reduced expiry: false
Complications: []
...
-->
<!-- Saved in parser cache with key incubatorwiki:parsoid-pcache:3346333:|#|:idhash:useParsoid=1 and timestamp 20250318084347 and revision id 5744951. Rendering was triggered because: view
 -->

Change #1130343 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere (take 2)

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

Change #1130343 merged by jenkins-bot:

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere (take 2)

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

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:33:27Z] <tgr@deploy1003> Started scap sync-world: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:37:04Z] <tgr@deploy1003> tgr, cscott: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:54:09Z] <tgr@deploy1003> Finished scap sync-world: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]] (duration: 20m 42s)

It was reported that https://wikitech.wikimedia.org/wiki/Incident_status has the same issue. That was due to special page transclusion, which should execute this code from the core parser:

							if ( $specialPage && $specialPage->maxIncludeCacheTime() !== false ) {
								$this->mOutput->updateRuntimeAdaptiveExpiry(
									$specialPage->maxIncludeCacheTime()
								);
							}

which limits cache time to 1hr (by default, with miser mode on). The related patch Propagate ParserOutput runtime adaptive cache expiry to Parsoid hasn't been deployed yet, but ParserCache::uipdateRuntimeAdaptiveExpiry reads as follows:

	public function updateRuntimeAdaptiveExpiry( $ttl ): void {
		$this->mMaxAdaptiveExpiry = min( $ttl, $this->mMaxAdaptiveExpiry );
		$this->updateCacheExpiry( $ttl );
	}

so even if the mMaxAdaptiveExpiry bit wasn't being propagated, the cache expiry should have been.