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

refactor is_active check and add update_status hook #25

Merged
merged 13 commits into from
Mar 21, 2024

Conversation

Thanhphan1147
Copy link
Collaborator

On update_status, check if the jenkins-agent service is running and if that's not the case, set the charm to error state to notify the operator.

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

@Thanhphan1147 Thanhphan1147 added the trivial This is a trivial PR label Mar 7, 2024
@Thanhphan1147 Thanhphan1147 requested a review from a team as a code owner March 7, 2024 13:16
jdkandersson
jdkandersson previously approved these changes Mar 15, 2024
@Thanhphan1147 Thanhphan1147 dismissed jdkandersson’s stale review March 15, 2024 12:07

The merge-base changed after approval.

jdkandersson
jdkandersson previously approved these changes Mar 18, 2024
jdkandersson
jdkandersson previously approved these changes Mar 19, 2024
Copy link
Contributor

Test coverage for d5dfb73

Name                    Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------
src/agent_observer.py      42      0      4      0   100%
src/charm.py               62      0     10      0   100%
src/charm_state.py         59      4      8      1    93%   114, 172-174
src/service.py             94      5     14      5    91%   94-96, 108->120, 135, 167, 190->194, 192->190
-------------------------------------------------------------------
TOTAL                     257      9     36      6    95%

Static code analysis report

Run started:2024-03-21 10:27:25.640167

Test results:
  No issues identified.

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

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

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM, minor nitpick that can be implemented later, thanks!

src/service.py Show resolved Hide resolved
@Thanhphan1147 Thanhphan1147 merged commit b0a012b into main Mar 21, 2024
20 checks passed
@Thanhphan1147 Thanhphan1147 deleted the check_status_and_restart_on_update_status branch March 21, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Libraries: OK trivial This is a trivial PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants