canonical / github-runner-operator

github-runner-operator - charm repository.
Apache License 2.0
9 stars 20 forks source link

Fix/openstack connection creation #378

Open yhaliaw opened 2 weeks ago

yhaliaw commented 2 weeks ago

Applicable spec:

Overview

The github-runner-manager is updated to remove the usage of clouds.yaml. This PR adapt to the changes.

Rationale

This prevents the multi-processing fighting over the file handle for the clouds.yaml file in the github-runner-manager.

Checklist

github-actions[bot] commented 6 days ago

Lint checks failed for 8dde4fe398a0ec5cd0784995dd2dce221a6c2e69

```

--- /home/runner/work/github-runner-operator/github-runner-operator/tests/integration/test_runner_manager_openstack.py 2024-09-30 12:56:43.295353+00:00 +++ /home/runner/work/github-runner-operator/github-runner-operator/tests/integration/test_runner_manager_openstack.py 2024-09-30 12:57:19.078165+00:00 @@ -116,13 +116,13 @@ clouds_config = yaml.safe_load(private_endpoint_clouds_yaml)

 try:
     # Pick the first cloud in the clouds.yaml
     cloud = tuple(clouds_config["clouds"].values())[0]
github-actions[bot] commented 6 days ago

Test coverage for 8dde4fe398a0ec5cd0784995dd2dce221a6c2e69

Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
src/charm.py                   614    161    153     26    71%   242-244, 310-329, 347-349, 350->354, 380-384, 463, 470-472, 493-498, 515-521, 542, 554-560, 575-576, 595-596, 605, 610, 640-641, 643->652, 647->652, 657-663, 697, 701-706, 757-762, 771->774, 797-809, 813-814, 842-869, 882-887, 906-916, 931-933, 980-981, 983-984, 986-987, 1066->1068, 1133-1134, 1172-1174, 1182-1188, 1266-1298, 1312-1317, 1332-1376, 1380
src/charm_state.py             449     17     98      5    95%   274-286, 503-507, 629-630, 685-686, 1121->1124, 1128-1129, 1176
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     20      0    61%   42-43, 66-69, 111-185
src/github_client.py            23      2      6      1    90%   66->exit, 71-72
src/logrotate.py                43      0      2      0   100%
src/lxd_type.py                 35      0      2      0   100%
src/runner_manager_type.py      39      0      6      0   100%
src/runner_type.py              38      0     10      0   100%
src/shared_fs.py                93     17     10      1    83%   52-53, 120-121, 146-147, 155-156, 162-163, 181, 184-185, 197-198, 241-242
src/utilities.py                32      4      6      2    79%   66-69, 111
------------------------------------------------------------------------
TOTAL                         1494    225    313     35    83%

Static code analysis report

Run started:2024-09-30 12:57:52.112836

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 4973
    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):