Page MenuHomePhabricator

Decouple date from Abstract Wiki Fragment requests
Closed, ResolvedPublic

Description

Description

An abstract fragment was originally requested for a given date, as the date was important part of the key.

As part of the durable fragments work, the date will be removed from the key and the recency (freshness/staleness) will be fuzzily determined looking at the stashed value, which will contain the stash date.

For cleanness and interface clarity, we should decouple the date from the request. Currently date is set as TODAY at the start of the request and propagated through the whole chain, so this change can happen without affecting the current Memcached-based behavior:

Two request chains to take into account:

  • Abstract Wikipedia UI:
    • AbstractPreviewSection.vue component generates the date parameter as TODAY, which travels through...
    • abstractWiki.js store module renderFragmentPreview and requestFragmentPreview
    • apiUtils.js which calls the API on runAbstractWikiFragment
    • ApiAbstractWikiRunFragment.php ActionAPI which receives the date as parameter
    • AbstractWikiRequest::fetchRenderedAWFragment
    • and finally AWFragmentStore setter
  • Refresh job:
    • callers:
      • maintenance/updateAbstractWikiArticleStore.php, generates today's date with $now = new ConvertibleTimestamp();
      • ApiAbstractWikiRunFragment.php ActionAPI which receives the date as parameter (as detailed above)
      • Api/AbstractWikiFetchSection.php ActionAPI which also receives the date as parameter, also generated in AbstractPreviewSection.vue (as detailed above)
    • AWFragmentStore getter
    • CacheAbstractContentFragmentJob.php
    • AbstractWikiRequest::fetchRenderedAWFragment
    • and finally AWFragmentStore setter

Desired behavior/Acceptance criteria

  • date is an internal parameter representing today, it might be passed to the AbstractWikiRequest service if needed, but it won't be externally exposed.

Completion checklist

Event Timeline

Change #1324255 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Decouple date from request chain

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

Change #1324255 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Decouple date from request chain

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

Jdforrester-WMF changed the task status from Open to In Progress.Aug 11 2026, 1:24 PM
Jdforrester-WMF triaged this task as High priority.

Change #1324357 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Pass datetime instead of date through fragment generation call chain

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

Change #1324357 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Pass datetime instead of date through fragment generation call chain

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