Page MenuHomePhabricator

Migrate function-orchestrator to use benjamin instead of simple arrays
Closed, ResolvedPublic

Description

Completion checklist:

  • Migrate all tests in function-orchestrator
  • Deprecate function-schemata/utils.js:convertZListToArray method (or modify it to convert these lists to benjamin arrays instead
    • Edit: These method was being used with the assumption that it returned both: 1) the canonical expression of a list, and 2) an iterable where every element is a list item. With the change to benjamin arrays, the canonical form is no longer an iterable of items of the same type, but the first element corresponds to the description of the list. For this reason, this method has been converted into two, which are being used for different things:
      • convertZListToItemsArray: for returning an iterable list with only the items of the typed list.
      • convertZListToBenjaminArray: for canonicalization process.
    • This method had a benjamin=true flag before that divided the logic and could have both outcomes. However, I (gengh) have transformed it into two methods just to add readability, clarity and an extra security measure, and make sure that the developer intentionally chooses the used method depending on what they want it for.
  • Remove benjamin feature flags from normalize and canonicalize in function-schemata

Event Timeline

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

[mediawiki/services/function-schemata@master] Change benjamin feature flags to operate with benjamins by default

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

Change 793109 had a related patch set uploaded (by Genoveva Galarza; author: Cory Massaro):

[mediawiki/services/function-orchestrator@master] Update tests to use Benjamin arrays.

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

Change 793109 abandoned by Genoveva Galarza:

[mediawiki/services/function-orchestrator@master] Update tests to use Benjamin arrays.

Reason:

Very old and incorrect, abandoning this in favor of 805466

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

Change 805466 had a related patch set uploaded (by Genoveva Galarza; author: Cory Massaro):

[mediawiki/services/function-orchestrator@master] Update tests to use Benjamin arrays

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

Change 805450 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Change to operate with benjamins by default

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

Change 805466 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/services/function-orchestrator@master] Update tests to use Benjamin arrays

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

Change 805466 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update tests to use Benjamin arrays

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

Change 805215 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Remove ZList/Z10 builtin and update function-schemata

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

Change 805215 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Remove ZList/Z10 builtin and update function-schemata

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

Deprecate function-schemata/utils.js:convertZListToArray method (or modify it to convert these lists to benjamin arrays instead

We cannot do that; that function is used extensively in order to iterate over lists (it's been renamed to convertZListToItemArray).

Change 807647 had a related patch set uploaded (by Cory Massaro; author: Cory Massaro):

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (46def33)

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

gengh claimed this task.
gengh triaged this task as High priority.
gengh updated the task description. (Show Details)

Change 807647 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (46def33)

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