Allow DJBLETS_HEALTHCHECK_IPS to list subnets.
Review Request #14579 — Created Sept. 1, 2025 and submitted
In some larger setups, the individual IP of the management node for a
cluster may not be fixed. This makes it very annoying to set the allowed
IP whitelist for the healthcheck endpoint.This change makes it so the
DJBLETS_HEALTHCHECK_IPS
setting is now
formally a comma-separated list which can include either individual IP
addresses or CIDR subnets.This change also adds unit tests for the healthcheck endpoint, which
didn't have any.
- Verified that both individual IP and subnet matching worked as
expected. - Ran unit tests.
Summary | ID |
---|---|
ozqlwvmxzvoturkzosryzsotxqyyovwq |
Description | From | Last Updated |
---|---|---|
line too long (81 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
continuation line over-indented for hanging indent Column: 17 Error code: E126 |
![]() |
|
continuation line unaligned for hanging indent Column: 13 Error code: E131 |
![]() |
|
Given the discussion in Slack, we can probably just make this all 5.3. I don't think we need to actually … |
|
|
This should be in the same import group. |
|
|
Missing Returns and Version Added. |
|
|
Same note as above re: version. |
|
|
These might be better in a setUpClass(). Also, we need to set the types above and null these out in … |
|
|
No trailing period here or in the following tests. |
|
|
We should check the logs. |
|
|
Don't tests already use the local memory cache by default? I noticed some tests are using this and some aren't. |
|
|
This can be assertJSONEqual(). Here and below. |
|
|
This should check the logs. |
|
|
Missing a trailing period. |
|
|
This should check the logs. |
|
|
This should check the logs. |
|
|
This should check the logs. |
|
|
Can you update the description and add a Version Changed (for 5.3) stating what's accepted for the setting? My fault, … |
|
|
Blank line before this. |
|
|
The other logs in here prefix as "Health check:" |
|
|
This is missing the "Health check:" prefix. |
|
|
This is missing the "Health check:" prefix. |
|
|
These are missing a Version Added. |
|
|
This should be 5.3 |
![]() |
|
"Django". |
|
- Commits:
-
Summary ID ozqlwvmxzvoturkzosryzsotxqyyovwq ozqlwvmxzvoturkzosryzsotxqyyovwq
Checks run (2 succeeded)
- Change Summary:
-
- Fix expected type of
DJBLETS_HEALTHCHECK_IPS
- Improve error handling when the setting isn't correct.
- Fix expected type of
- Commits:
-
Summary ID ozqlwvmxzvoturkzosryzsotxqyyovwq ozqlwvmxzvoturkzosryzsotxqyyovwq
Checks run (2 succeeded)
-
-
Given the discussion in Slack, we can probably just make this all 5.3. I don't think we need to actually land on 4.0.x if we're just providing customer backports.
If we do keep this here, it'll need to be 4.1, since it's adding new functionality.
-
-
-
-
These might be better in a
setUpClass()
.Also, we need to set the types above and null these out in a teardown.
-
-
-
Don't tests already use the local memory cache by default? I noticed some tests are using this and some aren't.
-
-
-
-
-
-
-
-
Can you update the description and add a Version Changed (for 5.3) stating what's accepted for the setting?
My fault, but we should also mention the setting in the first place.
-
-
-
-
-
- Commits:
-
Summary ID ozqlwvmxzvoturkzosryzsotxqyyovwq ozqlwvmxzvoturkzosryzsotxqyyovwq - Branch:
-
release-4.xrelease-5.x