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

nixos/prometheus-exporters/py-air-control: init #106067

Merged
merged 1 commit into from Dec 10, 2020

Conversation

urbas
Copy link
Contributor

@urbas urbas commented Dec 6, 2020

Motivation for this change

This change adds the py-air-control Prometheus Exporter Module for NixOS.

This module sets up the prometheus-py-air-control-exporter service which gathers air quality information from an air quality/air purification device connected to the network.

This is a follow-up to the PR #105966.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/) (tested the execution of this new prometheus-py-air-control-exporter service on a Raspberry Pi with an actual air purifier device)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @SuperSandro2000 @lukegb

@urbas urbas requested a review from WilliButz as a code owner December 6, 2020 13:59

in
{
port = 9896;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This port has been added to the Prometheus' port allocations table.

@urbas
Copy link
Contributor Author

urbas commented Dec 9, 2020

Added tests. They will fail until the py-air-control-exporter package is updated to 0.2.0.

Edit: the package was updated and the tests now pass.

@WilliButz: Is there a way to trigger these new tests in CI?

Here's the way I ran them:

nix-build -vA pkgs.nixosTests.prometheus-exporters.py-air-control

Copy link
Member

@WilliButz WilliButz left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor remark 👍

@urbas urbas force-pushed the prometheus-exporter-py-air-control branch 2 times, most recently from 369dcf2 to 2bbf895 Compare December 10, 2020 19:01
@urbas urbas force-pushed the prometheus-exporter-py-air-control branch from 2bbf895 to 4948743 Compare December 10, 2020 19:02
@urbas urbas requested a review from WilliButz December 10, 2020 19:04
@WilliButz
Copy link
Member

@GrahamcOfBorg test prometheus-exporters.py-air-control

@WilliButz WilliButz merged commit df8ee36 into NixOS:master Dec 10, 2020
@urbas urbas deleted the prometheus-exporter-py-air-control branch December 29, 2020 18:41
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.

None yet

2 participants