Skip to content

Commit

Permalink
Add workflow dispatch event trigger to check.yaml (#61)
Browse files Browse the repository at this point in the history
* Add workflow dispatch event trigger to check.yaml

* chore: fix lint errors
  • Loading branch information
dashmage authored Feb 9, 2024
1 parent c05deb0 commit 0665041
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Check workflow running linter, unit and functional tests

on:
workflow_call:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
branches: [master, main]
Expand Down
6 changes: 3 additions & 3 deletions prometheus_hardware_exporter/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,9 +1018,9 @@ def fetch(self) -> List[Payload]:
chassis_data: Dict[str, Dict] = redfish_helper.get_chassis_data()
storage_drive_count, storage_drive_data = redfish_helper.get_storage_drive_data()
memory_dimm_count, memory_dimm_data = redfish_helper.get_memory_dimm_data()
smart_storage_health_data: Dict[
str, Any
] = redfish_helper.get_smart_storage_health_data()
smart_storage_health_data: Dict[str, Any] = (
redfish_helper.get_smart_storage_health_data()
)

except (
ConnectionError,
Expand Down
1 change: 1 addition & 0 deletions prometheus_hardware_exporter/collectors/dmidecode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dmidecode metrics collector."""

import re
from functools import lru_cache
from logging import getLogger
Expand Down
1 change: 1 addition & 0 deletions prometheus_hardware_exporter/collectors/perccli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Collector for PowerEdgeRAID controller."""

from logging import getLogger
from typing import Any, Dict, List, Union

Expand Down
1 change: 1 addition & 0 deletions prometheus_hardware_exporter/collectors/redfish.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Redfish collector."""

from logging import getLogger
from typing import Any, Callable, Dict, List, Optional, Tuple

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ def test_ipmi_sel_installed_and_okay(self):
payloads_labels_value_map = {}
for payload in payloads:
if payload.name == "ipmi_sel_state":
payloads_labels_value_map[
tuple(payload.samples[0].labels.values())
] = payload.samples[0].value
payloads_labels_value_map[tuple(payload.samples[0].labels.values())] = (
payload.samples[0].value
)
expected_payloads_label_value_map = {
("System Board ACPI_Stat", "System ACPI Power State"): 1,
("System Chassis SysHealth_Stat", "Chassis"): 2,
Expand Down

0 comments on commit 0665041

Please sign in to comment.