Skip to content

Add workflow for building runner image#149

Merged
yhaliaw merged 73 commits intomainfrom
feat/build-image
Dec 11, 2023
Merged

Add workflow for building runner image#149
yhaliaw merged 73 commits intomainfrom
feat/build-image

Conversation

@yhaliaw
Copy link
Copy Markdown
Collaborator

@yhaliaw yhaliaw commented Nov 16, 2023

Overview

The runner image is built within the charm on a schedule.

Rationale

Building the runner images allow for pre-loading packages, and modifying configurations.

This PR will enable SCTP support which should be included in the e2e test.

Checklist

WIP

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 104 files.

Valid Invalid Ignored Fixed
48 1 55 0
Click to see the invalid file list
  • scripts/build-image.sh

Comment thread scripts/build-image.sh
Copy link
Copy Markdown
Collaborator

@cbartz cbartz left a comment

Choose a reason for hiding this comment

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

Could you please update the PR description, as it seems in this PR no workflow is used to build the images on a daily basis and push them to github, but the images are built in the charm itself periodically.

Comment thread src/lxd.py
Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>
jdkandersson
jdkandersson previously approved these changes Dec 7, 2023
jdkandersson
jdkandersson previously approved these changes Dec 8, 2023
jdkandersson
jdkandersson previously approved these changes Dec 8, 2023
jdkandersson
jdkandersson previously approved these changes Dec 8, 2023
@jdkandersson
Copy link
Copy Markdown
Contributor

Do we need any updates to the documentation here please? Perhaps to the architecture to explain that the image is built now and re-used?

cbartz
cbartz previously approved these changes Dec 8, 2023
Copy link
Copy Markdown
Collaborator

@cbartz cbartz left a comment

Choose a reason for hiding this comment

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

LGTM

@yhaliaw yhaliaw dismissed stale reviews from cbartz and jdkandersson via 52b5d7a December 8, 2023 06:41
@yhaliaw
Copy link
Copy Markdown
Collaborator Author

yhaliaw commented Dec 8, 2023

Do we need any updates to the documentation here please? Perhaps to the architecture to explain that the image is built now and re-used?

Updated the docs

cbartz
cbartz previously approved these changes Dec 8, 2023
jdkandersson
jdkandersson previously approved these changes Dec 8, 2023
@yhaliaw yhaliaw dismissed stale reviews from jdkandersson and cbartz via ae68a59 December 8, 2023 09:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 8, 2023

Test coverage for ae68a59

Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
src/charm.py                   432     98    107     25    75%   79-80, 86-88, 112-113, 117-119, 155-157, 168->180, 178, 221-229, 241-245, 276, 358-363, 384, 401-402, 411-434, 452-454, 462-465, 472, 475-476, 492, 496-501, 546->549, 562-563, 565-566, 600-607, 631-632, 644-646, 661-662, 687-688, 690-691, 693-694, 768->770, 831-832, 848, 866-868, 872
src/charm_state.py              75      6     10      0    91%   90-97
src/errors.py                   34      0      0      0   100%
src/event_timer.py              42      8      4      0    74%   94-97, 117-120
src/firewall.py                 43     25     10      0    38%   38-42, 64-67, 75-149
src/github_client.py            50      6     24      2    84%   116, 138, 150-157
src/github_type.py              36      0      0      0   100%
src/lxd_type.py                 37      0      2      0   100%
src/metrics.py                  67      2     10      1    96%   60->63, 150-151
src/runner.py                  315     64     92     23    74%   44->46, 129, 256-257, 298-307, 331-336, 341, 361, 365-375, 424->427, 430-432, 439, 453, 463, 467, 469, 484, 510-515, 531-544, 555-587, 592, 630, 676-678, 682, 700, 735, 761, 766-778, 792, 797->799
src/runner_manager.py          245     33     82      7    85%   117, 162-164, 177-178, 190-192, 198-203, 207-208, 218-219, 238, 367, 386-390, 415, 498, 606-609, 613-620
src/runner_manager_type.py      30      0      6      0   100%
src/runner_metrics.py          112      5     22      2    95%   133-134, 146, 215-216
src/runner_type.py              45      0     10      0   100%
src/shared_fs.py                80     10     12      0    89%   73-74, 160-161, 166-167, 173-174, 196-197
src/utilities.py                68      6     20      8    84%   74->76, 78->84, 89-91, 121, 135, 173, 226
------------------------------------------------------------------------
TOTAL                         1711    263    411     68    82%

Static code analysis report

Run started:2023-12-08 09:58:38.236017

Test results:
  No issues identified.

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

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

@yhaliaw yhaliaw merged commit 4fd3fa9 into main Dec 11, 2023
@yhaliaw yhaliaw deleted the feat/build-image branch December 11, 2023 03:17
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.

3 participants