Page MenuHomePhabricator

Function with composition sometimes returns "no valid Z8K4 error"
Closed, ResolvedPublicBUG REPORT

Description

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

  • I have a Function negate with three implementations, one a composition and the other in native code (see screenshot)
  • the testers all pass

What happens?:

  • When I run the evaluator on the function page, I sometimes get
error value: String Z8K4 did not contain a valid Implementation.

Screen Shot 2021-12-17 at 10.44.48 AM.png (1×1 px, 171 KB)

Screen Shot 2021-12-17 at 10.44.54 AM.png (402×926 px, 58 KB)

Screen Shot 2021-12-17 at 10.42.08 AM.png (1×770 px, 101 KB)

What should have happened instead?:
It should evaluate the function.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

Event Timeline

As suggested in the KIT, here's a bit sniffing:

I sent a request on the Function page Z10000:

wikilambda_function_call_zobject: {"Z1K1":"Z7","Z7K1":"Z10000","Z10000K1":{"Z1K1":"Z40","Z40K1":"Z41"}}

I get randomly (about 1 in 3) the following response:

{"query":{"wikilambda_function_call":{"Orchestrated":{"success":"","data":"{\"Z1K1\":\"Z22\",\"Z22K1\":\"Z23\",\"Z22K2\":{\"Z1K1\":\"Z5\",\"Z5K2\":\"Z8K4 did not contain a valid Implementation.\"}}"}}}}

or this one:

{"query":{"wikilambda_function_call":{"Orchestrated":{"success":"","data":"{\"Z1K1\":\"Z22\",\"Z22K1\":{\"Z1K1\":\"Z40\",\"Z40K1\":\"Z42\"},\"Z22K2\":\"Z23\"}"}}}}

On the composition page, I send the following request:

{"Z1K1":"Z7","Z7K1":{"Z1K1":"Z8","Z8K1":[{"Z1K1":"Z17","Z17K1":"Z40","Z17K2":"Z10000K1","Z17K3":{"Z1K1":"Z12","Z12K1":[{"Z1K1":"Z11","Z11K1":"Z1002","Z11K2":"x"}]}}],"Z8K2":"Z40","Z8K3":["Z10001","Z10002"],"Z8K4":[{"Z1K1":"Z14","Z14K1":"Z10000","Z14K2":{"Z1K1":"Z7","Z7K1":"Z802","Z802K1":{"Z1K1":"Z18","Z18K1":{"Z1K1":"Z6","Z6K1":"Z10000K1"}},"Z802K2":{"Z1K1":"Z40","Z40K1":"Z42"},"Z802K3":{"Z1K1":"Z40","Z40K1":"Z41"}}}],"Z8K5":"Z10000"},"Z10000K1":{"Z1K1":"Z40","Z40K1":"Z41"}}

and get the following answer:

{"query":{"wikilambda_function_call":{"Orchestrated":{"success":"","data":"{\"Z1K1\":\"Z22\",\"Z22K1\":{\"Z1K1\":\"Z40\",\"Z40K1\":\"Z42\"},\"Z22K2\":\"Z23\"}"}}}}

No non-deterministic behavior there.

I only see one implementation in the sample here. When I run this through the backend, I get the success with Z42 instead of an error. Can you send me the implementations, particularly the composition one? I suspect that that's the trouble.

The first screenshot above shows the implementation:

Screen Shot 2021-12-17 at 10.44.48 AM.png (1×1 px, 171 KB)

It is just a call to "if argument then false else true"

Trying it out again, I am actually not sure whether the error appears 1 out of 3 or more 2 out of 3 times. In which case it would indicate the error is not with the composition, but with the native code!

This does not happen on the implementation pages, only on the function page.

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

[mediawiki/services/function-orchestrator@master] Ensure that the selected implementation is run when multiple implementations are provided.

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

Change 753541 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Ensure that the selected implementation is run when multiple implementations are provided.

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