From 0135c15ab42050f4006d7afc91fb90ae5edbd057 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Tue, 9 May 2023 05:47:35 +0000 Subject: [PATCH 1/8] update slog --- go.mod | 12 +++++++----- go.sum | 23 ++++++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 48e2a3171e9a8..f549c963991b6 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ replace github.com/gliderlabs/ssh => github.com/coder/ssh v0.0.0-20230421140225- replace github.com/imulab/go-scim/pkg/v2 => github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 require ( - cdr.dev/slog v1.4.2 + cdr.dev/slog v1.5.0 cloud.google.com/go/compute/metadata v0.2.3 github.com/AlecAivazis/survey/v2 v2.3.5 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d @@ -67,7 +67,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.0 github.com/charmbracelet/charm v0.12.4 github.com/charmbracelet/glamour v0.6.0 - github.com/charmbracelet/lipgloss v0.6.0 + github.com/charmbracelet/lipgloss v0.7.1 github.com/cli/safeexec v1.0.0 github.com/codeclysm/extract v2.2.0+incompatible github.com/coder/flog v1.1.0 @@ -174,7 +174,10 @@ require ( tailscale.com v1.32.2 ) -require github.com/armon/go-radix v1.0.0 // indirect +require ( + github.com/armon/go-radix v1.0.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect +) require ( cloud.google.com/go/compute v1.18.0 // indirect @@ -194,7 +197,6 @@ require ( github.com/ammario/tlru v0.3.0 github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/aymanbagabas/go-osc52 v1.2.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/godartsass v0.16.0 // indirect @@ -290,7 +292,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/muesli/ansi v0.0.0-20221106050444-61f0cd9a192a // indirect github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/termenv v0.14.0 // indirect + github.com/muesli/termenv v0.15.1 // indirect github.com/niklasfasching/go-org v1.6.5 // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect diff --git a/go.sum b/go.sum index 144ef8c06f62f..322c878b78abc 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,18 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxo bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cdr.dev/slog v1.4.2 h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I= cdr.dev/slog v1.4.2/go.mod h1:0EkH+GkFNxizNR+GAXUEdUHanxUH5t9zqPILmPM/Vn8= +cdr.dev/slog v1.4.3-0.20230508170108-e2270d803ab4 h1:46GJ+IgfO12xjQw0Z4QMGARZaGnmsQcKB+mkeRdgyD0= +cdr.dev/slog v1.4.3-0.20230508170108-e2270d803ab4/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.4.3-0.20230508193536-cb746033dd15 h1:eP/v49eOzXAIoGvi0H32gyFRLzALNzX1AFh/8xVo7pw= +cdr.dev/slog v1.4.3-0.20230508193536-cb746033dd15/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.4.3-0.20230508194130-c2245fa86cfa h1:t9BtbN3O+pf13SjmzlR1C2QL9iItIZet1qGumH9t81Q= +cdr.dev/slog v1.4.3-0.20230508194130-c2245fa86cfa/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.4.3-0.20230508220619-08be77ee712d h1:oUgdhfseCY0RkkopBipYrdiwpyYJwSkVkACucs7t1Ps= +cdr.dev/slog v1.4.3-0.20230508220619-08be77ee712d/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6 h1:0yXyAI+9SDEfpi0nnu8wPL6Oor0iCeAwWaZICLLIXmg= +cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.0 h1:JE8gZeRLNb8wHj9PGR5IxuIx2eoa4vVB9Y2XCaOHJ+c= +cdr.dev/slog v1.5.0/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -228,8 +240,9 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= -github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTxab9L4E= github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= @@ -291,8 +304,9 @@ github.com/charmbracelet/charm v0.12.4/go.mod h1:BOvE692iyhnFctYs6Es3gb7xjx/JBgK github.com/charmbracelet/glamour v0.6.0 h1:wi8fse3Y7nfcabbbDuwolqTqMQPMnVPeZhDM273bISc= github.com/charmbracelet/glamour v0.6.0/go.mod h1:taqWV4swIMMbWALc0m7AfE9JkPSU8om2538k9ITBxOc= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= -github.com/charmbracelet/lipgloss v0.6.0 h1:1StyZB9vBSOyuZxQUcUwGr17JmojPNm87inij9N3wJY= github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= +github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= +github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -1291,8 +1305,9 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= -github.com/muesli/termenv v0.14.0 h1:8x9NFfOe8lmIWK4pgy3IfVEy47f+ppe3tUqdPZG2Uy0= github.com/muesli/termenv v0.14.0/go.mod h1:kG/pF1E7fh949Xhe156crRUrHNyK221IuGO7Ez60Uc8= +github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs= +github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= @@ -2634,7 +2649,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZa sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= software.sslmate.com/src/go-pkcs12 v0.2.0 h1:nlFkj7bTysH6VkC4fGphtjXRbezREPgrHuJG20hBGPE= -storj.io/drpc v0.0.33-0.20220622181519-9206537a4db7 h1:6jIp39oQGZMjfrG3kiafK2tcL0Fbprh2kvaoJNfhvuM= -storj.io/drpc v0.0.33-0.20220622181519-9206537a4db7/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.33-0.20230420154621-9716137f6037 h1:SYRl2YUthhsXNkrP30KwxkDGN9TESdNrbpr14rOxsnM= storj.io/drpc v0.0.33-0.20230420154621-9716137f6037/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= From 4d3ff5fbead1dbc7d3f54f31a0ba08df607fb99a Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Tue, 9 May 2023 05:55:06 +0000 Subject: [PATCH 2/8] As a rule, our INFO log statements should be curated So no JSON-dumped complex objects like the workspaceAgent --- coderd/workspaceagents.go | 7 ++++++- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/coderd/workspaceagents.go b/coderd/workspaceagents.go index e6ffa5d4d6ef9..6028336892864 100644 --- a/coderd/workspaceagents.go +++ b/coderd/workspaceagents.go @@ -930,7 +930,12 @@ func (api *API) workspaceAgentCoordinate(rw http.ResponseWriter, r *http.Request } api.publishWorkspaceUpdate(ctx, build.WorkspaceID) - api.Logger.Info(ctx, "accepting agent", slog.F("agent", workspaceAgent)) + api.Logger.Info(ctx, "accepting agent", + slog.F("owner", owner.Username), + slog.F("workspace", workspace.Name), + slog.F("name", workspaceAgent.Name), + ) + api.Logger.Debug(ctx, "accepting agent details", slog.F("agent", workspaceAgent)) defer conn.Close(websocket.StatusNormalClosure, "") diff --git a/go.mod b/go.mod index f549c963991b6..3dca3d1ec35b9 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ replace github.com/gliderlabs/ssh => github.com/coder/ssh v0.0.0-20230421140225- replace github.com/imulab/go-scim/pkg/v2 => github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 require ( - cdr.dev/slog v1.5.0 + cdr.dev/slog v1.5.1 cloud.google.com/go/compute/metadata v0.2.3 github.com/AlecAivazis/survey/v2 v2.3.5 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d diff --git a/go.sum b/go.sum index 322c878b78abc..01e057273fdb9 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6 h1:0yXyAI+9SDEfpi0nnu8wPL6Oor0 cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cdr.dev/slog v1.5.0 h1:JE8gZeRLNb8wHj9PGR5IxuIx2eoa4vVB9Y2XCaOHJ+c= cdr.dev/slog v1.5.0/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.1 h1:C5YF6oMdmTfx/pClpqJ15KebRkMpA/mC0XltolKLMkA= +cdr.dev/slog v1.5.1/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= From fbcbae339173f5a13fa6eab477c10c68491949ab Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Tue, 9 May 2023 19:20:17 +0000 Subject: [PATCH 3/8] update slog --- go.mod | 2 +- go.sum | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 3dca3d1ec35b9..640b772138572 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ replace github.com/gliderlabs/ssh => github.com/coder/ssh v0.0.0-20230421140225- replace github.com/imulab/go-scim/pkg/v2 => github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 require ( - cdr.dev/slog v1.5.1 + cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527 cloud.google.com/go/compute/metadata v0.2.3 github.com/AlecAivazis/survey/v2 v2.3.5 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d diff --git a/go.sum b/go.sum index 01e057273fdb9..45b5fc6a5a599 100644 --- a/go.sum +++ b/go.sum @@ -16,6 +16,12 @@ cdr.dev/slog v1.5.0 h1:JE8gZeRLNb8wHj9PGR5IxuIx2eoa4vVB9Y2XCaOHJ+c= cdr.dev/slog v1.5.0/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cdr.dev/slog v1.5.1 h1:C5YF6oMdmTfx/pClpqJ15KebRkMpA/mC0XltolKLMkA= cdr.dev/slog v1.5.1/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.2-0.20230509173507-03bf4da4a744 h1:xWKXHTmOeIPxeNHRhoVemsodkYm0+vQ7CfsWeZ/BBsM= +cdr.dev/slog v1.5.2-0.20230509173507-03bf4da4a744/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.2-0.20230509191652-98d62418e159 h1:PrKPbwgGa3KsPh6gFDOdNgVvNq3UnlIZ+jCZJRHdzuw= +cdr.dev/slog v1.5.2-0.20230509191652-98d62418e159/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527 h1:SBLSl7XGaxD0Vmky3XckmtxllYsohbby5CNBI/MIT/U= +cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= From 40cf95c7e0c37ab504dd773d4bc5838c72e8113a Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 10 May 2023 00:34:36 +0000 Subject: [PATCH 4/8] go mod tidy --- go.sum | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/go.sum b/go.sum index 45b5fc6a5a599..0446c78d73b69 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,5 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= -cdr.dev/slog v1.4.2 h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I= -cdr.dev/slog v1.4.2/go.mod h1:0EkH+GkFNxizNR+GAXUEdUHanxUH5t9zqPILmPM/Vn8= -cdr.dev/slog v1.4.3-0.20230508170108-e2270d803ab4 h1:46GJ+IgfO12xjQw0Z4QMGARZaGnmsQcKB+mkeRdgyD0= -cdr.dev/slog v1.4.3-0.20230508170108-e2270d803ab4/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.4.3-0.20230508193536-cb746033dd15 h1:eP/v49eOzXAIoGvi0H32gyFRLzALNzX1AFh/8xVo7pw= -cdr.dev/slog v1.4.3-0.20230508193536-cb746033dd15/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.4.3-0.20230508194130-c2245fa86cfa h1:t9BtbN3O+pf13SjmzlR1C2QL9iItIZet1qGumH9t81Q= -cdr.dev/slog v1.4.3-0.20230508194130-c2245fa86cfa/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.4.3-0.20230508220619-08be77ee712d h1:oUgdhfseCY0RkkopBipYrdiwpyYJwSkVkACucs7t1Ps= -cdr.dev/slog v1.4.3-0.20230508220619-08be77ee712d/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6 h1:0yXyAI+9SDEfpi0nnu8wPL6Oor0iCeAwWaZICLLIXmg= -cdr.dev/slog v1.4.3-0.20230509013323-fbe4576b00f6/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.5.0 h1:JE8gZeRLNb8wHj9PGR5IxuIx2eoa4vVB9Y2XCaOHJ+c= -cdr.dev/slog v1.5.0/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.5.1 h1:C5YF6oMdmTfx/pClpqJ15KebRkMpA/mC0XltolKLMkA= -cdr.dev/slog v1.5.1/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.5.2-0.20230509173507-03bf4da4a744 h1:xWKXHTmOeIPxeNHRhoVemsodkYm0+vQ7CfsWeZ/BBsM= -cdr.dev/slog v1.5.2-0.20230509173507-03bf4da4a744/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= -cdr.dev/slog v1.5.2-0.20230509191652-98d62418e159 h1:PrKPbwgGa3KsPh6gFDOdNgVvNq3UnlIZ+jCZJRHdzuw= -cdr.dev/slog v1.5.2-0.20230509191652-98d62418e159/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527 h1:SBLSl7XGaxD0Vmky3XckmtxllYsohbby5CNBI/MIT/U= cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= From c35cfd7f2c5aaa526766ea502520104f63ca6c81 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 10 May 2023 00:56:51 +0000 Subject: [PATCH 5/8] Update slog --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 640b772138572..06de2b34f926e 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ replace github.com/gliderlabs/ssh => github.com/coder/ssh v0.0.0-20230421140225- replace github.com/imulab/go-scim/pkg/v2 => github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 require ( - cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527 + cdr.dev/slog v1.5.3 cloud.google.com/go/compute/metadata v0.2.3 github.com/AlecAivazis/survey/v2 v2.3.5 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d diff --git a/go.sum b/go.sum index 0446c78d73b69..bce1d5a1364f1 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= -cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527 h1:SBLSl7XGaxD0Vmky3XckmtxllYsohbby5CNBI/MIT/U= -cdr.dev/slog v1.5.2-0.20230509205428-ec11fd461527/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= +cdr.dev/slog v1.5.3 h1:Ry3RZLX6r1/n7Yud9K9Wz7h230VWKxl8m/COPmnWIyM= +cdr.dev/slog v1.5.3/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= From 55fb725cfec2c87149c6dd54a85b1079a01ff683 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 10 May 2023 15:31:44 +0000 Subject: [PATCH 6/8] Improve audit_log formatting --- enterprise/audit/backends/slog.go | 12 ++++++++---- go.mod | 10 +++++----- go.sum | 31 ++++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/enterprise/audit/backends/slog.go b/enterprise/audit/backends/slog.go index c4c67c0932a0d..2c1302563acb1 100644 --- a/enterprise/audit/backends/slog.go +++ b/enterprise/audit/backends/slog.go @@ -23,10 +23,14 @@ func (slogBackend) Decision() audit.FilterDecision { } func (b slogBackend) Export(ctx context.Context, alog database.AuditLog) error { - m := structs.Map(alog) - fields := make([]slog.Field, 0, len(m)) - for k, v := range m { - fields = append(fields, slog.F(k, v)) + // We don't use structs.Map because we don't want to recursively convert + // fields into maps. When we keep the type information, slog can more + // pleasantly format the output. For example, the clean result of + // (*NullString).Value() may be printed instead of {String: "foo", Valid: true}. + sfs := structs.Fields(alog) + var fields []slog.Field + for _, sf := range sfs { + fields = append(fields, slog.F(sf.Name(), sf.Value())) } b.log.Info(ctx, "audit_log", fields...) diff --git a/go.mod b/go.mod index 06de2b34f926e..c9ce86f97695a 100644 --- a/go.mod +++ b/go.mod @@ -86,7 +86,7 @@ require ( github.com/gen2brain/beeep v0.0.0-20220402123239-6a3042f4b71a github.com/gliderlabs/ssh v0.3.4 github.com/go-chi/chi v1.5.4 - github.com/go-chi/chi/v5 v5.0.7 + github.com/go-chi/chi/v5 v5.0.8 github.com/go-chi/httprate v0.7.1 github.com/go-chi/render v1.0.1 github.com/go-jose/go-jose/v3 v3.0.0 @@ -116,7 +116,7 @@ require ( github.com/kirsle/configdir v0.0.0-20170128060238-e45d2f54772f github.com/klauspost/compress v1.16.3 github.com/lib/pq v1.10.6 - github.com/mattn/go-isatty v0.0.17 + github.com/mattn/go-isatty v0.0.18 github.com/mitchellh/go-wordwrap v1.0.1 github.com/mitchellh/mapstructure v1.5.0 github.com/moby/moby v20.10.23+incompatible @@ -158,11 +158,11 @@ require ( golang.org/x/mod v0.10.0 golang.org/x/oauth2 v0.5.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.7.0 + golang.org/x/sys v0.8.0 golang.org/x/term v0.7.0 golang.org/x/tools v0.6.0 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 - golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675 + golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b google.golang.org/api v0.108.0 google.golang.org/grpc v1.54.0 google.golang.org/protobuf v1.28.2-0.20230118093459-a9481185b34d @@ -305,7 +305,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect - github.com/rivo/uniseg v0.4.3 // indirect + github.com/rivo/uniseg v0.4.4 // indirect github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/cast v1.5.0 // indirect diff --git a/go.sum b/go.sum index bce1d5a1364f1..def9fb2dac3d7 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +cdr.dev/slog v1.4.1 h1:Q8+X63m8/WB4geelMTDO8t4CTwVh1f7+5Cxi7kS/SZg= +cdr.dev/slog v1.4.1/go.mod h1:O76C6gZJxa5HK1SXMrjd48V2kJxYZKFRTcFfn/V9OhA= cdr.dev/slog v1.5.3 h1:Ry3RZLX6r1/n7Yud9K9Wz7h230VWKxl8m/COPmnWIyM= cdr.dev/slog v1.5.3/go.mod h1:vW6Q4gGoDZSb4Db2wxAZoUba/HRUpen1g0fCu06zrjQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -159,8 +161,13 @@ github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVb github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A= github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/chroma v0.9.1/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= +github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -485,6 +492,7 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -554,6 +562,7 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= @@ -599,8 +608,8 @@ github.com/github/fakeca v0.1.0 h1:Km/MVOFvclqxPM9dZBC4+QE564nU4gz4iZ0D9pMw28I= github.com/github/fakeca v0.1.0/go.mod h1:+bormgoGMMuamOscx7N91aOuUST7wdaJ2rNjeohylyo= github.com/go-chi/chi v1.5.4 h1:QHdzF2szwjqVV4wmByUnTcsbIg7UGaQ0tPF2t5GcAIs= github.com/go-chi/chi v1.5.4/go.mod h1:uaf8YgoFazUOkPBG7fxPftUylNumIev9awIWOENIuEg= -github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8= -github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= +github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/httprate v0.7.1 h1:d5kXARdms2PREQfU4pHvq44S6hJ1hPu4OXLeBKmCKWs= github.com/go-chi/httprate v0.7.1/go.mod h1:6GOYBSwnpra4CQfAKXu8sQZg+nZ0M1g9QnyFvxrAB8A= github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= @@ -1169,6 +1178,7 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -1183,8 +1193,9 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1461,8 +1472,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qq github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -2049,6 +2060,7 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2141,8 +2153,9 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2271,8 +2284,8 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3j golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg= golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= -golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675 h1:/J/RVnr7ng4fWPRH3xa4WtBJ1Jp+Auu4YNLmGiPv5QU= -golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675/go.mod h1:whfbyDBt09xhCYQWtO2+3UVjlaq6/9hDZrjg2ZE6SyA= +golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b h1:J1CaxgLerRR5lgx3wnr6L04cJFbWoceSK9JWBdglINo= +golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230215201556-9c5414ab4bde h1:ybF7AMzIUikL9x4LgwEmzhXtzRpKNqngme1VGDWz+Nk= golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230215201556-9c5414ab4bde/go.mod h1:mQqgjkW8GQQcJQsbBvK890TKqUK1DfKWkuBGbOkuMHQ= golang.zx2c4.com/wireguard/windows v0.5.3 h1:On6j2Rpn3OEMXqBq00QEDC7bWSZrPIHKIus8eIuExIE= From fd3d9b77c3ebe31e3b1c39998f7264df22721301 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 10 May 2023 15:49:30 +0000 Subject: [PATCH 7/8] Update golden files --- cli/testdata/coder_--help.golden | 8 ++--- cli/testdata/coder_agent_--help.golden | 2 +- cli/testdata/coder_config-ssh_--help.golden | 6 ++-- cli/testdata/coder_create_--help.golden | 2 +- cli/testdata/coder_delete_--help.golden | 2 +- cli/testdata/coder_dotfiles_--help.golden | 4 +-- cli/testdata/coder_list_--help.golden | 2 +- cli/testdata/coder_login_--help.golden | 2 +- cli/testdata/coder_logout_--help.golden | 2 +- cli/testdata/coder_ping_--help.golden | 2 +- cli/testdata/coder_port-forward_--help.golden | 10 +++--- cli/testdata/coder_publickey_--help.golden | 2 +- cli/testdata/coder_rename_--help.golden | 2 +- .../coder_reset-password_--help.golden | 2 +- cli/testdata/coder_restart_--help.golden | 2 +- cli/testdata/coder_scaletest_--help.golden | 2 +- .../coder_scaletest_cleanup_--help.golden | 2 +- ..._scaletest_create-workspaces_--help.golden | 2 +- ..._scaletest_workspace-traffic_--help.golden | 2 +- cli/testdata/coder_schedule_--help.golden | 2 +- ...coder_schedule_override-stop_--help.golden | 2 +- .../coder_schedule_start_--help.golden | 2 +- .../coder_schedule_stop_--help.golden | 2 +- cli/testdata/coder_server_--help.golden | 36 +++++++++---------- ...der_server_create-admin-user_--help.golden | 2 +- ...erver_postgres-builtin-serve_--help.golden | 2 +- ..._server_postgres-builtin-url_--help.golden | 2 +- cli/testdata/coder_speedtest_--help.golden | 2 +- cli/testdata/coder_ssh_--help.golden | 2 +- cli/testdata/coder_start_--help.golden | 2 +- cli/testdata/coder_state_--help.golden | 2 +- cli/testdata/coder_state_pull_--help.golden | 2 +- cli/testdata/coder_state_push_--help.golden | 2 +- cli/testdata/coder_stop_--help.golden | 2 +- cli/testdata/coder_templates_--help.golden | 8 ++--- .../coder_templates_create_--help.golden | 2 +- .../coder_templates_delete_--help.golden | 2 +- .../coder_templates_edit_--help.golden | 2 +- .../coder_templates_init_--help.golden | 2 +- .../coder_templates_list_--help.golden | 2 +- .../coder_templates_pull_--help.golden | 2 +- .../coder_templates_push_--help.golden | 2 +- .../coder_templates_versions_--help.golden | 4 +-- ...oder_templates_versions_list_--help.golden | 2 +- cli/testdata/coder_tokens_--help.golden | 8 ++--- .../coder_tokens_create_--help.golden | 2 +- cli/testdata/coder_tokens_list_--help.golden | 2 +- cli/testdata/coder_update_--help.golden | 2 +- cli/testdata/coder_users_--help.golden | 2 +- .../coder_users_activate_--help.golden | 4 +-- cli/testdata/coder_users_create_--help.golden | 2 +- cli/testdata/coder_users_list_--help.golden | 2 +- cli/testdata/coder_users_show_--help.golden | 4 +-- .../coder_users_suspend_--help.golden | 4 +-- cli/testdata/coder_version_--help.golden | 2 +- go.mod | 2 ++ go.sum | 13 ++----- 57 files changed, 96 insertions(+), 103 deletions(-) diff --git a/cli/testdata/coder_--help.golden b/cli/testdata/coder_--help.golden index cca6cf17b352b..d54145782c214 100644 --- a/cli/testdata/coder_--help.golden +++ b/cli/testdata/coder_--help.golden @@ -3,13 +3,13 @@ Usage: coder [global-flags] Coder v0.0.0-devel — A tool for provisioning self-hosted development environments with Terraform. - Start a Coder server: - $ coder server + $ coder server - Get started by creating a template from an example: - $ coder templates init + $ coder templates init -Subcommands +Subcommands config-ssh Add an SSH Host entry for your workspaces "ssh coder.workspace" create Create a workspace @@ -43,7 +43,7 @@ Coder v0.0.0-devel — A tool for provisioning self-hosted development environme users Manage users version Show coder version -Global Options +Global Options Global options are applied to all commands. They can be set using environment variables or flags. diff --git a/cli/testdata/coder_agent_--help.golden b/cli/testdata/coder_agent_--help.golden index 5b9e6f394076e..1da8df81b4641 100644 --- a/cli/testdata/coder_agent_--help.golden +++ b/cli/testdata/coder_agent_--help.golden @@ -2,7 +2,7 @@ Usage: coder agent [flags] Starts the Coder workspace agent. -Options +Options --auth string, $CODER_AGENT_AUTH (default: token) Specify the authentication type to use for the agent. diff --git a/cli/testdata/coder_config-ssh_--help.golden b/cli/testdata/coder_config-ssh_--help.golden index 8fa97d85ca0f3..18dadf18e0a83 100644 --- a/cli/testdata/coder_config-ssh_--help.golden +++ b/cli/testdata/coder_config-ssh_--help.golden @@ -5,13 +5,13 @@ Add an SSH Host entry for your workspaces "ssh coder.workspace" - You can use -o (or --ssh-option) so set SSH options to be used for all your workspaces: - $ coder config-ssh -o ForwardAgent=yes + $ coder config-ssh -o ForwardAgent=yes - You can use --dry-run (or -n) to see the changes that would be made: - $ coder config-ssh --dry-run + $ coder config-ssh --dry-run -Options +Options -n, --dry-run bool, $CODER_SSH_DRY_RUN Perform a trial run with no changes made, showing a diff at the end. diff --git a/cli/testdata/coder_create_--help.golden b/cli/testdata/coder_create_--help.golden index 31d1ab68d005c..33359f1425f98 100644 --- a/cli/testdata/coder_create_--help.golden +++ b/cli/testdata/coder_create_--help.golden @@ -2,7 +2,7 @@ Usage: coder create [flags] [name] Create a workspace -Options +Options --parameter-file string, $CODER_PARAMETER_FILE Specify a file path with parameter values. diff --git a/cli/testdata/coder_delete_--help.golden b/cli/testdata/coder_delete_--help.golden index ff9fee6b77e7e..781e9ece1411b 100644 --- a/cli/testdata/coder_delete_--help.golden +++ b/cli/testdata/coder_delete_--help.golden @@ -4,7 +4,7 @@ Delete a workspace Aliases: rm -Options +Options --orphan bool Delete a workspace without deleting its resources. This can delete a workspace in a broken state, but may also lead to unaccounted cloud diff --git a/cli/testdata/coder_dotfiles_--help.golden b/cli/testdata/coder_dotfiles_--help.golden index 8b3ca813ae4ae..2eb2b78a068f3 100644 --- a/cli/testdata/coder_dotfiles_--help.golden +++ b/cli/testdata/coder_dotfiles_--help.golden @@ -4,9 +4,9 @@ Personalize your workspace by applying a canonical dotfiles repository - Check out and install a dotfiles repository without prompts: - $ coder dotfiles --yes git@github.com:example/dotfiles.git + $ coder dotfiles --yes git@github.com:example/dotfiles.git -Options +Options --symlink-dir string, $CODER_SYMLINK_DIR Specifies the directory for the dotfiles symlink destinations. If empty, will use $HOME. diff --git a/cli/testdata/coder_list_--help.golden b/cli/testdata/coder_list_--help.golden index dfd7e69fcebfc..68cb553831e18 100644 --- a/cli/testdata/coder_list_--help.golden +++ b/cli/testdata/coder_list_--help.golden @@ -4,7 +4,7 @@ List workspaces Aliases: ls -Options +Options -a, --all bool Specifies whether all workspaces will be listed or not. diff --git a/cli/testdata/coder_login_--help.golden b/cli/testdata/coder_login_--help.golden index 7169b369fce1d..7fdd1bb438cd8 100644 --- a/cli/testdata/coder_login_--help.golden +++ b/cli/testdata/coder_login_--help.golden @@ -2,7 +2,7 @@ Usage: coder login [flags] Authenticate with Coder deployment -Options +Options --first-user-email string, $CODER_FIRST_USER_EMAIL Specifies an email address to use if creating the first user for the deployment. diff --git a/cli/testdata/coder_logout_--help.golden b/cli/testdata/coder_logout_--help.golden index 6fb9b92e4276d..31b22eddf64dc 100644 --- a/cli/testdata/coder_logout_--help.golden +++ b/cli/testdata/coder_logout_--help.golden @@ -2,7 +2,7 @@ Usage: coder logout [flags] Unauthenticate your local session -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_ping_--help.golden b/cli/testdata/coder_ping_--help.golden index 55e5df16dbf6b..51d5daa863242 100644 --- a/cli/testdata/coder_ping_--help.golden +++ b/cli/testdata/coder_ping_--help.golden @@ -2,7 +2,7 @@ Usage: coder ping [flags] Ping a workspace -Options +Options -n, --num int (default: 10) Specifies the number of pings to perform. diff --git a/cli/testdata/coder_port-forward_--help.golden b/cli/testdata/coder_port-forward_--help.golden index d9340fc20f942..363328deb924b 100644 --- a/cli/testdata/coder_port-forward_--help.golden +++ b/cli/testdata/coder_port-forward_--help.golden @@ -7,22 +7,22 @@ Aliases: tunnel - Port forward a single TCP port from 1234 in the workspace to port 5678 on your local machine: - $ coder port-forward --tcp 5678:1234 + $ coder port-forward --tcp 5678:1234 - Port forward a single UDP port from port 9000 to port 9000 on your local machine: - $ coder port-forward --udp 9000 + $ coder port-forward --udp 9000 - Port forward multiple TCP ports and a UDP port: - $ coder port-forward --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53 + $ coder port-forward --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53 - Port forward multiple ports (TCP or UDP) in condensed syntax: - $ coder port-forward --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012 + $ coder port-forward --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012 -Options +Options -p, --tcp string-array, $CODER_PORT_FORWARD_TCP Forward TCP port(s) from the workspace to the local machine. diff --git a/cli/testdata/coder_publickey_--help.golden b/cli/testdata/coder_publickey_--help.golden index d6f99f3da7c2a..8b041d3dbe88b 100644 --- a/cli/testdata/coder_publickey_--help.golden +++ b/cli/testdata/coder_publickey_--help.golden @@ -4,7 +4,7 @@ Output your Coder public key used for Git operations Aliases: pubkey -Options +Options --reset bool Regenerate your public key. This will require updating the key on any services it's registered with. diff --git a/cli/testdata/coder_rename_--help.golden b/cli/testdata/coder_rename_--help.golden index 297e96c4b6521..19c9e4f0c111a 100644 --- a/cli/testdata/coder_rename_--help.golden +++ b/cli/testdata/coder_rename_--help.golden @@ -2,7 +2,7 @@ Usage: coder rename [flags] Rename a workspace -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_reset-password_--help.golden b/cli/testdata/coder_reset-password_--help.golden index 198025681d5e2..bb80f50135a25 100644 --- a/cli/testdata/coder_reset-password_--help.golden +++ b/cli/testdata/coder_reset-password_--help.golden @@ -2,7 +2,7 @@ Usage: coder reset-password [flags] Directly connect to the database to reset a user's password -Options +Options --postgres-url string, $CODER_PG_CONNECTION_URL URL of a PostgreSQL database to connect to. diff --git a/cli/testdata/coder_restart_--help.golden b/cli/testdata/coder_restart_--help.golden index 828230987f114..fe99287e2e56c 100644 --- a/cli/testdata/coder_restart_--help.golden +++ b/cli/testdata/coder_restart_--help.golden @@ -2,7 +2,7 @@ Usage: coder restart [flags] Restart a workspace -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_scaletest_--help.golden b/cli/testdata/coder_scaletest_--help.golden index 6ab343cd33377..57d1984ff10ff 100644 --- a/cli/testdata/coder_scaletest_--help.golden +++ b/cli/testdata/coder_scaletest_--help.golden @@ -2,7 +2,7 @@ Usage: coder scaletest Run a scale test against the Coder API -Subcommands +Subcommands cleanup Cleanup scaletest workspaces, then cleanup scaletest users. create-workspaces Creates many users, then creates a workspace for each diff --git a/cli/testdata/coder_scaletest_cleanup_--help.golden b/cli/testdata/coder_scaletest_cleanup_--help.golden index e14e854459064..caed62948b31d 100644 --- a/cli/testdata/coder_scaletest_cleanup_--help.golden +++ b/cli/testdata/coder_scaletest_cleanup_--help.golden @@ -4,7 +4,7 @@ Cleanup scaletest workspaces, then cleanup scaletest users. The strategy flags will apply to each stage of the cleanup process. -Options +Options --cleanup-concurrency int, $CODER_SCALETEST_CLEANUP_CONCURRENCY (default: 1) Number of concurrent cleanup jobs to run. 0 means unlimited. diff --git a/cli/testdata/coder_scaletest_create-workspaces_--help.golden b/cli/testdata/coder_scaletest_create-workspaces_--help.golden index 568cf3da72f5d..6fcfa2b3eb267 100644 --- a/cli/testdata/coder_scaletest_create-workspaces_--help.golden +++ b/cli/testdata/coder_scaletest_create-workspaces_--help.golden @@ -6,7 +6,7 @@ workspace, and connects to the workspace over WireGuard. It is recommended that all rate limits are disabled on the server before running this scaletest. This test generates many login events which will be rate limited against the (most likely single) IP. -Options +Options --cleanup-concurrency int, $CODER_SCALETEST_CLEANUP_CONCURRENCY (default: 1) Number of concurrent cleanup jobs to run. 0 means unlimited. diff --git a/cli/testdata/coder_scaletest_workspace-traffic_--help.golden b/cli/testdata/coder_scaletest_workspace-traffic_--help.golden index b7de6ca960e97..f425a5682d9a1 100644 --- a/cli/testdata/coder_scaletest_workspace-traffic_--help.golden +++ b/cli/testdata/coder_scaletest_workspace-traffic_--help.golden @@ -2,7 +2,7 @@ Usage: coder scaletest workspace-traffic [flags] Generate traffic to scaletest workspaces through coderd -Options +Options --bytes-per-tick int, $CODER_SCALETEST_WORKSPACE_TRAFFIC_BYTES_PER_TICK (default: 1024) How much traffic to generate per tick. diff --git a/cli/testdata/coder_schedule_--help.golden b/cli/testdata/coder_schedule_--help.golden index b9e8d46588c7d..d367d6b0daf5f 100644 --- a/cli/testdata/coder_schedule_--help.golden +++ b/cli/testdata/coder_schedule_--help.golden @@ -2,7 +2,7 @@ Usage: coder schedule { show | start | stop | override } Schedule automated start and stop times for workspaces -Subcommands +Subcommands override-stop Override the stop time of a currently running workspace instance. show Show workspace schedule diff --git a/cli/testdata/coder_schedule_override-stop_--help.golden b/cli/testdata/coder_schedule_override-stop_--help.golden index 102e7fd9329b2..74785cf594f82 100644 --- a/cli/testdata/coder_schedule_override-stop_--help.golden +++ b/cli/testdata/coder_schedule_override-stop_--help.golden @@ -6,7 +6,7 @@ Override the stop time of a currently running workspace instance. * The new stop time must be at least 30 minutes in the future. * The workspace template may restrict the maximum workspace runtime. - $ coder schedule override-stop my-workspace 90m + $ coder schedule override-stop my-workspace 90m --- Run `coder --help` for a list of global options. diff --git a/cli/testdata/coder_schedule_start_--help.golden b/cli/testdata/coder_schedule_start_--help.golden index 73d661de70987..2d2d151ff7d61 100644 --- a/cli/testdata/coder_schedule_start_--help.golden +++ b/cli/testdata/coder_schedule_start_--help.golden @@ -14,7 +14,7 @@ Schedule format: [day-of-week] [location]. - Set the workspace to start at 9:30am (in Dublin) from Monday to Friday: - $ coder schedule start my-workspace 9:30AM Mon-Fri Europe/Dublin + $ coder schedule start my-workspace 9:30AM Mon-Fri Europe/Dublin --- Run `coder --help` for a list of global options. diff --git a/cli/testdata/coder_schedule_stop_--help.golden b/cli/testdata/coder_schedule_stop_--help.golden index 14cd6cac9f2f7..d132bbff582f0 100644 --- a/cli/testdata/coder_schedule_stop_--help.golden +++ b/cli/testdata/coder_schedule_stop_--help.golden @@ -15,7 +15,7 @@ When enabling scheduled stop, enter a duration in one of the following formats: * 2m (2 minutes) * 2 (2 minutes) - $ coder schedule stop my-workspace 2h30m + $ coder schedule stop my-workspace 2h30m --- Run `coder --help` for a list of global options. diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index 6e3de2eabfae5..7be907aa52695 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -2,7 +2,7 @@ Usage: coder server [flags] Start a Coder server -Subcommands +Subcommands create-admin-user Create a new admin user with the given username, email and password and adds it to every organization. @@ -10,7 +10,7 @@ Start a Coder server postgres-builtin-url Output the connection URL for the built-in PostgreSQL deployment. -Options +Options --cache-dir string, $CODER_CACHE_DIRECTORY (default: [cache dir]) The directory to cache temporary files. If unspecified and $CACHE_DIRECTORY is set, it will be used for compatibility with @@ -50,7 +50,7 @@ Start a Coder server Periodically check for new releases of Coder and inform the owner. The check is performed once per day. -Client Options +Client Options These options change the behavior of how clients interact with the Coder. Clients include the coder cli, vs code extension, and the web UI. @@ -63,7 +63,7 @@ Clients include the coder cli, vs code extension, and the web UI. --ssh-hostname-prefix string, $CODER_SSH_HOSTNAME_PREFIX (default: coder.) The SSH deployment prefix is used in the Host of the ssh config. -Config Options +Config Options Use a YAML configuration file when your server launch become unwieldy. -c, --config yaml-config-path, $CODER_CONFIG_PATH @@ -73,7 +73,7 @@ Use a YAML configuration file when your server launch become unwieldy. Write out the current server config as YAML to stdout. -Introspection / Logging Options +Introspection / Logging Options --log-human string, $CODER_LOGGING_HUMAN (default: /dev/stderr) Output human-readable logs to a given file. @@ -86,7 +86,7 @@ Use a YAML configuration file when your server launch become unwieldy. -v, --verbose bool, $CODER_VERBOSE Output debug-level logs. -Introspection / Prometheus Options +Introspection / Prometheus Options --prometheus-address host:port, $CODER_PROMETHEUS_ADDRESS (default: 127.0.0.1:2112) The bind address to serve prometheus metrics. @@ -96,7 +96,7 @@ Use a YAML configuration file when your server launch become unwieldy. --prometheus-enable bool, $CODER_PROMETHEUS_ENABLE Serve prometheus metrics on the address defined by prometheus address. -Introspection / Tracing Options +Introspection / Tracing Options --trace-logs bool, $CODER_TRACE_LOGS Enables capturing of logs as events in traces. This is useful for debugging, but may result in a very large amount of events being sent @@ -111,14 +111,14 @@ Use a YAML configuration file when your server launch become unwieldy. --trace-honeycomb-api-key string, $CODER_TRACE_HONEYCOMB_API_KEY Enables trace exporting to Honeycomb.io using the provided API Key. -Introspection / pprof Options +Introspection / pprof Options --pprof-address host:port, $CODER_PPROF_ADDRESS (default: 127.0.0.1:6060) The bind address to serve pprof. --pprof-enable bool, $CODER_PPROF_ENABLE Serve pprof metrics on the address defined by pprof address. -Networking Options +Networking Options --access-url url, $CODER_ACCESS_URL The URL that users will use to access the Coder deployment. @@ -141,7 +141,7 @@ Use a YAML configuration file when your server launch become unwieldy. Specifies the wildcard hostname to use for workspace applications in the form "*.example.com". -Networking / DERP Options +Networking / DERP Options Most Coder deployments never have to think about DERP because all connections between workspaces and users are peer-to-peer. However, when Coder cannot establish a peer to peer connection, Coder uses a distributed relay network @@ -171,7 +171,7 @@ backed by Tailscale and WireGuard. Addresses for STUN servers to establish P2P connections. Use special value 'disable' to turn off STUN. -Networking / HTTP Options +Networking / HTTP Options --disable-password-auth bool, $CODER_DISABLE_PASSWORD_AUTH Disable password authentication. This is recommended for security purposes in production deployments that rely on an identity provider. @@ -198,7 +198,7 @@ backed by Tailscale and WireGuard. longer if they are actively making requests, but this functionality can be disabled via --disable-session-expiry-refresh. -Networking / TLS Options +Networking / TLS Options Configure TLS / HTTPS for your Coder deployment. If you're running Coder behind a TLS-terminating reverse proxy or are accessing Coder over a secure link, you can safely ignore these settings. @@ -251,7 +251,7 @@ can safely ignore these settings. Minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13". -OAuth2 / GitHub Options +OAuth2 / GitHub Options --oauth2-github-allow-everyone bool, $CODER_OAUTH2_GITHUB_ALLOW_EVERYONE Allow all logins, setting this option means allowed orgs and teams must be empty. @@ -276,7 +276,7 @@ can safely ignore these settings. Base URL of a GitHub Enterprise deployment to use for Login with GitHub. -OIDC Options +OIDC Options --oidc-allow-signups bool, $CODER_OIDC_ALLOW_SIGNUPS (default: true) Whether new users can sign up with OIDC. @@ -325,7 +325,7 @@ can safely ignore these settings. --oidc-icon-url url, $CODER_OIDC_ICON_URL URL pointing to the icon to use on the OepnID Connect login button. -Provisioning Options +Provisioning Options Tune the behavior of the provisioner, which is responsible for creating, updating, and deleting workspace resources. @@ -342,7 +342,7 @@ updating, and deleting workspace resources. Number of provisioner daemons to create on start. If builds are stuck in queued state for a long time, consider increasing this. -Telemetry Options +Telemetry Options Telemetry is critical to our ability to improve Coder. We strip all personalinformation before sending data to our servers. Please only disable telemetrywhen required by your organization's security policy. @@ -356,7 +356,7 @@ telemetrywhen required by your organization's security policy. anonymized application tracing to help improve our product. Disabling telemetry also disables this option. -⚠️ Dangerous Options +⚠️ Dangerous Options --dangerous-allow-path-app-sharing bool, $CODER_DANGEROUS_ALLOW_PATH_APP_SHARING Allow workspace apps that are not served from subdomains to be shared. Path-based app sharing is DISABLED by default for security purposes. @@ -373,7 +373,7 @@ telemetrywhen required by your organization's security policy. can be disabled entirely with --disable-path-apps for further security. -Enterprise Options +Enterprise Options These options are only available in the Enterprise Edition. --browser-only bool, $CODER_BROWSER_ONLY diff --git a/cli/testdata/coder_server_create-admin-user_--help.golden b/cli/testdata/coder_server_create-admin-user_--help.golden index cec159f7f0414..abce17575e0e3 100644 --- a/cli/testdata/coder_server_create-admin-user_--help.golden +++ b/cli/testdata/coder_server_create-admin-user_--help.golden @@ -3,7 +3,7 @@ Usage: coder server create-admin-user [flags] Create a new admin user with the given username, email and password and adds it to every organization. -Options +Options --email string, $CODER_EMAIL The email of the new user. If not specified, you will be prompted via stdin. diff --git a/cli/testdata/coder_server_postgres-builtin-serve_--help.golden b/cli/testdata/coder_server_postgres-builtin-serve_--help.golden index bb61bd8292916..ac4d92356609a 100644 --- a/cli/testdata/coder_server_postgres-builtin-serve_--help.golden +++ b/cli/testdata/coder_server_postgres-builtin-serve_--help.golden @@ -2,7 +2,7 @@ Usage: coder server postgres-builtin-serve [flags] Run the built-in PostgreSQL deployment. -Options +Options --raw-url bool Output the raw connection URL instead of a psql command. diff --git a/cli/testdata/coder_server_postgres-builtin-url_--help.golden b/cli/testdata/coder_server_postgres-builtin-url_--help.golden index af6ca07dc1c61..1db4621de4042 100644 --- a/cli/testdata/coder_server_postgres-builtin-url_--help.golden +++ b/cli/testdata/coder_server_postgres-builtin-url_--help.golden @@ -2,7 +2,7 @@ Usage: coder server postgres-builtin-url [flags] Output the connection URL for the built-in PostgreSQL deployment. -Options +Options --raw-url bool Output the raw connection URL instead of a psql command. diff --git a/cli/testdata/coder_speedtest_--help.golden b/cli/testdata/coder_speedtest_--help.golden index 3ed266699d376..9e5436ba66cb2 100644 --- a/cli/testdata/coder_speedtest_--help.golden +++ b/cli/testdata/coder_speedtest_--help.golden @@ -2,7 +2,7 @@ Usage: coder speedtest [flags] Run upload and download tests from your machine to a workspace -Options +Options -d, --direct bool Specifies whether to wait for a direct connection before testing speed. diff --git a/cli/testdata/coder_ssh_--help.golden b/cli/testdata/coder_ssh_--help.golden index 69214e74066d8..c41a6ba548366 100644 --- a/cli/testdata/coder_ssh_--help.golden +++ b/cli/testdata/coder_ssh_--help.golden @@ -2,7 +2,7 @@ Usage: coder ssh [flags] Start a shell into a workspace -Options +Options -A, --forward-agent bool, $CODER_SSH_FORWARD_AGENT Specifies whether to forward the SSH agent specified in $SSH_AUTH_SOCK. diff --git a/cli/testdata/coder_start_--help.golden b/cli/testdata/coder_start_--help.golden index 5b1083431a923..be1d82b4316f5 100644 --- a/cli/testdata/coder_start_--help.golden +++ b/cli/testdata/coder_start_--help.golden @@ -2,7 +2,7 @@ Usage: coder start [flags] Start a workspace -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_state_--help.golden b/cli/testdata/coder_state_--help.golden index c23e1300ddac2..127b3e9ba36d4 100644 --- a/cli/testdata/coder_state_--help.golden +++ b/cli/testdata/coder_state_--help.golden @@ -2,7 +2,7 @@ Usage: coder state Manually manage Terraform state to fix broken workspaces -Subcommands +Subcommands pull Pull a Terraform state file from a workspace. push Push a Terraform state file to a workspace. diff --git a/cli/testdata/coder_state_pull_--help.golden b/cli/testdata/coder_state_pull_--help.golden index ff99e3fe6156c..71c1713efd583 100644 --- a/cli/testdata/coder_state_pull_--help.golden +++ b/cli/testdata/coder_state_pull_--help.golden @@ -2,7 +2,7 @@ Usage: coder state pull [flags] [file] Pull a Terraform state file from a workspace. -Options +Options -b, --build int Specify a workspace build to target by name. Defaults to latest. diff --git a/cli/testdata/coder_state_push_--help.golden b/cli/testdata/coder_state_push_--help.golden index 119238cb92fa7..2d89fa65812c3 100644 --- a/cli/testdata/coder_state_push_--help.golden +++ b/cli/testdata/coder_state_push_--help.golden @@ -2,7 +2,7 @@ Usage: coder state push [flags] Push a Terraform state file to a workspace. -Options +Options -b, --build int Specify a workspace build to target by name. Defaults to latest. diff --git a/cli/testdata/coder_stop_--help.golden b/cli/testdata/coder_stop_--help.golden index 7226537a91230..bfdfdac2d222a 100644 --- a/cli/testdata/coder_stop_--help.golden +++ b/cli/testdata/coder_stop_--help.golden @@ -2,7 +2,7 @@ Usage: coder stop [flags] Stop a workspace -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_templates_--help.golden b/cli/testdata/coder_templates_--help.golden index a11729b1d3d84..fd5ddcafd2963 100644 --- a/cli/testdata/coder_templates_--help.golden +++ b/cli/testdata/coder_templates_--help.golden @@ -7,17 +7,17 @@ Aliases: template Templates are written in standard Terraform and describe the infrastructure for workspaces - Create a template for developers to create workspaces: - $ coder templates create + $ coder templates create - Make changes to your template, and plan the changes: - $ coder templates plan my-template + $ coder templates plan my-template - Push an update to the template. Your developers can update their workspaces: - $ coder templates push my-template + $ coder templates push my-template -Subcommands +Subcommands create Create a template from the current directory or as specified by flag delete Delete templates diff --git a/cli/testdata/coder_templates_create_--help.golden b/cli/testdata/coder_templates_create_--help.golden index 9f4a82816ff58..01d74e7e639d9 100644 --- a/cli/testdata/coder_templates_create_--help.golden +++ b/cli/testdata/coder_templates_create_--help.golden @@ -2,7 +2,7 @@ Usage: coder templates create [flags] [name] Create a template from the current directory or as specified by flag -Options +Options --default-ttl duration (default: 24h) Specify a default TTL for workspaces created from this template. diff --git a/cli/testdata/coder_templates_delete_--help.golden b/cli/testdata/coder_templates_delete_--help.golden index e580264ba72f0..bfe05cb784f1e 100644 --- a/cli/testdata/coder_templates_delete_--help.golden +++ b/cli/testdata/coder_templates_delete_--help.golden @@ -4,7 +4,7 @@ Delete templates Aliases: rm -Options +Options -y, --yes bool Bypass prompts. diff --git a/cli/testdata/coder_templates_edit_--help.golden b/cli/testdata/coder_templates_edit_--help.golden index 271f0d9b9ed56..b0b5647f02829 100644 --- a/cli/testdata/coder_templates_edit_--help.golden +++ b/cli/testdata/coder_templates_edit_--help.golden @@ -2,7 +2,7 @@ Usage: coder templates edit [flags]