Skip to content

Conversation

@Gauravpadam
Copy link

Fixes #2716

This PR shall move the work forward on the epic #2567
For reference, this builds on #2745

@Gauravpadam Gauravpadam requested a review from a team as a code owner April 19, 2025 08:51
@Gauravpadam Gauravpadam changed the title Bodhi api migration Fastapi migration p1 Apr 19, 2025
@softwarefactory-project-zuul
Copy link
Contributor

@Gauravpadam
Copy link
Author

Gauravpadam commented Apr 19, 2025

Hi @lbarcziova, could I please get initial review here?

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for the contribution! As I wrote in #2716 (comment), even after successful implementation, we will not be able to merge this right away, as we paused the work on this epic. So if you would like to contribute, feel free to pick some other issue, ideally comment there beforehand so that we can also provide pointers right away.

As for the contribution itself, it currently changes the API in place from Flask to FastAPI, but as the issue states, we would like to go with gradual change, keeping Flask endpoints up until the whole implementation is done. So it would need to be changed accordingly (taking inspiration from #2745).

Comment on lines +4653 to +4657


class BodhiUpdatesListResponse(BaseModel):
result: List
status: HTTPStatus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this file representes DB models, this model should be rather placed in the appropriate API module with FastAPI implementation.

The structure also doesn't look correct, please refer to the current dictionary that is being returned, you can also try it out e.g. using staging Swagger UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate API endpoints to FastAPI pt.1

2 participants