#16 Bodhi refactoring
Closed 9 months ago by amoloney. Opened a year ago by mattia.

New initiative: Bodhi refactoring

What is this initiative about?

There are several long awaited requests on Bodhi:

  • split bodhi-server, bodhi-client, bodhi-messages
  • provide a RESTFUL interface
  • switch both server and client to use OpenID Connect
  • split the monolithic models.py module into smaller, more manageable modules

In order to accomplish those requests and, at the same time, to have a codebase easier to maintain for the team, I would like to propose to refactor the code from using Pyramid to Flask.

Why this initiative?

Bodhi is the only CPE project using Pyramid, as far as I know, and it seems to me that Flask would be easy to maintain and to get community contributions, since the majority of CPE maintained apps are using Flask.

Definition of success

The server app code should be moved away from using Pyramid+SQLAlchemy to use Flask+SQLAlchemy. It should be possible to reuse the current models and most of the backend, but the webapp and the views should be rewritten.
Since the security layer should be also rewritten for Flask, it makes sense to also perform the switch to make (at least) the server using OpenID Connect.
The other goals (RESTFUL interface, split models and bodhi components) can be postponed to a later time, if that is a problem.

Area/community impacted

The initiative only impacts CPE and should be transparent to end users. At the end it should be easier for CPE to maintain Bodhi and end users should find logging in into Bodhi less prone to authentication errors.


Skills needed: Python/Flask/Sqlalchemy
Users: @asaleh is the one currently taking care of Bodhi


No deadline.

Metadata Update from @amoloney:
- Issue tagged with: In Review

a year ago

In my opinion, this initiative, while useful to have done, is probably too expensive for us to take on. We only finished a big rewrite of Bodhi 2 years ago and this, especially with the template rewrites, looks to be simmilar in scope.

Pyramid as is, is less familiar and popular, but it looks to be alive and well maintained open-source project.

The replacement of Pyramid with Flask could definitely help us with cleanup of the api and refactoring it to be more restful. But it still is possible to do the same with Pyramid in place.

The oidc has libraries for both Pyramid and Flask. Aurelian Bompard plans to look into integrating oidc with Bodhi early next year.

With the last two requests, refactoring models, splitting the packages there is little overlap.

There is value in ARC team attempting to look into this. CPE is using Flask almost everywhere else and if we unifying this would be beneficial.

The points to see if this is worth the development cost:

  • Look at the actual scope of work. Do we use any pyramid specific things? Could we reuse templates?
  • Compare with the looming upgrade to Pyramid 2.x

Issue tagged with: Accepted

a year ago

Metadata Update from @amoloney:
- Issue tagged with: In Progress

a year ago

Issue status updated to: Closed (was: Open)

9 months ago

Login to comment on this ticket.

Boards 1
2022 Status: Done