google / turbinia

Automation and Scaling of Digital Forensics Tools
Apache License 2.0
749 stars 162 forks source link

Update turbinia-api-client and turbinia-client #1357

Closed jleaniz closed 1 year ago

jleaniz commented 1 year ago

Description of the change

This PR updates turbinia-api-lib and turbinia-client

The Python API library was generated using openapi-generator (latest release v7.0.1). The requirements in this version align with fastapi < 0.99.0 because newer versions produce OpenAPI 3.1 specs which the generator does not yet fully support. For this reason, I am locking fastapi to <0.99.0 temporarily to be consistent with the requirements in turbinia-api-lib for pydantic and urllib3

Once support for OpenAPI 3.1 is fully implemented in the openapi-generator, we can loosen the FastAPI version.

Additionally, we should not be using urrlib3[secure] extra because it'll be deprecated (see https://github.com/urllib3/urllib3/issues/2680) -- so i adjusted the requirement.

Applicable issues

Additional information

Checklist

aarontp commented 1 year ago

New changes, LGTM too

spacether commented 1 year ago

@jleaniz if you want openapi v3.1.0 support, have you considered using openapi-json-schema-generator?

jleaniz commented 1 year ago

@spacether thanks for pointing that out. I wasn't aware of openapi-json-schema-generator, I'll check it out. Is the python generator from openapi-generator no longer going to be supported? Hopefully the APi methods we're calling from the generated client won't change too much.

spacether commented 1 year ago

openapi-generator has a different python generator that was created by William, the main maintainer of that project. It uses pyantic v2.