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

Fix prometheus_scrape integration by adding prometheus_alert_rules #8

Merged
merged 4 commits into from
Sep 15, 2023

Conversation

amandahla
Copy link
Collaborator

@amandahla amandahla commented Sep 14, 2023

Overview

If there is no prometheus_alert_rules the charm fails with "Invalid Prometheus alert rules folder at /var/lib/juju/agents/unit-github-actions-exporter-0/charm/src/prometheus_alert_rules: directory does not exist"
This PR fixes it, update the library and add a temporary docs field to charmcraft run as expected.

Rationale

This way the charm can integrate with the Prometheus charm as expected.

Juju Events Changes

N/A

Module Changes

N/A

Library Changes

N/A

Checklist

There is no src-docs for this charm.
There is no charmhub documentation for this charm.

@amandahla amandahla added bug Something isn't working trivial labels Sep 14, 2023
@amandahla amandahla requested a review from a team as a code owner September 14, 2023 12:00
merkata
merkata previously approved these changes Sep 14, 2023
@jdkandersson
Copy link
Contributor

Please provide an explanation for anything that is not checked on the checklist

@github-actions
Copy link

Test coverage for 00eb40d

Name                             Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------
src/charm.py                        53      3      4      1    93%   98-100
src/charm_state.py                  36      1      8      1    95%   21
src/constants.py                     5      0      0      0   100%
src/exceptions.py                    4      0      0      0   100%
src/github_actions_exporter.py      24      0      0      0   100%
----------------------------------------------------------------------------
TOTAL                              122      4     12      2    96%

Static code analysis report

Run started:2023-09-15 13:44:59.441290

Test results:
  No issues identified.

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

@amandahla amandahla merged commit 1ad4fcb into main Sep 15, 2023
19 checks passed
@amandahla amandahla deleted the add-prometheus-rules branch September 15, 2023 14:49
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