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

Install unzip and gh command functionality. #221

Closed
wants to merge 2 commits into from
Closed

Conversation

codethulu
Copy link
Contributor

@codethulu codethulu commented Feb 7, 2024

Applicable spec: N/A

Overview

Include gh and unzip functionality from the Ubuntu Archives. Included some simple checks in the e2e test file, to ensure the packages have been installed correctly.

Rationale

This functionality was not currently present, and has been requested as an addition.

Juju Events Changes

Juju events should not be affected by this change.

Module Changes

No changes to any module functionality.

Library Changes

Charm libraries are unchanged.

Checklist

This PR does not warrant any new charm documentation due to the nature of this change.

@codethulu codethulu requested a review from a team as a code owner February 7, 2024 19:28
@codethulu codethulu marked this pull request as draft February 7, 2024 22:27
…flag instead of --version, which returns error code 10
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Test coverage for 4305d58

Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
src/charm.py                   468    104    121     24    76%   87-88, 95-96, 120-121, 125-127, 167-169, 178->190, 188, 224-243, 257-259, 260->264, 288-292, 323, 403-408, 431, 448-449, 463-464, 477-500, 524-527, 534, 542, 558, 562-567, 612->615, 628-629, 631-632, 666-673, 697-698, 731-732, 760-761, 763-764, 766-767, 841->843, 904-905, 921, 942-944, 948-951, 955
src/charm_state.py             138     18     22      3    86%   131-138, 221-224, 266-268, 279-280, 286-291, 302-304
src/errors.py                   41      0      0      0   100%
src/event_timer.py              63      9      6      1    86%   94-95, 103-104, 126, 143-144, 160-161
src/firewall.py                 52     18     20      0    61%   42-43, 66-69, 110-184
src/github_client.py            89     14     38      4    80%   38-45, 146, 169, 182-189, 207->242, 236
src/github_metrics.py           14      0      0      0   100%
src/github_type.py              50      0      0      0   100%
src/lxd_type.py                 37      0      2      0   100%
src/metrics.py                  73      2     10      1    96%   61->64, 170-171
src/metrics_type.py              6      0      0      0   100%
src/runner.py                  329     72     98     25    73%   46->48, 130, 183->197, 237-238, 264-265, 306-315, 339-344, 349, 369, 373-383, 432->435, 438-440, 447, 461, 471, 475, 477, 492, 526-531, 547-560, 571-610, 615, 653, 706-708, 712, 730, 765, 791, 796-808, 822, 827->829, 832-834
src/runner_logs.py              35      2      6      1    93%   62->61, 66-67
src/runner_manager.py          308     76    108      9    73%   123, 168-170, 183-184, 196-198, 204-209, 213-214, 224-225, 244, 287-288, 332-334, 399, 419-423, 448, 500-503, 535-553, 566-571, 592-597, 609-616, 711-724, 734, 739-750
src/runner_manager_type.py      40      0      6      0   100%
src/runner_metrics.py          123      8     20      2    93%   147-148, 160, 191-192, 307-311
src/runner_type.py              47      0     10      0   100%
src/shared_fs.py               116     16     20      0    88%   108-109, 133-134, 217-218, 241-242, 254-255, 260-261, 267-268, 292-293
src/utilities.py                68      5     20      7    86%   74->76, 78->84, 91, 121, 135, 175, 228
------------------------------------------------------------------------
TOTAL                         2097    344    507     77    81%

Static code analysis report

Run started:2024-02-07 22:52:24.609350

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 4524
  Total lines skipped (#nosec): 0
  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):

@codethulu codethulu marked this pull request as ready for review February 8, 2024 09:47
@codethulu
Copy link
Contributor Author

Some checks were unsuccessful - apparently this sometimes occurs. They do not seem related to any changes made. I am quite confident that it installs the packages correctly.

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.

Can you add a title and PR description?

@cbartz
Copy link
Collaborator

cbartz commented Feb 8, 2024

Some checks were unsuccessful - apparently this sometimes occurs. They do not seem related to any changes made. I am quite confident that it installs the packages correctly.

@codethulu I ran them again - now they passed. The integration tests are unfortunately quite unstable, so unrelated failures may occur.

Please add a more descriptive title (this is a public PR, so not everyone can relate to the ISD number you mention) and a PR description. Thanks.

@codethulu codethulu changed the title feat/ISD-1567 Installed unzip and gh command functionality. Feb 8, 2024
@codethulu
Copy link
Contributor Author

Hi @cbartz I have updated the title and description, let me know if that looks alright now.

@arturo-seijas arturo-seijas changed the title Installed unzip and gh command functionality. Install unzip and gh command functionality. Feb 8, 2024
@codethulu
Copy link
Contributor Author

Made requested changes 👍

@cbartz
Copy link
Collaborator

cbartz commented Feb 8, 2024

@jdkandersson The gh version installed here is 2.4.0+dfsg1 (2022-03-23 Ubuntu 2.4.0+dfsg1-2) compared to 2.43.1
on the gh hosted ones. This could lead to users complaining if the client behaves differently.

@jdkandersson
Copy link
Contributor

@jdkandersson The gh version installed here is 2.4.0+dfsg1 (2022-03-23 Ubuntu 2.4.0+dfsg1-2) compared to 2.43.1 on the gh hosted ones. This could lead to users complaining if the client behaves differently.

How hard would it be to update that package to the latest version please?

@mthaddon
Copy link
Contributor

Closing in favour of #222

@mthaddon mthaddon closed this Feb 12, 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.

5 participants