Page MenuHomePhabricator

Z803(Z39("Z4K3"), Z4) gives an "Object did not contain key" error
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • evaluate the following:
{
  "Z1K1": "Z7",
  "Z7K1": "Z803",
  "Z803K1": {
    "Z1K1": "Z39",
    "Z39K1": {
      "Z1K1": "Z6",
      "Z6K1": "Z4K2"
    }
  },
  "Z803K2": {
    "Z1K1": "Z9",
    "Z9K1": "Z40"
  }
}

What happens?:
returns

{
  "Z1K1": "Z22",
  "Z22K1": "Z23",
  "Z22K2": {
    "Z1K1": "Z5",
    "Z5K1": {
      "Z1K1": "Z507",
      "Z507K1": "Object did not contain key \"Z4K2\""
    }
  }
}

What should have happened instead?:
It should return Z104

Note: Z803(Z39("Z8K4"), Z801) works, i.e.

{
  "Z1K1": "Z7",
  "Z7K1": "Z803",
  "Z803K1": {
    "Z1K1": "Z39",
    "Z39K1": {
      "Z1K1": "Z6",
      "Z6K1": "Z8K4"
    }
  },
  "Z803K2": {
    "Z1K1": "Z9",
    "Z9K1": "Z801"
  }
}

results in

{
  "Z1K1": "Z22",
  "Z22K1": [
    {
      "Z1K1": "Z14",
      "Z14K1": "Z801",
      "Z14K4": {
        "Z1K1": "Z6",
        "Z6K1": "Z901"
      }
    }
  ],
  "Z22K2": "Z23"
}

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: Version as of Monday, Mar 6

Details

SubjectRepoBranchLines +/-
mediawiki/services/function-orchestratormaster+42 -0
mediawiki/extensions/WikiLambdaREL1_39+18 -47
mediawiki/extensions/WikiLambdamaster+1 -1
mediawiki/extensions/WikiLambdamaster+18 -47
mediawiki/services/function-orchestratormaster+2 K -129
mediawiki/extensions/WikiLambdamaster+1 -1
mediawiki/services/function-evaluatormaster+1 -1
mediawiki/tools/wikilambda-climaster+1 -1
mediawiki/services/function-orchestratormaster+1 -1
mediawiki/services/function-evaluatormaster+1 -1
mediawiki/services/function-schematamaster+8 -4
mediawiki/extensions/WikiLambdamaster+1 -1
mediawiki/tools/wikilambda-climaster+1 -1
mediawiki/services/function-orchestratormaster+1 -1
mediawiki/services/function-schematamaster+23 -3
Show related patches Customize query in gerrit

Event Timeline

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

[mediawiki/services/function-schemata@master] Export functions which identify built-in types.

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

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

[mediawiki/services/function-orchestrator@master] Ensure that references to built-in types are resolved when they serve as arguments to a function.

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

Change 827539 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Export functions which identify built-in types.

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (9f9c223)

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

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

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

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

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

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

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

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

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (9f9c223)

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

Change 827557 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (9f9c223)

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

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

[mediawiki/services/function-schemata@master] Small fixes to user-defined/generic validator creation: - ensure that reference ID is read from the correct location when creating sub-validators - ensure that builtin validator is only created for built-in types

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

Change 827559 merged by jenkins-bot:

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (9f9c223)

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

Change 827556 merged by jenkins-bot:

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

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

cmassaro renamed this task from Z803(Z39("Z4K3"), Z4) gives a "Object did not contain key" error to Z803(Z39("Z4K3"), Z4) gives an "Object did not contain key" error.Sep 2 2022, 11:55 AM

Change 828570 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Small fixes to user-defined/generic validator creation: - ensure that reference ID is read from the correct location when creating sub-validators - ensure that builtin validator is only created for built-in types

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (a43fa26)

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

Change 827558 merged by jenkins-bot:

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

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

Change 829199 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (a43fa26)

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

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

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

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

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

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

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

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

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (a3de863)

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

Change 829868 merged by jenkins-bot:

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (3bf824c)

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

Change 829867 merged by jenkins-bot:

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

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

Change 829865 abandoned by Jforrester:

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

Reason:

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

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

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

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

Change 827541 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Ensure that references to built-in types are resolved when they serve as arguments to a function.

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

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

[mediawiki/extensions/WikiLambda@master] Update integration tests with fully-resolved built-in functions.

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

Change 834357 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update integration tests with fully-resolved built-in functions.

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

Change 833353 merged by jenkins-bot:

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

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

This doesn't appear fixed yet:

λ→ Z803(Z39("Z4K3"), Z4)
Typed Map(String, Object)
  K1: [
    Typed pair(String, Object)
    Typed pair(String, Object)
      K1: "errors"
      K2: Error
        error type: Error in evaluation
          Z507K1: "Invalid key for function call: Z39K1."
    Typed pair(String, Object)
      K1: "orchestrationMemoryUsage"
      K2: "142.91 MiB"
    Typed pair(String, Object)
      K1: "orchestrationCpuUsage"
      K2: "368.541 ms"
    Typed pair(String, Object)
      K1: "orchestrationStartTime"
      K2: "2022-09-22T20:05:55.545Z"
    Typed pair(String, Object)
      K1: "orchestrationEndTime"
      K2: "2022-09-22T20:05:55.787Z"
    Typed pair(String, Object)
      K1: "orchestrationDuration"
      K2: "242 ms"
    Typed pair(String, Object)
      K1: "orchestrationHostname"
      K2: "692ccb8d47a7"
  ]
cmassaro subscribed.

I think this might be because we're not recursively expanding arguments, which is a separate issue.

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

[mediawiki/extensions/WikiLambda@REL1_39] Update integration tests with fully-resolved built-in functions.

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

Change 853540 merged by Jforrester:

[mediawiki/extensions/WikiLambda@REL1_39] Update integration tests with fully-resolved built-in functions.

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

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

[mediawiki/services/function-orchestrator@master] Add test ensuring that built-in types are resolved when they are a function argument.

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

Change 883148 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Add test ensuring that built-in types are resolved when they are a function argument.

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

Yes! Finally this beast is slain! Thanks everyone.