Skip to content

Commit 5bd1a6e

Browse files
committed
Merge branch 'main' into colorful-rebased
2 parents 467bd0d + 2947b82 commit 5bd1a6e

File tree

75 files changed

+3369
-1203
lines changed

Some content is hidden

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

75 files changed

+3369
-1203
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ helm/**/templates/*.yaml
8383
# Testdata shouldn't be formatted.
8484
scripts/apitypings/testdata/**/*.ts
8585
enterprise/tailnet/testdata/*.golden.html
86+
tailnet/testdata/*.golden.html
8687

8788
# Generated files shouldn't be formatted.
8889
site/e2e/provisionerGenerated.ts

.prettierignore.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ helm/**/templates/*.yaml
99
# Testdata shouldn't be formatted.
1010
scripts/apitypings/testdata/**/*.ts
1111
enterprise/tailnet/testdata/*.golden.html
12+
tailnet/testdata/*.golden.html
1213

1314
# Generated files shouldn't be formatted.
1415
site/e2e/provisionerGenerated.ts

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ update-golden-files: \
602602
scripts/ci-report/testdata/.gen-golden \
603603
enterprise/cli/testdata/.gen-golden \
604604
enterprise/tailnet/testdata/.gen-golden \
605+
tailnet/testdata/.gen-golden \
605606
coderd/.gen-golden \
606607
provisioner/terraform/testdata/.gen-golden
607608
.PHONY: update-golden-files
@@ -614,6 +615,10 @@ enterprise/cli/testdata/.gen-golden: $(wildcard enterprise/cli/testdata/*.golden
614615
go test ./enterprise/cli -run="TestEnterpriseCommandHelp" -update
615616
touch "$@"
616617

618+
tailnet/testdata/.gen-golden: $(wildcard tailnet/testdata/*.golden.html) $(GO_SRC_FILES) $(wildcard tailnet/*_test.go)
619+
go test ./tailnet -run="TestDebugTemplate" -update
620+
touch "$@"
621+
617622
enterprise/tailnet/testdata/.gen-golden: $(wildcard enterprise/tailnet/testdata/*.golden.html) $(GO_SRC_FILES) $(wildcard enterprise/tailnet/*_test.go)
618623
go test ./enterprise/tailnet -run="TestDebugTemplate" -update
619624
touch "$@"

coderd/apidoc/docs.go

Lines changed: 101 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 89 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/prometheus/client_golang/prometheus"
2626
httpSwagger "github.com/swaggo/http-swagger/v2"
2727
"go.opentelemetry.io/otel/trace"
28-
"golang.org/x/exp/slices"
2928
"golang.org/x/xerrors"
3029
"google.golang.org/api/idtoken"
3130
"storj.io/drpc/drpcmux"
@@ -408,30 +407,26 @@ func New(options *Options) *API {
408407

409408
if options.HealthcheckFunc == nil {
410409
options.HealthcheckFunc = func(ctx context.Context, apiKey string) *healthcheck.Report {
411-
dismissedHealthchecks := loadDismissedHealthchecks(ctx, options.Database, options.Logger)
410+
// NOTE: dismissed healthchecks are marked in formatHealthcheck.
411+
// Not here, as this result gets cached.
412412
return healthcheck.Run(ctx, &healthcheck.ReportOptions{
413413
Database: healthcheck.DatabaseReportOptions{
414414
DB: options.Database,
415415
Threshold: options.DeploymentValues.Healthcheck.ThresholdDatabase.Value(),
416-
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionDatabase),
417416
},
418417
Websocket: healthcheck.WebsocketReportOptions{
419418
AccessURL: options.AccessURL,
420419
APIKey: apiKey,
421-
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionWebsocket),
422420
},
423421
AccessURL: healthcheck.AccessURLReportOptions{
424422
AccessURL: options.AccessURL,
425-
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionAccessURL),
426423
},
427424
DerpHealth: derphealth.ReportOptions{
428-
DERPMap: api.DERPMap(),
429-
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionDERP),
425+
DERPMap: api.DERPMap(),
430426
},
431427
WorkspaceProxy: healthcheck.WorkspaceProxyReportOptions{
432428
CurrentVersion: buildinfo.Version(),
433429
WorkspaceProxiesFetchUpdater: *(options.WorkspaceProxiesFetchUpdater).Load(),
434-
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionWorkspaceProxy),
435430
},
436431
})
437432
}
@@ -660,14 +655,21 @@ func New(options *Options) *API {
660655
r.Get("/{fileID}", api.fileByID)
661656
r.Post("/", api.postFile)
662657
})
663-
r.Route("/external-auth/{externalauth}", func(r chi.Router) {
658+
r.Route("/external-auth", func(r chi.Router) {
664659
r.Use(
665660
apiKeyMiddleware,
666-
httpmw.ExtractExternalAuthParam(options.ExternalAuthConfigs),
667661
)
668-
r.Get("/", api.externalAuthByID)
669-
r.Post("/device", api.postExternalAuthDeviceByID)
670-
r.Get("/device", api.externalAuthDeviceByID)
662+
// Get without a specific external auth ID will return all external auths.
663+
r.Get("/", api.listUserExternalAuths)
664+
r.Route("/{externalauth}", func(r chi.Router) {
665+
r.Use(
666+
httpmw.ExtractExternalAuthParam(options.ExternalAuthConfigs),
667+
)
668+
r.Delete("/", api.deleteExternalAuthByID)
669+
r.Get("/", api.externalAuthByID)
670+
r.Post("/device", api.postExternalAuthDeviceByID)
671+
r.Get("/device", api.externalAuthDeviceByID)
672+
})
671673
})
672674
r.Route("/organizations", func(r chi.Router) {
673675
r.Use(

0 commit comments

Comments
 (0)