Skip to content
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

Handle the ingress-relation-broken event #139

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mthaddon
Copy link
Contributor

Applicable spec: N/A

Overview

Correctly handle the ingress-relation-broken event (for instance in case of destroying a model).

Rationale

Currently if you have an ingress relation and try to destroy the model we're trying to run get_all_hostnames but it's failing with an InvalidIngressError.

Juju Events Changes

N/A

Module Changes

N/A

Library Changes

N/A

Checklist

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Test coverage for 54f63f5

Name                               Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------
src/charm.py                         273     14     80      5    95%   198, 205, 283-285, 322, 360, 411, 549-559, 564-565
src/consts.py                          4      0      0      0   100%
src/controller/__init__.py             0      0      0      0   100%
src/controller/endpoint_slice.py      55      4     10      4    88%   103, 127, 149, 169
src/controller/endpoints.py           33      1      6      0    92%   53
src/controller/ingress.py            103      8     44      4    89%   60, 80-81, 185, 262->273, 266-268, 271-272
src/controller/resource.py            53      1      9      1    97%   64
src/controller/secret.py              58      8     19      4    79%   53, 71-76, 106->111, 108-110, 111->104, 133, 162
src/controller/service.py             37      1      6      0    93%   51
src/exceptions.py                      3      0      0      0   100%
src/ingress_definition.py            271     26     70      8    89%   41, 70, 174-178, 196, 315-316, 361, 373, 377, 393-394, 409-410, 435, 437, 462-463, 496-497, 504-506, 508
src/tls_relation.py                  130      6     31      1    94%   137, 150-156
------------------------------------------------------------------------------
TOTAL                               1020     69    275     27    91%
Coverage failure: total of 91 is less than fail-under=92

Static code analysis report

Run started:2024-08-06 14:32:31.405372

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 4910
  Total lines skipped (#nosec): 11
  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):

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

Successfully merging this pull request may close these issues.

2 participants