Page MenuHomePhabricator

Evaluation error on Z28016
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
I get an Error in evaluation () Unspecified error back

What should have happened instead?:
It should return the German text "Timmy ist die Katze von Denny." (You can try it out by going to https://www.wikifunctions.org/view/en/Z28018 directly an try it out)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

My assumption is that the implementation https://www.wikifunctions.org/view/en/Z28032 is somehow wrong. It is the first time I am using the generic arguments for making a function call, so it is very much possible that I did something wrong here.

Event Timeline

Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF subscribed.

The underlying error in the payload is:

"Z500K1": "Call tuples failed in returnOnFirstError. Error: TypeError: Cannot read properties of null (reading 'Z9K1')."

DVrandecic raised the priority of this task from Medium to High.Sep 11 2025, 2:08 PM

Raised priority as it is blocking the fragments work.

Trying the same call locally.

This is the function call:

{
    "Z1K1": "Z7",
    "Z7K1": "Z28016",
    "Z28016K1": {
        "Z1K1": "Z6091",
        "Z6091K1": "Q54479142"
    },
    "Z28016K2": {
        "Z1K1": "Z6091",
        "Z6091K1": "Q146"
    },
    "Z28016K3": {
        "Z1K1": "Z6091",
        "Z6091K1": "Q16275497"
    },
    "Z28016K4": "Z1430"
}

These are the results I'm getting:

  • first attempt, just immediately after starting the container, I get a timeout error/Z574 (with time limit 10000 ms)
  • rest of attempts return a successful response
{
    "Z1K1": "Z22",
    "Z22K1": {
        "Z1K1": "Z11",
        "Z11K1": {
            "Z1K1": "Z60",
            "Z60K1": "de"
        },
        "Z11K2": "Timmy ist die Katze von Denny."
    },
    "Z22K2": {
        "Z1K1": {
            "Z1K1": "Z7",
            "Z7K1": "Z883",
            "Z883K1": "Z6",
            "Z883K2": "Z1"
        },
        "K1": [
            {
                "Z1K1": "Z7",
                "Z7K1": "Z882",
                "Z882K1": "Z6",
                "Z882K2": "Z1"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "implementationId",
                "K2": {
                    "Z1K1": "Z6",
                    "Z6K1": "Z28032"
                }
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "implementationType",
                "K2": "Z14K2"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationMemoryUsage",
                "K2": "358.59 MiB"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationCpuUsage",
                "K2": "2687.458 ms"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationStartTime",
                "K2": "2025-09-11T18:21:15.639Z"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationEndTime",
                "K2": "2025-09-11T18:21:24.378Z"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationDuration",
                "K2": "8739 ms"
            },
            {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z882",
                    "Z882K1": "Z6",
                    "Z882K2": "Z1"
                },
                "K1": "orchestrationHostname",
                "K2": "b7796c0503fc"
            }
        ]
    }
}

Other runs show similar metrics:

orchestrationDuration

  • 8739 ms
  • 8080 ms
  • 8681 ms

orchestrationMemoryUsage

  • 358.59 MiB
  • 364.69 MiB
  • 359.63 MiB

orchestrationCpuUsage

  • 2687.458 ms
  • 2442.093 ms
  • 2464.202 ms

The function call in production is:

{
            "Z1K1": "Z7",
            "Z7K1": {
                "Z1K1": "Z7",
                "Z7K1": "Z14310",
                "Z14310K1": "Z28020",
                "Z14310K2": {
                    "Z1K1": "Z18",
                    "Z18K1": "Z28016K4"
                }
            },
            "K1": {
                "Z1K1": "Z18",
                "Z18K1": "Z28016K1"
            },
            "K2": {
                "Z1K1": "Z18",
                "Z18K1": "Z28016K2"
            },
            "K3": {
                "Z1K1": "Z18",
                "Z18K1": "Z28016K3"
            },
            "K4": {
                "Z1K1": "Z18",
                "Z18K1": "Z28016K4"
            }
        }

Without the nested function-call, I don’t think the UI gives access to the local arguments.

This also applies to Z21217, an attempted implementation for (#) 3-arg apply (Z21216) (the “(#)” indicating the belief that no implementation is currently viable). Here, though, the outermost Function call has an Argument reference (to the Function to apply) at Z7K1. Even without arguments, I don’t think this currently works (no examples found).

Objects having a function call with this structure are surfaced by Special:Search/: "Z1K1 Z7 Z7K1 Z1K1" (linked at Wikifunctions:Request for cleanup#Wrongly configured function calls (“Quick check”).

Note that this is about implementation https://www.wikifunctions.org/view/en/Z28032 which is currently not connected.

I think here's another example of that not working:

https://www.wikifunctions.org/view/en/Z28807

This implementation I think should work, but doesn't (unless I am using it wrong).

This implementation works, but it is not using the new method to add arguments to a function call, but the apply function: https://www.wikifunctions.org/view/en/Z28809

It seems that the ability to add arguments to a function call isn't yet working in production correctly (or I am using it wrong).

@DVrandecic your composition looks fine to me!

I could successfully run it locally, so I made an edit to the test to update the revision ID and see if it was just an old failure lingering in the test results cache, and it appears this way.
Your implementation is working as expected.

Here's a relevant function call in the Api Sandbox

@DVrandecic Regarding the other implementation mentioned: https://www.wikifunctions.org/wiki/Z28032
This seems to be working well in production as well (see in the sandbox).

However, this is returning "Nairobi is the capital of Kenya" while expecting "Nairobi is the capital city of Kenya". However, I'm unable to reproduce this locally, newly called this function is returning "capital city" to me, so the tests run (see screenshot of my local env). Maybe also caching residue?

Screenshot from 2025-10-16 14-31-01.png (927×1 px, 156 KB)

@DVrandecic your composition looks fine to me!

I could successfully run it locally, so I made an edit to the test to update the revision ID and see if it was just an old failure lingering in the test results cache, and it appears this way.
Your implementation is working as expected.

Here's a relevant function call in the Api Sandbox

As noted above, T404144#11199042, the function call’s Z7K1 is a function call object rather than a reference. Happy for this not to be a problem 😎

As of today, I get Timmy ist die Katze von Denny., so marking this as Resolved.