-
Notifications
You must be signed in to change notification settings - Fork 18
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
docker/api/requirements: fix api
container build failure
#305
Conversation
Fix build failures of `api` container. Error logs can be found at ```https://github.com/kernelci/kernelci-api/issues/303```. Root cause: `fastapi[all] 0.68.1` package installs `pyyaml 5.4.1` package internally. That again depends on `Cython` package. Due to the recent upgrade to `Cython 3.0.0`, `pyyaml 5.4.1` stopped building with `python 3.10`. To fix this, upgrading `fastapi[all]` to `0.99.1` version as that uses `pyyaml 6.0.1`. The selected `fastapi` version is compatible with current `fastapi-pagination` and `fastapi-versioning` packages. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
0a92a84
to
1a096ce
Compare
After changing `fastapi` package version, API returns error while trying to get node by ID when node does not exist matching provided ID in the DB. Add `None` to response model `Union` in `get_node` handler to fix it. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Fixed
|
@JenySadadia Some checks are still failing. Otherwise I think this is good to be merged and necessary so other PRs can pass checks too. |
Due to `fastapi` version change, the newer `TestClient` from `fastapi` is causing issues by using `anyio` and creating a different event loop. This results into failing async pubsub e2e tests with below errors: ``` RuntimeError: Task got Future attached to a different loop ``` Remove sync test client and use async one for all the tests to fix it. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
e2e tests were failing after
The newer Fixed it by removing synchronous |
@JenySadadia See also #306 to avoid the issue altogether without changing the code. If this PR #305 is all fine and has no side-effect issues then we can just merge it I guess. If more work is required then we can have #306 merged first to get back to working image builds and fix this properly later with an upgrade to the latest FastAPI and Pydantic. |
Thanks for the other fix. I think we can merge it as it doesn't require any code changes. |
OK so I'm adding the skip label so it doesn't interfere with the staging runs. I guess we could have a GitHub issue about upgrading to the latest FastAPI with all related dependencies, and then resume progress on this PR. |
Replaced with #321 to do a full upgrade for the initial production rollout. |
Fixes #303
Fix build failures of
api
container. Error logs can be found athttps://github.com/kernelci/kernelci-api/issues/303
.Root cause:
fastapi[all] 0.68.1
package installspyyaml 5.4.1
package internally. That again depends onCPython
package. Due to the recent upgrade toCPython 3.0.0
,pyyaml 5.4.1
stopped building withpython 3.10
. To fix this, upgradingfastapi[all]
to0.99.1
version as that usespyyaml 6.0.1
. The selectedfastapi
version is compatible with currentfastapi-pagination
andfastapi-versioning
packages.