-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error handling/reporting with subprocess #503
Comments
This should cover the issue raised in DiamondLightSource/i22-bluesky#35 |
We found an issue on i04 last week where we got the
Where |
Now that #584 is merged the error message might be different (better?) now. This removed some pickling but I'm not sure if it removed all pickling. |
Blueapi had not been released for some time due to CI pipeline issues, I have made a new alpha release: https://github.com/DiamondLightSource/blueapi/releases/tag/0.4.5-a3 It may be worth testing with that when you get the chance @DominicOram |
Another instance of this problem: blueapi/src/blueapi/service/runner.py Line 85 in caf7e46
It looks like Should maybe change it to |
This happened again on I04 today, we were accidentally passing in a |
Just chucked some nonsense at a server on main: 1: {
"detail": "\n Input validation failed: detectors: Input should be a valid string,\n suppplied params {'detectors': [None]},\n do not match the expected params: {'additionalProperties': False, 'properties': {'detectors': {'items': {'type': 'bluesky.protocols.Readable'}, 'title': 'Detectors', 'type': 'array', 'uniqueItems': True}, 'num': {'title': 'Num', 'type': 'integer'}, 'delay': {'anyOf': [{'type': 'number'}, {'items': {'type': 'number'}, 'type': 'array'}, {'type': 'null'}], 'title': 'Delay'}, 'metadata': {'anyOf': [{'type': 'object'}, {'type': 'null'}], 'title': 'Metadata'}}, 'required': ['detectors'], 'title': 'count', 'type': 'object'}\n "
} 2: {
"detail": "\n Input validation failed: detectors: Input should be a valid string; num: Input should be a valid integer, unable to parse string as an integer,\n suppplied params {'detectors': [None], 'num': 'foo'},\n do not match the expected params: {'additionalProperties': False, 'properties': {'detectors': {'items': {'type': 'bluesky.protocols.Readable'}, 'title': 'Detectors', 'type': 'array', 'uniqueItems': True}, 'num': {'title': 'Num', 'type': 'integer'}, 'delay': {'anyOf': [{'type': 'number'}, {'items': {'type': 'number'}, 'type': 'array'}, {'type': 'null'}], 'title': 'Delay'}, 'metadata': {'anyOf': [{'type': 'object'}, {'type': 'null'}], 'title': 'Metadata'}}, 'required': ['detectors'], 'title': 'count', 'type': 'object'}\n "
} 3: 'count w/ {"detectors": null}` {
"detail": "\n Input validation failed: detectors: Input should be a valid set,\n suppplied params {'detectors': None},\n do not match the expected params: {'additionalProperties': False, 'properties': {'detectors': {'items': {'type': 'bluesky.protocols.Readable'}, 'title': 'Detectors', 'type': 'array', 'uniqueItems': True}, 'num': {'title': 'Num', 'type': 'integer'}, 'delay': {'anyOf': [{'type': 'number'}, {'items': {'type': 'number'}, 'type': 'array'}, {'type': 'null'}], 'title': 'Delay'}, 'metadata': {'anyOf': [{'type': 'object'}, {'type': 'null'}], 'title': 'Metadata'}}, 'required': ['detectors'], 'title': 'count', 'type': 'object'}\n "
} 4: {
"detail": "\n Input validation failed: num: Input should be a valid integer,\n suppplied params {'detectors': ['x'], 'num': None},\n do not match the expected params: {'additionalProperties': False, 'properties': {'detectors': {'items': {'type': 'bluesky.protocols.Readable'}, 'title': 'Detectors', 'type': 'array', 'uniqueItems': True}, 'num': {'title': 'Num', 'type': 'integer'}, 'delay': {'anyOf': [{'type': 'number'}, {'items': {'type': 'number'}, 'type': 'array'}, {'type': 'null'}], 'title': 'Delay'}, 'metadata': {'anyOf': [{'type': 'object'}, {'type': 'null'}], 'title': 'Metadata'}}, 'required': ['detectors'], 'title': 'count', 'type': 'object'}\n "
} 5: {
"detail": "\n Input validation failed: detectors: Value error, Device non_existent is not of type <class 'bluesky.protocols.Readable'>,\n suppplied params {'detectors': ['non_existent']},\n do not match the expected params: {'additionalProperties': False, 'properties': {'detectors': {'items': {'type': 'bluesky.protocols.Readable'}, 'title': 'Detectors', 'type': 'array', 'uniqueItems': True}, 'num': {'title': 'Num', 'type': 'integer'}, 'delay': {'anyOf': [{'type': 'number'}, {'items': {'type': 'number'}, 'type': 'array'}, {'type': 'null'}], 'title': 'Delay'}, 'metadata': {'anyOf': [{'type': 'object'}, {'type': 'null'}], 'title': 'Metadata'}}, 'required': ['detectors'], 'title': 'count', 'type': 'object'}\n "
} I think 1,2,3,4 are all fine, 5 could maybe be better at noting that the device doesn't exist and isn't just a non-Readable, especially if it could be an |
The worker has been moved to the subprocess but when there is an error it can be hard to see as it is tangled up in the subprocess stack as well.
We should see if this can be improved.
The text was updated successfully, but these errors were encountered: