Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

RabbitMQ integration #39

Merged
merged 42 commits into from
Sep 11, 2024
Merged

RabbitMQ integration #39

merged 42 commits into from
Sep 11, 2024

Conversation

javierdelapuente
Copy link
Collaborator

@javierdelapuente javierdelapuente commented Sep 2, 2024

Applicable spec: ISD175 - RabbitMQ support in paas-charm

Overview

Support RabbitMQ in paas-app-charmer.

There are two different charms that provider RabbitMQ, rabbitmq-server and rabbitmq-k8s. A new library has done, based on the one in rabbitmq-k8s, paas_app_charmer.rabbitmq.RabbitMQRequires that provides a common interface to both charms, and provides a RabbitMQParameters model with the rabbitmq information. This is the same as the one in the charm state, as that library is just use in this project.

Documentation will be done outside of this PR.

fetch-lib has been changed everywhere to fecth-libs as charmcraft stable already offers fecth-libs.

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

@javierdelapuente javierdelapuente changed the title WIP mongodb integration MongoDb integration Sep 5, 2024
@javierdelapuente javierdelapuente changed the title MongoDb integration RabbitMQ integration Sep 5, 2024
@javierdelapuente javierdelapuente marked this pull request as ready for review September 5, 2024 15:23
@javierdelapuente javierdelapuente requested a review from a team as a code owner September 5, 2024 15:23
@javierdelapuente
Copy link
Collaborator Author

There are a bunch of messages that certain CVEs can be removed now, should we do that?

Removed the unneeded ones!. Thanks for the comment.

jdkandersson
jdkandersson previously approved these changes Sep 10, 2024
amandahla
amandahla previously approved these changes Sep 11, 2024
Copy link

@amandahla amandahla left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Test coverage for 8fbcc59

Name                                            Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------------------------------
paas_app_charmer/__init__.py                       32     17      0      0    47%   13-14, 19-20, 26-27, 33-37, 43-44, 50-51, 57-58
paas_app_charmer/_gunicorn/__init__.py              0      0      0      0   100%
paas_app_charmer/_gunicorn/charm.py                15      0      0      0   100%
paas_app_charmer/_gunicorn/webserver.py            83      4     16      1    95%   175, 187-193
paas_app_charmer/_gunicorn/workload_config.py       8      0      0      0   100%
paas_app_charmer/_gunicorn/wsgi_app.py             16      0      0      0   100%
paas_app_charmer/app.py                           138      0     56      3    98%   95->exit, 145->151, 306->308
paas_app_charmer/charm.py                         232     25     52      4    89%   33-34, 41-42, 205-206, 208-209, 230->exit, 242-246, 303-305, 359-360, 365, 370, 375, 385, 390, 395, 400, 405, 430
paas_app_charmer/charm_state.py                   108      2     20      2    97%   187, 276
paas_app_charmer/charm_utils.py                    23      0      0      0   100%
paas_app_charmer/database_migration.py             35      0      2      0   100%
paas_app_charmer/databases.py                      25      2     11      1    92%   89-90
paas_app_charmer/django/__init__.py                 2      0      0      0   100%
paas_app_charmer/django/charm.py                   34      4      6      2    85%   44, 81, 96-97
paas_app_charmer/exceptions.py                      5      0      0      0   100%
paas_app_charmer/fastapi/__init__.py                2      0      0      0   100%
paas_app_charmer/fastapi/charm.py                  29      0      0      0   100%
paas_app_charmer/flask/__init__.py                  2      0      0      0   100%
paas_app_charmer/flask/charm.py                    24      0      0      0   100%
paas_app_charmer/go/__init__.py                     2      0      0      0   100%
paas_app_charmer/go/charm.py                       26      0      0      0   100%
paas_app_charmer/observability.py                  24      3      8      1    81%   41->45, 72-76
paas_app_charmer/rabbitmq.py                       78      2     22      5    93%   117->exit, 122->exit, 157->exit, 159-160, 181->175
paas_app_charmer/secret_storage.py                 50      3     16      5    88%   51, 55->54, 56->58, 86, 105
paas_app_charmer/utils.py                          21      4     14      2    71%   30, 32, 52-53
-------------------------------------------------------------------------------------------
TOTAL                                            1014     66    223     26    92%

Static code analysis report

Run started:2024-09-11 14:01:00.536203

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 2200
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@javierdelapuente javierdelapuente merged commit 021ae38 into main Sep 11, 2024
92 checks passed
@javierdelapuente javierdelapuente deleted the rabbitmq-integration branch September 11, 2024 15:04
github-merge-queue bot pushed a commit to canonical/charmcraft that referenced this pull request Sep 18, 2024
RabbitMQ is already in paas-app-charmer (see
canonical/paas-app-charmer#39).

Add RabbitMQ requires to init templates (commented out) so it is easier
for the user to be able to uncomment it if needed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants