Page MenuHomePhabricator

[composition v2] Z803( Z6K1, "some string" ) fails with unhandled TypeError: Cannot read properties of undefined (reading 'Z1K1')
Closed, ResolvedPublicBUG REPORT

Description

Description

Not sure what should Z803( Z6K1, "some string" ) do, most probably fail. However, currently it fails with what seems an uncontrolled TypeError:

✅ As a precedent: Z803( Z9K1, Z1000 ) also fails but throws a controlled Z511/key not found with Z511K1=Z9K1, so maybe the mirror error with Z6K1 case should follow the same pattern.


Example:

{
  "Z1K1": "Z7",
  "Z7K1": "Z803",
  "Z803K1": {
    "Z1K1": "Z39",
    "Z39K1": "Z6K1"
  },
  "Z803K2": "Wikifunctions"
}

in v1 (also not great but slightly better) returns error Z560/invalid evaluation result

{
  "Z1K1": "Z5",
  "Z5K1": "Z560",
  "Z5K2": {
    "Z1K1": {
      "Z1K1": "Z7",
      "Z7K1": "Z885",
      "Z885K1": "Z560"
    },
    "Z560K1": {
      "Z1K1": "Z99",
      "Z99K1": {
        "Z1K1": {
          "Z1K1": "Z9",
          "Z9K1": "Z22"
        },
        "Z22K1": "Wikifunctions"
      }
    }
  }
}

in v2 returns Z507( Z500( Orchestration failed with unidentified error: TypeError: Cannot read properties of undefined (reading 'Z1K1') ) )

{
  "Z1K1": "Z5",
  "Z5K1": "Z507",
  "Z5K2": {
    "Z1K1": {
      "Z1K1": "Z7",
      "Z7K1": "Z885",
      "Z885K1": "Z507"
    },
    "Z507K1": {
      "Z1K1": "Z99",
      "Z99K1": {
        "Z1K1": "Z7",
        "Z7K1": "Z850",
        "Z850K1": {
          "Z1K1": "Z7",
          "Z7K1": "Z803",
          "Z803K1": {
            "Z1K1": "Z39",
            "Z39K1": "Z6K1"
          },
          "Z803K2": "Wikifunctions"
        },
        "Z850K2": "Z511",
        "Z850K3": {
          "Z1K1": "Z7",
          "Z7K1": "Z30805",
          "Z30805K1": "# emit more informative error",
          "Z30805K2": {
            "Z1K1": "Z7",
            "Z7K1": "Z851",
            "Z851K1": "Z511",
            "Z851K2": [
              "Z6",
              {
                "Z1K1": "Z7",
                "Z7K1": "Z23443",
                "Z23443K1": {
                  "Z1K1": "Z39",
                  "Z39K1": "Z1K1"
                }
              },
              {
                "Z1K1": "Z7",
                "Z7K1": "Z27057",
                "Z27057K1": "Z41"
              }
            ]
          }
        }
      }
    },
    "Z507K2": {
      "Z1K1": "Z5",
      "Z5K1": "Z500",
      "Z5K2": {
        "Z1K1": {
          "Z1K1": "Z7",
          "Z7K1": "Z885",
          "Z885K1": "Z500"
        },
        "Z500K1": "Orchestration failed with unidentified error: TypeError: Cannot read properties of undefined (reading 'Z1K1')."
      }
    }
  }
}

Completion checklist

Event Timeline

It would be better for the string value to be returned, since that is the object’s Z6K1 when normalised. If this is objected to, the error should be Key not found, since the particular representation lacks a key with the specified reference. But see my first sentence and T389487.

Jdforrester-WMF changed the task status from Open to In Progress.Mar 30 2026, 12:01 PM

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-25-132654 to 2026-03-30-195027

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

Change #1264828 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-25-132654 to 2026-03-30-195027

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

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-25-132654 to 2026-03-31-162258

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

Change #1266273 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-25-132654 to 2026-03-31-162258

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