Page MenuHomePhabricator

Provide a new, public API end-point based on `wikilambda_function_call`
Closed, ResolvedPublic

Description

Description

A public API exists which can be called by users for limited numbers of calls.

Acceptance criteria

  • A new API is provided, wikifunctions_run, and registered appropriately in a new namespace (e.g. namespace MediaWiki\Extension\WikiLambda\PublicAPI;)
  • It should be a fork of the existing wikilambda_function_call but with some simplifications:
  • It should be tested, like ApiFunctionCallTest, using the Beta Cluster test rig
    • A successful test of trivial success (pre-defined, built-in function e.g. Z801/Echo)
    • A successful test of user-defined on-wiki content, e.g. Z10000/Negate
    • A successful test of inline user-defined content
    • A failed test due to lacking user rights to run at all
    • A failed test due to lacking user rights to run an inline-function

Completion checklist

Functionality:

  • The solution meets the expected behavior/acceptance criteria described above
  • All the child tasks are closed
  • The issue has been peer reviewed
  • The issue has been merged

Engineering:

  • There are existing and passing unit/integration tests effectively testing its success and its failure
  • All new classes/methods are covered by unit tests

Documentation

  • All new functions/methods are annotated
  • Related documentation in MediaWiki extension pages or Abstract Wikipedia pages in meta should be updated with the related changes
    • E.g. New API being created should be reflected in WikiLambda API help page

Accessibility:

  • All user facing strings are internationalized

Event Timeline

DVrandecic moved this task from To triage to Backlog on the Abstract Wikipedia team board.

Change #1013437 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] Provide a new, public API end-point based on `wikilambda_function_call`

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

Jdforrester-WMF changed the task status from Open to In Progress.Mar 26 2024, 11:01 AM

Change #1013437 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Provide a new, public API end-point based on `wikilambda_function_call`

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

Change #1015438 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] Eliminate unneeded tests of the wikifunctions_run API

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

Change #1015445 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] Fix the condition for identifying unsaved-code

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

Change #1015467 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] Fix the condition for identifying unsaved-code

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

Change #1015445 abandoned by David Martin:

[mediawiki/extensions/WikiLambda@master] Fix the condition for identifying unsaved-code

Reason:

Superseded by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiLambda/+/1015467

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

Change #1015438 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Eliminate unneeded tests of the wikifunctions_run API

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

Change #1015467 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Fix the condition for identifying unsaved-code

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