Page MenuHomePhabricator

Create a More General Solution for Metadata Merging
Closed, ResolvedPublic

Description

Description

If a function in the orchestrator receives a Z22 and then returns another Z22, it should not discard the metadata associated with the received Z22. Instead, it should intelligently merge that metadata with any metadata that will be produced in the current function.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • ensure that metadata is always merged instead of being discarded

Completion checklist

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Update function-schemata sub-module to HEAD (86cfa0b)repos/abstract-wiki/wikifunctions/function-evaluator!215jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (86cfa0b)repos/abstract-wiki/wikifunctions/function-orchestrator!171apinesync-function-schematamain
Add ZEnvelopeWrapper with specialized metadata property.repos/abstract-wiki/wikifunctions/function-orchestrator!170apineapine-metadata-2main
Add ZWrapperBase so that setMetadata* functions can handle ZWrappers in addition to bare Z22s.repos/abstract-wiki/wikifunctions/function-schemata!118apineapine-metadata-utilsmain
Customize query in GitLab

Event Timeline

Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

To add to this; a specific example of why this will be helpful can be seen when we are testing out an implementation of a function. E.g. https://www.wikifunctions.org/view/en/Z13453, we click on 'details', we do not see which implementations were run to gather test results; when for this function there is both a JS and Py implementation. As a user, I would want to know which implementation(s) was used

Screenshot 2024-03-19 at 10.25.25 PM.png (470×1 px, 46 KB)
.

ecarg merged https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-schemata/-/merge_requests/118

Add ZWrapperBase so that setMetadata* functions can handle ZWrappers in addition to bare Z22s.

cmassaro changed the task status from Open to In Progress.May 22 2024, 3:10 PM

Change #1037084 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-05-13-145903 to 2024-05-23-164021

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

Change #1037085 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-05-13-145650 to 2024-05-28-185827

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

Change #1037084 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-05-13-145903 to 2024-05-23-164021

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

Change #1037085 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-05-13-145650 to 2024-05-28-185827

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

AIUI what's left here is to actually use this for multi-call functions? As a trivial test case, I think the following should work?

{
    "Z1K1": "Z7",
    "Z7K1": {
        "Z1K1": "Z8",
        "Z8K1": [
            "Z17",
            {
                "Z1K1": "Z17",
                "Z17K1": "Z6",
                "Z17K2": { "Z1K1": "Z6", "Z6K1": "Z400K1" },
                "Z17K3": { "Z1K1": "Z12", "Z12K1": [ "Z11" ] }
            },
            {
                "Z1K1": "Z17",
                "Z17K1": "Z6",
                "Z17K2": { "Z1K1": "Z6", "Z6K1": "Z400K2" },
                "Z17K3": { "Z1K1": "Z12", "Z12K1": ["Z11"] }
            }
        ],
        "Z8K2": "Z1",
        "Z8K3": [ "Z20" ],
        "Z8K4": [
            "Z14",
            {
                "Z1K1": "Z14",
                "Z14K1": "Z400",
                "Z14K3": {
                    "Z1K1": "Z16",
                    "Z16K1": "Z600",
                    "Z16K2": "function Z400(Z400K1,Z400K2){return(parseInt(Z400K1)+parseInt(Z400K2)).toString();}"
                }
            }
        ],
        "Z8K5": "Z400"
    },
    "Z400K1": { "Z1K1": "Z7", "Z7K1": "Z801", "Z801K1": "2" },
    "Z400K2": { "Z1K1": "Z7", "Z7K1": "Z801", "Z801K1": "3" }
}

Change #1037796 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (307671a)

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

Change #1037796 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (307671a)

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