Page MenuHomePhabricator

User-Supplied Native Code Serialization/Deserialization for ZObjects
Closed, ResolvedPublic

Description

Let's say someone implements the integer type as follows:

{
    Z1K1: 'Z10101',
    Z10101K1: {
        Z1K1: 'Z10102',
        Z10102K1: '5'
    },
    Z10101K2: {
        Z1K1: 'Z10103',
        Z10103K1: '-'
    }
}

The type Z10101 is an integer; Z10102 is a positive integer which represents its integer value with a string (Z10102K1); and Z10103 is a sign which likewise represents positive/negative with a string (Z10103K1).

If a contributor passed a Z10101 (let's call it Z1000K1) to a function and wanted to use the value -5 as an integer in Python code, they would currently have to do something like

negative5 = int(Z1000K1.Z10101K2.Z10103K1 + Z1000K1.Z10101K1.Z10102K1)

which is a bit cumbersome and non-portable. It would be nice if contributors could attach implementations corresponding to (de)serialization to a user-defined Type directly. This will result in more readable, less error-prone code, since non-trivial (de)serialization can thus be shared (and tested) among the community.

Details

TitleReferenceAuthorSource BranchDest Branch
Always enable type convertersrepos/abstract-wiki/wikifunctions/function-orchestrator!141jforrestertype-converters-alwaysmain
Support custom (de)serializers in the orchestrator.repos/abstract-wiki/wikifunctions/function-orchestrator!83apineapine-support-derializersmain
Advance Avro schema version to 0.1.0.repos/abstract-wiki/wikifunctions/function-orchestrator!81apineapine-bump-avromain
Update function-schemata sub-module to HEAD (a3499c5)repos/abstract-wiki/wikifunctions/function-orchestrator!80jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (b392301)repos/abstract-wiki/wikifunctions/function-evaluator!98jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (a3499c5)repos/abstract-wiki/wikifunctions/wikilambda-cli!18jforrestersync-function-schematamain
Hide the addition of serializers/deserializers behind a feature flag.repos/abstract-wiki/wikifunctions/function-schemata!51apineapine-feature-flag-derializersmain
Support custom derializers in the evaluator/executors.repos/abstract-wiki/wikifunctions/function-evaluator!68apineapine-deserializersmain
Update function-schemata sub-module to HEAD (b5a37af)repos/abstract-wiki/wikifunctions/wikilambda-cli!16jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (b5a37af)repos/abstract-wiki/wikifunctions/function-orchestrator!72apinesync-function-schematamain
Update function-schemata sub-module to HEAD (b5a37af)repos/abstract-wiki/wikifunctions/function-evaluator!62apinesync-function-schematamain
Avro semver 0.1.0: support serializers and deserializers in the exchange format.repos/abstract-wiki/wikifunctions/function-schemata!46apineapine-deserialize-avromain
Show related patches Customize query in GitLab

Event Timeline

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

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

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

Change 966271 merged by jenkins-bot:

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

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

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

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

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

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

[operations/deployment-charts@master] wikifunctions: Bump evaluators to 2023-11-06-164826

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

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

[operations/deployment-charts@master] wikifunctions: Switch orchestrator to 2023-11-06-172159

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

Change 971998 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Bump evaluators to 2023-11-06-164826

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

Change 971988 merged by jenkins-bot:

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

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

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

[operations/deployment-charts@master] wikifunctions: Switch orchestrator to 2023-11-17-200241

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

Change 971999 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Switch orchestrator to 2023-11-06-172159

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

Change 976848 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Switch orchestrator to 2023-11-17-200241

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

Jdforrester-WMF changed the task status from Open to In Progress.Mar 4 2024, 9:08 PM

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-02-26-150614 to 2024-03-05-140533

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

Change 1008874 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-02-26-150614 to 2024-03-05-140533

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