Skip to content

Commit d94745a

Browse files
committed
2 parents 4c038ca + 136c0f4 commit d94745a

654 files changed

Lines changed: 9817 additions & 7502 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/coverage.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ jobs:
1010
test:
1111
runs-on: ubuntu-24.04
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v5
1414
- name: Set up Python
15-
uses: actions/setup-python@v4
15+
uses: actions/setup-python@v5
1616
with:
17-
python-version: "3.11"
17+
python-version: "3.12"
1818
- name: Install Dependencies
1919
run: |
2020
sudo apt-get update -qq
2121
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
2222
python -m pip install --upgrade pip
23-
pip install -r requirements.txt
24-
pip install apprise braintree coverage coveralls minio
23+
pip install -r requirements.txt -r requirements-dev.txt
24+
pip install coverage coveralls
2525
- name: Run Tests
2626
env:
2727
SECRET_KEY: dummy-key

.github/workflows/mypy.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v4
1616
with:
17-
python-version: "3.11"
17+
python-version: "3.12"
1818
- name: Install Dependencies
1919
run: |
2020
sudo apt-get update -qq
2121
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
2222
python -m pip install --upgrade pip
23-
pip install -r requirements.txt
24-
pip install apprise braintree minio
25-
pip install mypy==1.13.0 django-stubs types-braintree types-pycurl==7.45.2.20240311 types-Markdown types-pygments
23+
pip install -r requirements.txt -r requirements-dev.txt
2624
touch hc/local_settings.py
2725
- name: Run Mypy
28-
run: mypy --strict hc
26+
run: mypy --strict --show-traceback hc

.github/workflows/publish_docker_image.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- name: Extract metadata (tags, labels) for Docker
2323
id: meta
24-
uses: docker/metadata-action@v4
24+
uses: docker/metadata-action@v5
2525
with:
2626
images: healthchecks/healthchecks
2727

@@ -42,3 +42,5 @@ jobs:
4242
push: true
4343
tags: ${{ steps.meta.outputs.tags }}
4444
labels: ${{ steps.meta.outputs.labels }}
45+
annotations: ${{ steps.meta.outputs.annotations }}
46+
sbom: true

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
db: [sqlite, postgres, mysql, mariadb]
15-
python-version: ["3.10", "3.11", "3.12"]
15+
python-version: ["3.12", "3.13", "3.14"]
1616
include:
1717
- db: postgres
1818
db_user: runner
@@ -25,11 +25,12 @@ jobs:
2525
db_password: ""
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v5
2929
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v5
3131
with:
3232
python-version: ${{ matrix.python-version }}
33+
allow-prereleases: true
3334
- name: Start MySQL
3435
if: matrix.db == 'mysql'
3536
run: sudo systemctl start mysql.service
@@ -46,8 +47,7 @@ jobs:
4647
sudo apt-get update -qq
4748
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
4849
python -m pip install --upgrade pip
49-
pip install -r requirements.txt
50-
pip install apprise minio mysqlclient
50+
pip install -r requirements.txt -r requirements-dev.txt
5151
- name: Run Tests
5252
env:
5353
DB: ${{ matrix.db }}

