Skip to content

Commit c684b48

Browse files
committed
Merge branch 'main' into 10712-api-health-settings
2 parents beafecc + 6808dae commit c684b48

File tree

72 files changed

+765
-249
lines changed

Some content is hidden

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

72 files changed

+765
-249
lines changed

.github/dependabot.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ updates:
4444
update-types:
4545
- version-update:semver-patch
4646
groups:
47-
otel:
47+
go:
4848
patterns:
49-
- "go.nhat.io/otelsql"
50-
- "go.opentelemetry.io/otel*"
51-
golang-x:
52-
patterns:
53-
- "golang.org/x/*"
49+
- "*"
5450

5551
# Update our Dockerfile.
5652
- package-ecosystem: "docker"
@@ -94,26 +90,9 @@ updates:
9490
- version-update:semver-major
9591
open-pull-requests-limit: 15
9692
groups:
97-
react:
98-
patterns:
99-
- "react*"
100-
- "@types/react*"
101-
xterm:
102-
patterns:
103-
- "xterm*"
104-
mui:
105-
patterns:
106-
- "@mui*"
107-
storybook:
93+
site:
10894
patterns:
109-
- "@storybook*"
110-
- "storybook*"
111-
eslint:
112-
patterns:
113-
- "eslint*"
114-
- "@eslint*"
115-
- "@typescript-eslint/eslint-plugin"
116-
- "@typescript-eslint/parser"
95+
- "*"
11796

11897
- package-ecosystem: "npm"
11998
directory: "/offlinedocs/"
@@ -136,6 +115,10 @@ updates:
136115
- dependency-name: "@types/node"
137116
update-types:
138117
- version-update:semver-major
118+
groups:
119+
offlinedocs:
120+
patterns:
121+
- "*"
139122

140123
# Update dogfood.
141124
- package-ecosystem: "terraform"

.github/workflows/dogfood.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo "tag=${tag}" >> $GITHUB_OUTPUT
3939
4040
- name: Install Nix
41-
uses: DeterminateSystems/nix-installer-action@v7
41+
uses: DeterminateSystems/nix-installer-action@v8
4242

4343
- name: Run the Magic Nix Cache
4444
uses: DeterminateSystems/magic-nix-cache-action@v2

cli/cliui/prompt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func Prompt(inv *clibase.Invocation, opts PromptOptions) (string, error) {
7171
} else {
7272
renderedNo = Bold(ConfirmNo)
7373
}
74-
pretty.Fprintf(inv.Stdout, DefaultStyles.Placeholder, "(%s/%s)", renderedYes, renderedNo)
74+
pretty.Fprintf(inv.Stdout, DefaultStyles.Placeholder, "(%s/%s) ", renderedYes, renderedNo)
7575
} else if opts.Default != "" {
7676
_, _ = fmt.Fprint(inv.Stdout, pretty.Sprint(DefaultStyles.Placeholder, "("+opts.Default+") "))
7777
}

coderd/apidoc/docs.go

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 30 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,10 @@ func New(options *Options) *API {
978978
})
979979
})
980980
r.Get("/ws", (&healthcheck.WebsocketEchoServer{}).ServeHTTP)
981+
r.Route("/{user}", func(r chi.Router) {
982+
r.Use(httpmw.ExtractUserParam(options.Database))
983+
r.Get("/debug-link", api.userDebugOIDC)
984+
})
981985
})
982986
})
983987

coderd/coderdtest/oidctest/helper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package oidctest
22

33
import (
44
"database/sql"
5+
"encoding/json"
56
"net/http"
67
"testing"
78
"time"
@@ -77,6 +78,7 @@ func (*LoginHelper) ExpireOauthToken(t *testing.T, db database.Store, user *code
7778
OAuthExpiry: time.Now().Add(time.Hour * -1),
7879
UserID: link.UserID,
7980
LoginType: link.LoginType,
81+
DebugContext: json.RawMessage("{}"),
8082
})
8183
require.NoError(t, err, "expire user link")
8284

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ func (s *MethodTestSuite) TestUser() {
10221022
OAuthExpiry: link.OAuthExpiry,
10231023
UserID: link.UserID,
10241024
LoginType: link.LoginType,
1025+
DebugContext: json.RawMessage("{}"),
10251026
}).Asserts(link, rbac.ActionUpdate).Returns(link)
10261027
}))
10271028
s.Run("UpdateUserRoles", s.Subtest(func(db database.Store, check *expects) {

coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ func UserLink(t testing.TB, db database.Store, orig database.UserLink) database.
513513
OAuthRefreshToken: takeFirst(orig.OAuthRefreshToken, uuid.NewString()),
514514
OAuthRefreshTokenKeyID: takeFirst(orig.OAuthRefreshTokenKeyID, sql.NullString{}),
515515
OAuthExpiry: takeFirst(orig.OAuthExpiry, dbtime.Now().Add(time.Hour*24)),
516+
DebugContext: takeFirstSlice(orig.DebugContext, json.RawMessage("{}")),
516517
})
517518

518519
require.NoError(t, err, "insert link")

coderd/database/dbmem/dbmem.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5106,6 +5106,7 @@ func (q *FakeQuerier) InsertUserLink(_ context.Context, args database.InsertUser
51065106
OAuthRefreshToken: args.OAuthRefreshToken,
51075107
OAuthRefreshTokenKeyID: args.OAuthRefreshTokenKeyID,
51085108
OAuthExpiry: args.OAuthExpiry,
5109+
DebugContext: args.DebugContext,
51095110
}
51105111

51115112
q.userLinks = append(q.userLinks, link)
@@ -6188,6 +6189,7 @@ func (q *FakeQuerier) UpdateUserLink(_ context.Context, params database.UpdateUs
61886189
link.OAuthRefreshToken = params.OAuthRefreshToken
61896190
link.OAuthRefreshTokenKeyID = params.OAuthRefreshTokenKeyID
61906191
link.OAuthExpiry = params.OAuthExpiry
6192+
link.DebugContext = params.DebugContext
61916193

61926194
q.userLinks[i] = link
61936195
return link, nil

coderd/database/dump.sql

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
BEGIN;
2+
3+
ALTER TABLE user_links DROP COLUMN debug_context;
4+
5+
COMMIT;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BEGIN;
2+
3+
ALTER TABLE user_links ADD COLUMN debug_context jsonb DEFAULT '{}' NOT NULL;
4+
COMMENT ON COLUMN user_links.debug_context IS 'Debug information includes information like id_token and userinfo claims.';
5+
6+
COMMIT;

coderd/database/models.go

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

0 commit comments

Comments
 (0)