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

Refactor openstack interface #340

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

Refactor openstack interface #340

wants to merge 16 commits into from

Conversation

yhaliaw
Copy link
Collaborator

@yhaliaw yhaliaw commented Jul 27, 2024

Applicable spec:

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Lint checks failed for a2aa917

```

/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:1 at module level:
D100: Missing docstring in public module
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:44 in public class OpenstackInstance:
D101: Missing docstring in public class
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:49 in public method __init__:
D107: Missing docstring in init
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:93 in public class OpenstackCloud:
D101: Missing docstring in public class
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:108 in public method launch_instance:
D102: Missing docstring in public method
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:149 in public method delete_instance:
D102: Missing docstring in public method
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:160 in public method get_ssh_connection:
D102: Missing docstring in public method
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:197 in public method get_instances:
D102: Missing docstring in public method
/home/runner/work/github-runner-operator/github-runner-operator/src/openstack_cloud/openstack_cloud.py:275 in public method get_instance_name:
D102: Missing docstring in public method

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Test coverage for a2aa917

Name                                       Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------
src/charm.py                                 566    139    145     26    72%   227-229, 291-310, 328-330, 331->335, 361-365, 438, 445-447, 474-479, 496-501, 522, 534-540, 554-555, 568, 573, 603-604, 606->615, 610->615, 620-626, 660, 664-669, 720-725, 734->737, 760-777, 781-782, 810-837, 850-853, 874-884, 898-900, 947-948, 950-951, 953-954, 1033->1035, 1100-1101, 1139-1141, 1149-1155, 1219-1244, 1253
src/charm_state.py                           458     17    108      5    95%   334-346, 528-532, 654-655, 710-711, 1146->1149, 1153-1154, 1201
src/errors.py                                 41      0      0      0   100%
src/event_timer.py                            54      7      2      1    86%   105-106, 131, 148-149, 165-166
src/firewall.py                               51     18     20      0    61%   42-43, 66-69, 111-185
src/github_client.py                          96     16     40      5    79%   65-72, 119->exit, 124-125, 195, 218, 231-238, 260->300, 294
src/github_type.py                            50      0      0      0   100%
src/logrotate.py                              43      0      2      0   100%
src/lxd_type.py                               35      0      2      0   100%
src/metrics/__init__.py                        0      0      0      0   100%
src/metrics/events.py                         55      2      8      1    95%   56->59, 166-167
src/metrics/github.py                         16      0      0      0   100%
src/metrics/runner.py                        144     10     32      3    91%   160, 186-199, 235, 272, 454-455
src/metrics/runner_logs.py                    24      5      4      1    79%   30-33, 47->46, 51-52
src/metrics/storage.py                        70      8     12      0    90%   89-90, 117-118, 182-183, 189-190
src/metrics/type.py                            5      0      0      0   100%
src/openstack_cloud/__init__.py               26      0      2      0   100%
src/openstack_cloud/openstack_cloud.py       199    199     72      0     0%   4-433
src/openstack_cloud/openstack_manager.py     540    118    162     21    77%   96, 229, 283, 285, 287, 404-407, 453, 456, 497-498, 664-691, 831-832, 854->exit, 864, 891-892, 895-896, 939, 948-949, 979, 984-991, 1004-1010, 1014-1016, 1032-1038, 1057-1058, 1060-1071, 1078-1082, 1086-1089, 1112-1113, 1118-1124, 1142, 1157-1182, 1207-1221, 1237-1244, 1278, 1392-1397, 1418-1420, 1448-1453, 1475-1476, 1484-1494
src/reactive/__init__.py                       0      0      0      0   100%
src/reactive/consumer.py                      40      2      6      0    96%   98-101
src/reactive/runner_manager.py                53      0     14      1    99%   102->exit
src/runner_manager_type.py                    51      0      8      0   100%
src/runner_type.py                            37      0     10      0   100%
src/shared_fs.py                              93     17     10      1    83%   51-52, 119-120, 145-146, 154-155, 161-162, 180, 183-184, 196-197, 240-241
src/utilities.py                              68      7     20      7    82%   86->88, 90->96, 103, 133, 147, 186-189, 244
--------------------------------------------------------------------------------------
TOTAL                                       2815    565    679     72    77%
Coverage failure: total of 77 is less than fail-under=83

Static code analysis report

Run started:2024-08-01 01:51:10.037796

Test results:
  No issues identified.

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

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.

1 participant