[PR #714] [MERGED] Remove port portion of remote_addr to fix Azure deployments #1014

Closed
opened 2026-02-26 00:30:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/healthchecks/healthchecks/pull/714
Author: @cam-barts
Created: 10/11/2022
Status: Merged
Merged: 10/20/2022
Merged by: @cuu508

Base: masterHead: master


📝 Commits (2)

  • 0a698c7 Remove port portion of remote_addr
  • 22d7684 Add IPv4 check to guard clause

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 hc/api/models.py (+2 -0)

📄 Description

In an Azure deployment, there were issues saving ping objects to the database because the addresses appear to come in with ports attached to them (123.123.123.123:5314), which breaks the GenericIPAddressField constraint on the Ping model. This had the following results:

  • Pings not actually saving to the database
  • Hitting ping endpoints would result in 500 status codes
  • Check's status would change, but no logs would appear on the page

I was able to make this change locally and push a container based on it into Azure and the fix works.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/healthchecks/healthchecks/pull/714 **Author:** [@cam-barts](https://github.com/cam-barts) **Created:** 10/11/2022 **Status:** ✅ Merged **Merged:** 10/20/2022 **Merged by:** [@cuu508](https://github.com/cuu508) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`0a698c7`](https://github.com/healthchecks/healthchecks/commit/0a698c7d86845805c664e64521f2b0f98481a59b) Remove port portion of remote_addr - [`22d7684`](https://github.com/healthchecks/healthchecks/commit/22d76845fac9b2b2b2f765c4480187bec4172d45) Add IPv4 check to guard clause ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `hc/api/models.py` (+2 -0) </details> ### 📄 Description In an Azure deployment, there were issues saving ping objects to the database because the addresses appear to come in with ports attached to them (123.123.123.123:5314), which breaks the [GenericIPAddressField](https://docs.djangoproject.com/en/4.1/ref/forms/fields/#genericipaddressfield) constraint on the [Ping model](https://github.com/healthchecks/healthchecks/blob/11997e75c8b82981537234f236e0abb878afeeee/hc/api/models.py#L497). This had the following results: - Pings not actually saving to the database - Hitting ping endpoints would result in 500 status codes - Check's status would change, but no logs would appear on the page I was able to make this change locally and push a container based on it into Azure and the fix works. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 00:30:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#1014
No description provided.