Skip to content

Feat/app integration #530

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Feat/app integration #530

wants to merge 12 commits into from

Conversation

yhaliaw
Copy link
Collaborator

@yhaliaw yhaliaw commented Apr 17, 2025

Applicable spec: ISD-202

Overview

The github-runner-manager service is enabled in the charm now.

Rationale

This allow us to check logs of the service, to monitor if the service is stable.

Checklist

The changelog is not updated, since the usage of service does not impact the users.

@yhaliaw yhaliaw marked this pull request as ready for review April 22, 2025 04:51
Copy link
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.

Thank you!

@@ -247,6 +250,12 @@ def _common_install_code(self) -> bool:
logger.error("Failed to setup runner manager user")
raise

try:
manager_service.install_package()
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about upgrading? How is this handled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is a local python package.
Installing it with code changes would update the installation.

The _common_install_code function is called on charm upgrade as well. So it should cover the charm upgrade event.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So due to the --ignore-installed flag it would just install without caring about a previous installation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the install_package method to uninstall the packages prior to installing them.

Comment on lines +120 to +126
def test_install_package_success(mock_execute_command: MagicMock):
"""
arrange: Mock execute command.
act: Run install_package.
assert: No errors raised.
"""
manager_service.install_package()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this test really adding value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Personally, I think it does not add value right now.
But it does increase the code coverage.

Copy link
Contributor

Test results for commit 57ad4c7

Test coverage for 57ad4c7

Wrote XML report to coverage/coverage.xml

Static code analysis report

Run started:2025-04-24 06:55:56.575355

Test results:
  No issues identified.

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

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

Copy link
Contributor

TICS Quality Gate

✔️ Passed

github-runner-operator

All conditions passed

See the results in the TICS Viewer

The following files have been checked for this project
  • github-runner-manager/src/github_runner_manager/errors.py
  • github-runner-manager/src/github_runner_manager/github_client.py
  • github-runner-manager/src/github_runner_manager/manager/runner_manager.py
  • github-runner-manager/src/github_runner_manager/openstack_cloud/openstack_runner_manager.py
  • github-runner-manager/src/github_runner_manager/platform/github_provider.py
  • github-runner-manager/src/github_runner_manager/platform/jobmanager_provider.py
  • github-runner-manager/src/github_runner_manager/platform/multiplexer_provider.py
  • github-runner-manager/src/github_runner_manager/platform/platform_provider.py
  • github-runner-manager/src/github_runner_manager/reactive/consumer.py
  • github-runner-manager/src/github_runner_manager/types_/github.py
  • github-runner-manager/tests/unit/mock_runner_managers.py
  • github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py
  • github-runner-manager/tests/unit/test_github_client.py
  • src/charm.py
  • src/errors.py
  • src/manager_service.py
  • tests/integration/test_charm_no_runner.py
  • tests/integration/test_jobmanager.py
  • tests/unit/conftest.py
  • tests/unit/test_charm.py
  • tests/unit/test_factories.py
  • tests/unit/test_manager_service.py

.github/workflows/tics.yaml / TICS / TICS GitHub Action

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.

2 participants