Nitrokey / nethsm-sdk-py

Client-side Python SDK for NetHSM
Apache License 2.0
2 stars 3 forks source link

Investigate test suite failure in CI #93

Open robin-nitrokey opened 10 months ago

robin-nitrokey commented 10 months ago

Occasionally, the test suite fails in the CI in the test_state_restore test case because /system/restore returns the status code 400. https://github.com/Nitrokey/nethsm-sdk-py/pull/86 adds some helpers for debugging this issue if it occurs again.

Example: https://github.com/Nitrokey/nethsm-sdk-py/actions/runs/6903983089/job/18783758581?pr=84

E           nethsm.client.exceptions.ApiException: (400)
E           Reason: Bad Request
E           HTTP response headers: HTTPHeaderDict({'content-type': 'application/json', 'vary': 'Accept, Accept-Encoding, Accept-Charset, Accept-Language', 'Cache-control': 'no-cache', 'Date': 'Fri, 17 Nov 2023 12:31:52 GMT', 'content-length': '28'})
E           HTTP response body: b'{"message":"Malformed data"}
ansiwen commented 3 months ago

Did we ever observe this on the hardware, or only on containers? Someone remembers? And is it still happening in the CI?

robin-nitrokey commented 3 months ago

I’ve only seen it on containers. I’m not sure if it’s still happening as there haven’t been many CI runs recently. I’ll mention it here if I see it again.