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

Catch reconcile errors #399

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

Conversation

cbartz
Copy link
Collaborator

@cbartz cbartz commented Nov 7, 2024

Applicable spec:

Overview & Rationale

PR related to canonical/github-runner-manager#29 . Catch ReconcileError, log stack trace, and set appropriate message in the unit status.

Juju Events Changes

The actions now explicitly fail instead of erroring out.

Module Changes

Changes to charm.py to catch ReconcileError.

Library Changes

n/a

Checklist

  • The charm style guide was applied.
  • The contributing guide was applied.
  • The changes are compliant with ISD054 - Managing Charm Complexity
  • The documentation is generated using src-docs.
  • The documentation for charmhub is updated.
  • The PR is tagged with appropriate label (urgent, trivial, complex).
  • The changelog is updated with changes that affects the users of the charm.
  • The changes do not introduce any regression in code or tests related to LXD runner mode.

@cbartz cbartz changed the title WIP - Catch Openstack API errors in reconcile WIP - Catch reconcile errors Nov 7, 2024
…695' into fix/catch-openstack-errors-ISD-2695
Copy link
Contributor

github-actions bot commented Nov 8, 2024

Test coverage for ce541c3

Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
src/charm.py                   651    153    140     28    73%   247-249, 315-334, 352-354, 355->359, 385-389, 463-465, 474, 481-483, 504-509, 526-531, 552, 564-570, 585-586, 605-606, 615, 620, 650-651, 653->662, 657->662, 667-674, 708, 712-717, 769, 781->784, 807-819, 823-824, 857-858, 870-887, 910-912, 931-941, 956-958, 1021-1022, 1024-1025, 1027-1028, 1107->1109, 1174-1175, 1213-1215, 1223-1231, 1307-1340, 1354-1359, 1374-1417, 1425-1426, 1448
src/charm_state.py             450     17     82      3    95%   274-286, 505-509, 631-632, 687-688, 1123->1126, 1130-1131, 1178
src/errors.py                   25      0      0      0   100%
src/event_timer.py              52      6      0      0    88%   105-106, 143-144, 160-161
src/firewall.py                 51     18     10      0    67%   42-43, 66-69, 111-185
src/github_client.py            23      2      4      0    93%   71-72
src/logrotate.py                43      0      2      0   100%
src/lxd_type.py                 35      0      0      0   100%
src/runner_manager_type.py      39      0      0      0   100%
src/runner_type.py              38      0      0      0   100%
src/shared_fs.py                98     17     10      1    83%   60-61, 132-133, 162-163, 171-172, 178-179, 210, 213-214, 226-227, 270-271
src/utilities.py                32      4      6      2    79%   66-69, 111
------------------------------------------------------------------------
TOTAL                         1537    217    254     34    84%

Static code analysis report

Run started:2024-11-08 14:31:06.438223

Test results:
  No issues identified.

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

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):

@cbartz cbartz changed the title WIP - Catch reconcile errors Catch reconcile errors Nov 8, 2024
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.

1 participant