CHANGELOG.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,83 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## v3.10-dev - Unreleased
4+
## v4.1-dev - Unreleased
5+
6+
### Improvements
7+
- Remove team size limits: users on all plans can now invite many team members
8+
9+
### Bug Fixes
10+
- Fix a formatting issue in Matrix notification template (#1264, @neoscaler)
11+
12+
## v4.0 - 2026-01-22
13+
14+
This release drops support of Python 3.11 and below. The minimum required Python
15+
version is 3.12.
16+
17+
### Improvements
18+
- Upgrade to Django 6.0
19+
- Update the Matrix integration to use Matrix v3 API (#1244)
20+
- Update email alert template to use user's preferred time zone (#1230)
21+
- Update the web UI to use user's preferred timezone instead of browser's timezone
22+
- Add data migration to update legacy timezones to current canonical timezones (#1250)
23+
- Switch to using multicolor icon font for integration icons
24+
25+
### Bug Fixes
26+
- Fix the text version of email report for recently created checks (#1236, @adelton)
27+
- Fix prepare_durations() to assert ping ordering by id not by created date
28+
- Fix the "Pause" API call and UI action to no-op if the check is already paused
29+
30+
## v3.13 - 2025-11-30
31+
32+
### Improvements
33+
- Add new content filtering options in the "Filtering Rules" dialog (#1130, #954)
34+
- Fix the email integration's unsub view to disable (not delete) the channel
35+
- Add support for _FILE environment variables (#1184)
36+
37+
### Bug Fixes
38+
- Pin minio in Dockerfile to a known good version (#1235)
39+
40+
## v3.12 - 2025-11-26
41+
42+
### Improvements
43+
- Add rate limiting and a default ntfy.sh token support for ntfy notifications
44+
- Sort checks in daily/weekly/monthly reports by downtime duration, then by name (#1095)
45+
- Generate lower-case ping keys to work around broken email providers (#1218)
46+
- After creating a ping key show a dialog displaying the new ping key (#1222)
47+
- Add a tooltip with timestamp in the checks table, "Last Ping" column (#1040)
48+
- Update the Zulip transport to allow addressing users by User ID (#771)
49+
- Add hc_check_grace and hc_check_paused Prometheus metrics (#897, #915)
50+
- Update Docker base image to python:3.13.9-slim-trixie (#1233)
51+
52+
### Bug Fixes
53+
- Fix cron schedule formatting in Discord notifications
54+
- Fix cron schedule formatting in Rocket.Chat notifications (in mobile app)
55+
56+
## v3.11.2 - 2025-09-02
57+
58+
### Bug Fixes
59+
- Update Docker image to handle legacy time zones (#1210)
60+
61+
## v3.11.1 - 2025-08-31
62+
63+
### Improvements
64+
- Update Dockerfile to use Debian Trixie as the base
65+
66+
### Bug Fixes
67+
- Update Docker image to listen on IPv6 only if LISTEN_IPV6 env var is set (#1207)
68+
69+
## v3.11 - 2025-08-28
70+
71+
### Improvements
72+
- Store project API keys in the database in a hashed form (#1167)
73+
- Use "hcw_" and "hcr_" prefixes in project API keys (#1148)
74+
- New integration: Google Chat (#423)
75+
- Fix the ping view to handle IPv4-mapped IPv6 addresses (#1169)
76+
- Update Dockerfile to listen on IPv6 as well (#1177)
77+
- Add "ping_key+slug@..." address support when pinging by email (#1009)
78+
- Add daily email report option (#1202)
79+
80+
## v3.10 - 2025-05-09
581

682
### Improvements
783
- Add "badge_url" field in Check API responses (#1100)
@@ -12,6 +88,7 @@ All notable changes to this project will be documented in this file.
1288
- Update "?rid=<uuid>" handling to allow UUIDs with uppercase letters (#1116, @wie-niet)
1389
- New integration: GitHub issues (#671)
1490
- Add support for passing Authorization header to Prometheus metrics endpoints
91+
- Upgrade to Django 5.2
1592

1693
### Bug Fixes
1794
- Fix incorrect status value in Webhook integration's $JSON placeholder

CONTRIBUTING.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,31 @@
22

33
I'm open to feature suggestions and happy to review code contributions.
44
If you are planning to contribute something larger than a small, straightforward
5-
bugfix, please open an issue so we can discuss it first. Otherwise you are risking a
5+
bugfix, please open an issue so we can discuss it first. Otherwise you are risking a
66
"no" or a "yes, but let's do it differently" to an already implemented feature.
77

8+
## AI Policy
9+
10+
I do not accept content generated or touched up by AI tools. Do not
11+
submit pull requests or issues produced with the help of LLMs or code generation
12+
assistants, they will be closed with no discussion. Do not write emails
13+
generated or rewritten by LLMs, they will be marked as spam.
14+
815
## Code Style
916

10-
* Format your Python code with [black](https://black.readthedocs.io/en/stable/).
17+
* Format your Python code with [ruff](https://docs.astral.sh/ruff/).
1118
* Prefer simplicity over cleverness.
12-
* If you are fixing a bug or adding a feature, add a test. Run tests before
19+
* If you are fixing a bug or adding a feature, add a test. Run tests before
1320
submitting pull requests.
1421

1522
## Adding Documentation
1623

17-
This project uses the Markdown format for documentation. Use the `render_docs`
24+
This project uses the Markdown format for documentation. Use the `render_docs`
1825
management command to generate the HTML version of the documentation. To add a new
1926
documentation page:
2027

2128
1. Create the appropriate .md file under `templates/docs`
22-
2. Generate the HTML version with `./manage.py render_docs`
29+
2. Generate the HTML version with `./manage.py render_docs`
2330
3. Add the page to the navigation in `/templates/front/docs_single.html`
2431

2532
## Developing a New Integration
@@ -41,20 +48,23 @@ The best way to build a new integration is to pick a similar existing integratio
4148
as a starting point for the new integration and replicate every aspect of it.
4249
You will need to make changes in the following files:
4350

44-
* Add a new class in `/hc/api/transports.py`.
45-
* Add a new notification template in `/templates/integrations/`.
46-
* Write testcases for the new transport class in `/hc/api/tests/test_notify_<kind>.py`.
47-
* Update `CHANNEL_KINDS` in `/hc/api/models.py`.
48-
* Update `Channel.transport()` in `/hc/api/models.py`.
49-
* Create a view for provisioning the new integration in `/hc/front/views.py`.
50-
* Write a HTML template for the new view in `/templates/front/add_<kind>.py`, and
51-
prepare any supporting illustrations in `/static/img/integrations/`.
52-
* Add a route for the new view in `/hc/front/urls.py`.
53-
* Write testcases for the new view in `/hc/font/tests/test_add_<kind>.py`.
51+
* In `/hc/integrations/`, copy an existing integration to a new directory
52+
* Edit the transport class in `/hc/integrations/<kind>/transport.py`.
53+
* Edit the notification template(s) in `/hc/integrations/<kind>/templates/`.
54+
* Write testcases for the transport class in
55+
`/hc/integrations/<kind>/tests/test_notify.py`.
56+
* Update `TRANSPORTS` in `/hc/api/models.py`.
57+
* Edit the view(s) for provisioning the integration in
58+
`/hc/integrations/<kind>/views.py`.
59+
* Write a HTML template for the new view in
60+
`/hc/integrations/<kind>/templates/</add_<kind>.py`, and prepare any supporting
61+
illustrations in `/hc/integrations/<kind>/static/img/`.
62+
* Edit routes for the new view(s) in `/hc/integrations/<kind>/urls.py`.
63+
* Include the new integration's urls.py in `/hc/urls.py`
64+
* Write testcases for the new view in `/hc/integrations/<kind>/tests/test_add.py`.
5465
* Update `/templates/front/channels.html` – add a new section in the list of available
5566
integrations, make sure an existing integration is displayed nicely.
5667
* Update `/templates/front/event_summary.html` to make sure notifications sent to the
5768
new integration are displayed nicely.
58-
* Add a logo in `/static/img/integrations/`.
69+
* Add a logo in `/hc/integrations/<kind>static/img/`.
5970
* Update the icon font (it's a little tricky to do, I can take care of that).
60-

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ team management features: projects, team members, read-only access.
1313

1414
The building blocks are:
1515

16-
* Python 3.10+
17-
* Django 5.1
16+
* Python 3.12+
17+
* Django 6.0
1818
* PostgreSQL, MySQL or MariaDB
1919

2020
Healthchecks is licensed under the BSD 3-clause license.
@@ -57,6 +57,9 @@ You can use them in your READMEs, dashboards, or status pages.
5757

5858
## Setting Up for Development
5959

60+
If you are planning to developing Healthchecks, please read
61+
[CONTRIBUTING.md](https://github.com/healthchecks/healthchecks/tree/master/CONTRIBUTING.md).
62+
6063
To set up Healthchecks development environment:
6164

6265
* Install dependencies (Debian/Ubuntu):
@@ -78,8 +81,8 @@ To set up Healthchecks development environment:
7881
(with virtualenv you get pip, we'll use it soon to install requirements):
7982

8083
```sh
81-
python3 -m venv hc-venv
82-
source hc-venv/bin/activate
84+
python3 -m venv .venv
85+
source .venv/bin/activate
8386
pip3 install wheel # make sure wheel is installed in the venv
8487
```
8588

@@ -92,7 +95,7 @@ To set up Healthchecks development environment:
9295
* Install requirements (Django, ...) into virtualenv:
9396

9497
```sh
95-
pip install -r healthchecks/requirements.txt
98+
pip install -r healthchecks/requirements.txt -r healthchecks/requirements-dev.txt
9699
```
97100

98101
* macOS only - pycurl needs to be reinstalled using the following method (assumes OpenSSL was installed using brew):
@@ -297,10 +300,6 @@ setting to a non-null value. Set its value to your site's domain without scheme
297300
and without port. For example, if your site runs on `https://my-hc.example.org`,
298301
set `RP_ID` to `my-hc.example.org`.
299302

300-
Note that WebAuthn requires HTTPS, even if running on localhost. To test WebAuthn
301-
locally with a self-signed certificate, you can use the `runsslserver` command
302-
from the `django-sslserver` package.
303-
304303
## External Authentication
305304

306305
Healthchecks supports external authentication by means of HTTP headers set by
@@ -548,7 +547,7 @@ in production.
548547
[ADMINS](https://docs.djangoproject.com/en/4.2/ref/settings/#admins) and
549548
[SERVER_EMAIL](https://docs.djangoproject.com/en/4.2/ref/settings/#server-email)
550549
settings. Consider setting up exception logging with [Sentry](https://sentry.io/for/django/).
551-
* Management commands that need to be run during each deployment.
550+
* Management commands that need to be run during each version upgrade.
552551
* `manage.py compress` – creates combined JS and CSS bundles and
553552
places them in the `static-collected` directory.
554553
* `manage.py collectstatic` – collects static files in the `static-collected`

docker/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1-
# syntax=docker/dockerfile:1
2-
3-
FROM python:3.13.1-slim-bookworm AS builder
1+
FROM python:3.14.3-slim-trixie AS builder
42

53
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
64

75
COPY requirements.txt /tmp
6+
# build-essential is required to build uswsi, psycopg, mysqlclient
7+
# libffi-dev is required to build cffi (a dependency of minio)
8+
# libpq-dev is required to build psycopg[c]
9+
# libmaria-dev is required to build mysqlclient
10+
# libcurl4-openssl-dev is required to build pycurl
11+
# pkg-config is required to build mysqlclient
812
RUN \
913
apt-get update && \
10-
apt-get install -y build-essential curl libpq-dev libmariadb-dev libffi-dev libpcre2-dev libssl-dev libcurl4-openssl-dev libsasl2-dev libldap2-dev libpython3-dev pkg-config
11-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- --profile minimal -y
12-
ENV PATH=$PATH:/root/.cargo/bin
13-
RUN pip wheel --wheel-dir /wheels apprise uwsgi mysqlclient minio psycopg-c==3.2.3 -r /tmp/requirements.txt
14+
apt-get install -y build-essential libffi-dev libpq-dev libmariadb-dev libcurl4-openssl-dev pkg-config libsasl2-dev libldap2-dev
15+
RUN pip wheel --wheel-dir /wheels apprise uwsgi mysqlclient minio==7.2.20 "psycopg[c]" -r /tmp/requirements.txt
1416

1517
COPY . /opt/healthchecks/
1618
RUN \
1719
rm -rf /opt/healthchecks/.git && \
1820
rm -rf /opt/healthchecks/stuff
1921

20-
FROM python:3.13.0-slim-bookworm
22+
FROM python:3.14.3-slim-trixie
2123

2224
RUN useradd --system hc
2325
ENV PYTHONUNBUFFERED=1
2426
WORKDIR /opt/healthchecks
2527

2628
RUN \
2729
apt-get update && \
28-
apt-get install -y ca-certificates libcurl4 libexpat1 libpq5 libmariadb3 libxml2 && \
30+
apt-get install -y libcurl4t64 libpq5 libmariadb3 ca-certificates && \
2931
rm -rf /var/apt/cache && \
3032
rm -rf /var/lib/apt/lists
3133

32-
3334
RUN --mount=type=bind,target=/wheels,source=/wheels,from=builder \
3435
pip install --upgrade pip && \
3536
pip install --no-cache /wheels/*

0 commit comments

Comments
 (0)