-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor user-facing API models #433
Conversation
e7d6125
to
3b5b079
Compare
3b5b079
to
c967bbe
Compare
Could you please rebase? |
c967bbe
to
7d49a5a
Compare
Done |
f688968
to
a2455d6
Compare
8831145
to
de18198
Compare
@JenySadadia The tests are passing, I'll remove the test commit I added to make the Dockerfile use my own branch of kernelci-core for the docker image, to point to the upstream branch, so after that the tests will fail again. That is expected and should be fixed after kernelci/kernelci-core#2249 is merged. |
de18198
to
dd6876c
Compare
OK, so I have merged related |
@JenySadadia This PR doesn't depend on kernelci-core as a package now, I changed it so that it picks it from the github repo during the generation of the docker container. I know that's supposed to be deprecated soon, but that was what Guillaume and Denys suggested. Anyway, if that's a hard requirement, let me know so I can rebase this, undo the latest changes I made and re-test again. Otherwise, this can be merged after it's tested on staging and then changed afterwards. |
Oh, yes, it doesn't depend on the python package anymore. |
@JenySadadia Now tested on staging, I removed the 'staging-skip' tag before this morning staging started and it all seems to be working. |
I don't see these changes on staging https://github.com/kernelci/kernelci-api/tree/staging.kernelci.org. Maybe a merge conflict with some other PR. |
Do you have access to the staging VM? Otherwise, I can verify it. |
Move all the model definitions that aren't exclusively used for internal API operations (ie. all models related to user-facing endpoints) to kernelci-core. Move the UserGroup model to user_models.py Signed-off-by: Ricardo Cañuelo <[email protected]>
api/models.py now contains all the server-side pydantic model definitions. The common server and client-facing models are in the analogous models.py file in kernelci-core. Signed-off-by: Ricardo Cañuelo <[email protected]>
The API code will now reference the models in kernelci-core. Signed-off-by: Ricardo Cañuelo <[email protected]>
dd6876c
to
15f434b
Compare
Signed-off-by: Ricardo Cañuelo <[email protected]>
16be334
to
e0cc117
Compare
Create a new service for running unit tests based on the api service so that it includes the kernelci-core dependency. Signed-off-by: Ricardo Cañuelo <[email protected]>
e0cc117
to
ae7b631
Compare
Now we got it right! |
Pipeline services are not running atm. Taking a look. |
The issue is related to Pub/Sub. This PR seems working well. |
This patch was initially submitted as kernelci/kernelci-api#380 but required moving after merging kernelci/kernelci-api#433. Signed-off-by: Nikolay Yurin <[email protected]>
This patch was initially submitted as kernelci/kernelci-api#380 but required moving after merging kernelci/kernelci-api#433. Signed-off-by: Nikolay Yurin <[email protected]> Signed-off-by: Paweł Wieczorek <[email protected]>
This patch was initially submitted as kernelci/kernelci-api#380 but required moving after merging kernelci/kernelci-api#433. Signed-off-by: Nikolay Yurin <[email protected]> Signed-off-by: Paweł Wieczorek <[email protected]>
Related to kernelci/kernelci-core#2249
Move the definition of models used in user-facing endpoints to kernelci-core so they can be used simultaneously by code in kernelci-api and helpers and other utility functions in kernelci-core.
These changes shouldn't break anything when merged, but pending PRs might need to be rebased.