feat: do not fail DERP healthcheck if WebSocket is used (#10714)

This commit is contained in:
Marcin Tojek
2023-11-17 16:00:49 +01:00
committed by GitHub
parent 24aa223399
commit 8999d5785a
14 changed files with 285 additions and 80 deletions
+16 -8
View File
@@ -51,7 +51,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"healthy": true,
"healthz_response": "string",
"reachable": true,
"status_code": 0
"status_code": 0,
"warnings": ["string"]
},
"coder_version": "string",
"database": {
@@ -60,7 +61,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"latency": "string",
"latency_ms": 0,
"reachable": true,
"threshold_ms": 0
"threshold_ms": 0,
"warnings": ["string"]
},
"derp": {
"error": "string",
@@ -134,7 +136,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -160,7 +163,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
},
"property2": {
"error": "string",
@@ -198,7 +202,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -224,9 +229,11 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
}
}
},
"warnings": ["string"]
},
"failing_sections": ["string"],
"healthy": true,
@@ -235,7 +242,8 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
"body": "string",
"code": 0,
"error": "string",
"healthy": true
"healthy": true,
"warnings": ["string"]
}
}
```
+66 -41
View File
@@ -7138,7 +7138,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
```
@@ -7157,6 +7158,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `round_trip_ping_ms` | integer | false | | |
| `stun` | [derphealth.StunReport](#derphealthstunreport) | false | | |
| `uses_websocket` | boolean | false | | |
| `warnings` | array of string | false | | |
## derphealth.RegionReport
@@ -7197,7 +7199,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -7223,7 +7226,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
}
```
@@ -7235,6 +7239,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `healthy` | boolean | false | | |
| `node_reports` | array of [derphealth.NodeReport](#derphealthnodereport) | false | | |
| `region` | [tailcfg.DERPRegion](#tailcfgderpregion) | false | | |
| `warnings` | array of string | false | | |
## derphealth.Report
@@ -7311,7 +7316,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -7337,7 +7343,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
},
"property2": {
"error": "string",
@@ -7375,7 +7382,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -7401,9 +7409,11 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
}
}
},
"warnings": ["string"]
}
```
@@ -7418,6 +7428,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `netcheck_logs` | array of string | false | | |
| `regions` | object | false | | |
| » `[any property]` | [derphealth.RegionReport](#derphealthregionreport) | false | | |
| `warnings` | array of string | false | | |
## derphealth.StunReport
@@ -7446,20 +7457,22 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"healthy": true,
"healthz_response": "string",
"reachable": true,
"status_code": 0
"status_code": 0,
"warnings": ["string"]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------ | ------- | -------- | ------------ | ----------- |
| `access_url` | string | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `healthz_response` | string | false | | |
| `reachable` | boolean | false | | |
| `status_code` | integer | false | | |
| Name | Type | Required | Restrictions | Description |
| ------------------ | --------------- | -------- | ------------ | ----------- |
| `access_url` | string | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `healthz_response` | string | false | | |
| `reachable` | boolean | false | | |
| `status_code` | integer | false | | |
| `warnings` | array of string | false | | |
## healthcheck.DatabaseReport
@@ -7470,20 +7483,22 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"latency": "string",
"latency_ms": 0,
"reachable": true,
"threshold_ms": 0
"threshold_ms": 0,
"warnings": ["string"]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| -------------- | ------- | -------- | ------------ | ----------- |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `latency` | string | false | | |
| `latency_ms` | integer | false | | |
| `reachable` | boolean | false | | |
| `threshold_ms` | integer | false | | |
| Name | Type | Required | Restrictions | Description |
| -------------- | --------------- | -------- | ------------ | ----------- |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `latency` | string | false | | |
| `latency_ms` | integer | false | | |
| `reachable` | boolean | false | | |
| `threshold_ms` | integer | false | | |
| `warnings` | array of string | false | | |
## healthcheck.Report
@@ -7495,7 +7510,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"healthy": true,
"healthz_response": "string",
"reachable": true,
"status_code": 0
"status_code": 0,
"warnings": ["string"]
},
"coder_version": "string",
"database": {
@@ -7504,7 +7520,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"latency": "string",
"latency_ms": 0,
"reachable": true,
"threshold_ms": 0
"threshold_ms": 0,
"warnings": ["string"]
},
"derp": {
"error": "string",
@@ -7578,7 +7595,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -7604,7 +7622,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
},
"property2": {
"error": "string",
@@ -7642,7 +7661,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"enabled": true,
"error": "string"
},
"uses_websocket": true
"uses_websocket": true,
"warnings": ["string"]
}
],
"region": {
@@ -7668,9 +7688,11 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"regionCode": "string",
"regionID": 0,
"regionName": "string"
}
},
"warnings": ["string"]
}
}
},
"warnings": ["string"]
},
"failing_sections": ["string"],
"healthy": true,
@@ -7679,7 +7701,8 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"body": "string",
"code": 0,
"error": "string",
"healthy": true
"healthy": true,
"warnings": ["string"]
}
}
```
@@ -7704,18 +7727,20 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"body": "string",
"code": 0,
"error": "string",
"healthy": true
"healthy": true,
"warnings": ["string"]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| --------- | ------- | -------- | ------------ | ----------- |
| `body` | string | false | | |
| `code` | integer | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| Name | Type | Required | Restrictions | Description |
| ---------- | --------------- | -------- | ------------ | ----------- |
| `body` | string | false | | |
| `code` | integer | false | | |
| `error` | string | false | | |
| `healthy` | boolean | false | | |
| `warnings` | array of string | false | | |
## netcheck.Report