Commit Graph

63 Commits

Author SHA1 Message Date
04c33968cf refactor: replace golang.org/x/exp/slices with slices (#16772)
The experimental functions in `golang.org/x/exp/slices` are now
available in the standard library since Go 1.21.

Reference: https://go.dev/doc/go1.21#slices

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-03-04 00:46:49 +11:00
9520da338e fix: conform to stricter printf usage in Go 1.24 (#16330) 2025-01-29 18:06:22 +02:00
4f438e71cf docs: fix broken links (#16179)
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Cian Johnston <cian@coder.com>
2025-01-17 13:18:48 -05:00
2c7f8ac65f chore: migrate to coder/websocket 1.8.12 (#15898)
Migrates us to `coder/websocket` v1.8.12 rather than `nhooyr/websocket` on an older version.

Works around https://github.com/coder/websocket/issues/504 by adding an explicit test for `xerrors.Is(err, io.EOF)` where we were previously getting `io.EOF` from the netConn.
2024-12-19 00:51:30 +04:00
ef09b51912 fix(coderd): extract provisionerdserver.StaleInterval to 90 seconds (#15643)
Follow-up from https://github.com/coder/coder/pull/15578

Extracts `provisionerdserver.StaleInterval` and sets it to 90 seconds by
default
2024-11-28 12:57:43 +00:00
335eb05223 feat: add keys to organization provision daemons (#14627) 2024-09-16 20:02:08 +00:00
0787de88a9 chore: update documentation links to the new format (#13797) 2024-07-10 21:31:37 +03:00
54e8f30002 chore: remove failing_sections from healthcheck (#13426)
Closes #10854.
2024-06-21 14:49:02 -04:00
fc09077b7b feat!: add interface report to coder netcheck (#13562)
re: #13327

Adds local interfaces to `coder netcheck` and checks their MTUs for potential problems.

This is mostly relevant for end-user systems where VPNs are common.  We _could_ also add it to coderd healthcheck, but until I see coderd connecting to workspaces over a VPN in the wild, I don't think its worth the UX effort.

Netcheck results get the following:

```
  "interfaces": {
    "error": null,
    "severity": "ok",
    "warnings": null,
    "dismissed": false,
    "interfaces": [
      {
        "name": "lo0",
        "mtu": 16384,
        "addresses": [
          "127.0.0.1/8",
          "::1/128",
          "fe80::1/64"
        ]
      },
      {
        "name": "en8",
        "mtu": 1500,
        "addresses": [
          "192.168.50.217/24",
          "fe80::c13:1a92:3fa5:dd7e/64"
        ]
      }
    ]
  }
```

_Technically_ not back compatible if anyone is parsing `coder netcheck` output as JSON, since the original output is now under `"derp"` in the output.
2024-06-13 10:19:36 +04:00
48ecee1025 chore(cli): address cli netcheck test flake (#13492)
* netcheck: removes check for healthy node report in test
* coderd/healthcheck/derphealth: do not override parent context deadline
2024-06-07 10:01:54 +01:00
8e1e0f04a4 feat(cli): support bundle: show links to docs/admin/healthcheck (#12974) 2024-04-16 16:21:09 +01:00
407e61ecd4 feat(cli): support bundle: dump healthcheck summary (#12963)
* refactor(codersdk): extract common fields from HealthReport and friends
* feat(codersdk/healthsdk): add Summarize() method
* feat(cli): support bundle: dump healthcheck summary
2024-04-16 13:31:56 +01:00
9a4703a311 feat(coderd/healthcheck): improve detection of STUN issues (#12951)
Adds checks to coderd/healthcheck/derphealth for STUN issues:
- Alerts if there is not least one healthy STUN server,
- Alerts if we see variable port mapping.
2024-04-15 17:10:49 +01:00
4d5a7b2d56 chore(codersdk): move all tailscale imports out of codersdk (#12735)
Currently, importing `codersdk` just to interact with the API requires
importing tailscale, which causes builds to fail unless manually using
our fork.
2024-03-26 12:44:31 -05:00
2b773f9034 fix: allow proxy version mismatch (with warning) (#12433) 2024-03-20 18:24:18 +00:00
2cb9bfd517 refactor(coderd): move healthcheck report structs to codersdk (#12279)
Moves healthcheck report-related structs from coderd/healthcheck to codersdk
This prevents an import cycle when adding a codersdk.Client method to hit /api/v2/debug/health.
2024-02-23 13:13:28 +00:00
643c3ee54b refactor(provisionerd): move provisionersdk.VersionCurrent -> provisionerdproto.VersionCurrent (#12225) 2024-02-20 12:44:19 +00:00
a2cbb0f87f fix(enterprise/coderd): check provisionerd API version on connection (#12191) 2024-02-16 18:43:07 +00:00
0e96115d5d fix(coderd): correctly show warning when no provisioner daemons are registered (#11591) 2024-01-12 11:22:59 +00:00
9f4f953350 fix(coderd/healthcheck): ignore deleted wsproxies in wsproxy healthcheck (#11515) 2024-01-09 16:36:26 +00:00
93cf5dcd47 fix(coderd/healthcheck): add daemon-specific warnings to healthcheck output (#11490)
- Sorts provisioner daemons by name ascending in output
- Adds daemon-specific warnings to healthcheck output
- Reword some messages
2024-01-08 13:55:00 +00:00
04fd96a014 feat(coderd): add provisioner_daemons to /debug/health endpoint (#11393)
Adds a healthcheck for provisioner daemons to /debug/health endpoint.
2024-01-08 09:29:04 +00:00
dd05a6b13a chore: mockgen archived, moved to new location (#11415)
* chore: mockgen archived, moved to new location
2024-01-04 18:35:56 -06:00
51687c74c8 fix(coderd/healthcheck): do not return null regions in RegionsResponse (#11088) 2023-12-07 21:10:12 +00:00
feaa9894a4 fix(site/src/api/typesGenerated): generate HealthSection enums (#11049)
Relates to #8971

- Introduces a codersdk.HealthSection enum type
- Refactors existing references using strings to use new HealthSection type
2023-12-05 20:00:27 +00:00
2e4e0b2d2c fix(scripts/apitypings): force health.Message and health.Severity to correct types (#11043)
* Force typegen types for some fields of derp health report
* Explicitly allocate slices for RegionReport.{Errors,Warnings} to avoid nulls in API response
2023-12-05 16:31:48 +00:00
07895006d9 refactor(coderd/healthcheck): make Warnings an object with { Code, Message } (#10950)
- Adds health.Message { code string, mesasge string }
- Refactors existing warnings []string to be of type []health.Message instead
2023-11-30 14:49:50 +00:00
4f9292859d feat(coderd/healthcheck): add access URL error codes and healthcheck doc (#10915)
Relates to #8965

- Added error codes for separate code paths in health checks
- Prefixed errors and warnings with error code prefixes
- Added a docs page with details on each code, cause and solution

Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2023-11-30 12:15:40 +00:00
2b574e2b2d feat: add dismissed property to the healthcheck section (#10940) 2023-11-29 16:37:40 +00:00
19b6d194fc feat: manage health settings using Coder API (#10861) 2023-11-28 18:15:17 +01:00
b73397e08c fix(site): add workspace proxy section to health page (#10862)
* Adds workspace proxy section to health page
* Conditionally places workspace proxy warnings in errors or warnings based on calculated severity
* Adds some more stories we were missing for HealthPage
2023-11-27 09:26:02 +00:00
411ce46442 feat(coderd/healthcheck): add health check for proxy (#10846)
Adds a health check for workspace proxies:
- Healthy iff all proxies are healthy and the same version,
- Warning if some proxies are unhealthy,
- Error if all proxies are unhealthy, or do not all have the same version.
2023-11-24 15:06:51 +00:00
b501046cf9 test: increase test coverage around health severity (#10858) 2023-11-24 15:42:17 +01:00
34841cf2b7 fix: healthcheck warnings should be empty array (#10856) 2023-11-24 12:37:07 +01:00
78df68348a feat: include health severity in reports (#10817) 2023-11-23 16:08:41 +01:00
8dd003ba5e fix: preserve order of node reports in healthcheck (#10835) 2023-11-22 11:15:11 +01:00
214123d476 test: skip flaky HealthyWithNodeDegraded (#10826) 2023-11-21 20:46:58 +01:00
048dc0450f feat: ensure coder remains healthy with single degraded DERP server (#10813) 2023-11-21 12:58:25 +01:00
3aef070959 fix: return non-null warning arrays in healthcheck (#10774) 2023-11-17 22:25:44 +00:00
8999d5785a feat: do not fail DERP healthcheck if WebSocket is used (#10714) 2023-11-17 16:00:49 +01:00
b69c237b8a feat(coderd/healthcheck): allow configuring database hc threshold (#10623)
* feat(coderd/healthcheck): allow configuring database hc threshold
* feat(coderd): add database hc latency, plumb through
* feat(coderd): allow configuring healthcheck refresh interval
2023-11-13 14:14:43 +00:00
c87deb868b fix: upgrade tailscale to fix STUN probes on dual stack (#10535)
Fixes STUN probe issues on dual stack systems by incorporating https://github.com/coder/tailscale/pull/43
2023-11-07 08:48:27 +04:00
39e3b049a5 refactor(coderd/healthcheck): move derp report to derphealth package (#9506)
This change helps remove one indirect use of coderd/database in the slim
CLI.

No size change (yet).

Ref: #9380
2023-09-04 21:41:50 +03:00
22e781eced chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path

go mod requires semantic versioning with versions greater than 1.x

This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```

Migrate generated files to import /v2

* Fix gen
2023-08-18 18:55:43 +00:00
bc862fa493 chore: upgrade tailscale to v1.46.1 (#8913) 2023-08-09 19:50:26 +00:00
8ee500c59d fix: generate typescript types for healthcheck pkg (#8846) 2023-08-03 16:20:46 -05:00
c575292ba6 fix: fix tailnet netcheck issues (#8802) 2023-08-02 01:50:43 +10:00
2f0a9996e7 chore: add derpserver to wsproxy, add proxies to derpmap (#7311) 2023-07-27 02:21:04 +10:00
b8a143566b fix: use *string instead of error in healthcheck response (#8234) 2023-06-27 19:13:54 +00:00
823127e761 feat: add healthcheck database section (#8060) 2023-06-20 15:13:22 +00:00