Page MenuHomePhabricator

`function-orchestrator` Doesn't Validate Returned Objects against Their Declared Type
Open, Needs TriagePublicBUG REPORT

Description

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

  • Create a Python function that returns a degenerate object (e.g., a Z17 that lacks Z17K2)
  • Run that function
  • Witness the bizarre return value

What happens?:
Running the function

def Z1000():
    return ZObject(
        original_Z1K1={ 'Z1K1': 'Z9', 'Z9K1': 'Z17' },
        Z17K1='maybe'  )

returns

{
    "Z1K1": "Z17",
    "Z17K1": "maybe"
}

What should have happened instead?:
Should have got an error indicating that the result was not a valid Z17.

Software version (skip for WMF-hosted wikis like Wikipedia):

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