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

Set proxy_env_vars in OpenStackRunnerManager #363

Merged
merged 8 commits into from
Sep 6, 2024
Merged

Conversation

cbartz
Copy link
Collaborator

@cbartz cbartz commented Sep 5, 2024

Applicable spec: n/a

Overview

Set proxy_env_vars in OpenStackRunnerManager

Rationale

to provide outside-world access. Follow-up of #351

Checklist

@cbartz cbartz added bug Something isn't working trivial labels Sep 5, 2024
@cbartz cbartz requested a review from a team as a code owner September 5, 2024 11:02
Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

Do you plan to unit test the change?

@cbartz
Copy link
Collaborator Author

cbartz commented Sep 5, 2024

Do you plan to unit test the change?

I am in general in favour of having unit tests, but this module has been explicitly disabled for coverage (https://github.com/canonical/github-runner-operator/blob/main/pyproject.toml#L15), and this is more of a bug fix for #351, so I am not sure its worth introducing a unit test for this small change.

Copy link
Collaborator

@yhaliaw yhaliaw left a comment

Choose a reason for hiding this comment

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

I think for the e2e test and integration tests that uses the private-endpoint we should disable the aproxy of the private-endpoint self-hosted runners.
This will enable us to test this issue.

@cbartz cbartz marked this pull request as draft September 5, 2024 11:59
Revert "disable aproxy in private endpoint runners"

This reverts commit acfc35a.

Revert "disable aproxy conditionally"

This reverts commit e45878e.

Revert "enable log_cli"

This reverts commit f8207a7.

Revert "temporarily disable env vars to test if integration test fails - REVERT ME"

This reverts commit e0dca27.

Revert "disable aproxy unconditionally"

This reverts commit c47ef6e.
Copy link
Contributor

github-actions bot commented Sep 5, 2024

Test coverage for c6659c6

Name                                   Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------------
src/charm.py                             590    148    151     26    72%   234-236, 302-321, 339-341, 342->346, 372-376, 449, 456-458, 485-490, 507-513, 534, 546-552, 566-567, 580, 585, 615-616, 618->627, 622->627, 632-638, 672, 676-681, 732-737, 746->749, 772-784, 788-789, 817-844, 857-862, 881-891, 905-907, 954-955, 957-958, 960-961, 1040->1042, 1107-1108, 1146-1148, 1156-1162, 1240-1293, 1297
src/charm_state.py                       468     17    106      5    95%   335-347, 572-576, 698-699, 754-755, 1190->1193, 1197-1198, 1245
src/errors.py                             44      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/manager/cloud_runner_manager.py       53      0      6      0   100%
src/manager/github_runner_manager.py      18      0      6      0   100%
src/manager/runner_manager.py            135     34     48      5    70%   173, 185, 189, 205-210, 228-229, 266-282, 296-303, 323-327, 336
src/manager/runner_scaler.py              95     10     32      3    88%   123-124, 135-136, 140, 147, 194-195, 210-211
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%   164, 190-203, 239, 276, 458-459
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/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                                   2414    301    541     59    85%

Static code analysis report

Run started:2024-09-05 16:47:45.512307

Test results:
  No issues identified.

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

@cbartz cbartz marked this pull request as ready for review September 6, 2024 05:34
@cbartz cbartz merged commit d4fdc69 into main Sep 6, 2024
40 checks passed
@cbartz cbartz deleted the fix/set_env_vars branch September 6, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants