Skip to content

Commit 1c059a9

Browse files
committed
Merge branch 'main' into icons/presleyp/938
2 parents 7f97a5e + b9933d4 commit 1c059a9

Some content is hidden

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

55 files changed

+70
-72
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ coderd/database/generate: fmt/sql coderd/database/dump.sql $(wildcard coderd/dat
2020
.PHONY: coderd/database/generate
2121

2222
apitypings/generate: site/src/api/types.ts
23-
go run scripts/apitypings/main.go > site/src/api/types-generated.ts
23+
go run scripts/apitypings/main.go > site/src/api/typesGenerated.ts
2424
cd site && yarn run format:types
2525
.PHONY: apitypings/generate
2626

@@ -35,7 +35,6 @@ endif
3535
.PHONY: fmt/prettier
3636

3737
fmt/sql: $(wildcard coderd/database/queries/*.sql)
38-
# TODO: this is slightly slow
3938
for fi in coderd/database/queries/*.sql; do \
4039
npx sql-formatter \
4140
--language postgresql \

agent/usershell/usershell_darwin.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package usershell
33
import "os"
44

55
// Get returns the $SHELL environment variable.
6-
// TODO: This should use "dscl" to fetch the proper value. See:
7-
// https://stackoverflow.com/questions/16375519/how-to-get-the-default-shell
86
func Get(username string) (string, error) {
97
return os.Getenv("SHELL"), nil
108
}

cli/workspaceautostart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func workspaceAutostart() *cobra.Command {
2222
Short: "schedule a workspace to automatically start at a regular time",
2323
Long: autostartDescriptionLong,
2424
Example: "coder workspaces autostart enable my-workspace --minute 30 --hour 9 --days 1-5 --tz Europe/Dublin",
25-
Hidden: true, // TODO(cian): un-hide when autostart scheduling implemented
25+
Hidden: true,
2626
}
2727

2828
autostartCmd.AddCommand(workspaceAutostartEnable())

cli/workspaceautostop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func workspaceAutostop() *cobra.Command {
2222
Short: "schedule a workspace to automatically stop at a regular time",
2323
Long: autostopDescriptionLong,
2424
Example: "coder workspaces autostop enable my-workspace --minute 0 --hour 18 --days 1-5 -tz Europe/Dublin",
25-
Hidden: true, // TODO(cian): un-hide when autostop scheduling implemented
25+
Hidden: true,
2626
}
2727

2828
autostopCmd.AddCommand(workspaceAutostopEnable())

coderd/rbac/role.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ type Role struct {
2020
Name string `json:"name"`
2121
Site []Permission `json:"site"`
2222
// Org is a map of orgid to permissions. We represent orgid as a string.
23-
// TODO: Maybe switch to uuid, but tokens might need to support a "wildcard" org
24-
// which could be a special uuid (like all 0s?)
2523
Org map[string][]Permission `json:"org"`
2624
User []Permission `json:"user"`
2725
}
@@ -49,7 +47,6 @@ var (
4947
RoleAuditor = Role{
5048
Name: "auditor",
5149
Site: permissions(map[Object][]Action{
52-
// TODO: @emyrk when audit logs are added, add back a read perm
5350
//ResourceAuditLogs: {ActionRead},
5451
// Should be able to read user details to associate with logs.
5552
// Without this the user-id in logs is not very helpful

coderd/turnconn/turnconn_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func TestTURNConn(t *testing.T) {
4444
Logger: logger.Named("client"),
4545
})
4646
require.NoError(t, err)
47+
defer func() {
48+
_ = client.Close()
49+
}()
4750

4851
serverDialer, serverTURN := net.Pipe()
4952
turnServer.Accept(serverTURN, &net.TCPAddr{
@@ -62,6 +65,9 @@ func TestTURNConn(t *testing.T) {
6265
Logger: logger.Named("server"),
6366
})
6467
require.NoError(t, err)
68+
defer func() {
69+
_ = server.Close()
70+
}()
6571
exchange(t, client, server)
6672

6773
_, err = client.Ping()
@@ -71,12 +77,7 @@ func TestTURNConn(t *testing.T) {
7177
func exchange(t *testing.T, client, server *peer.Conn) {
7278
var wg sync.WaitGroup
7379
wg.Add(2)
74-
t.Cleanup(func() {
75-
_ = client.Close()
76-
_ = server.Close()
77-
78-
wg.Wait()
79-
})
80+
t.Cleanup(wg.Wait)
8081
go func() {
8182
defer wg.Done()
8283
for {

peer/channel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ func (c *Channel) Write(bytes []byte) (n int, err error) {
245245
if c.dc.BufferedAmount()+uint64(len(bytes)) >= maxBufferedAmount {
246246
<-c.sendMore
247247
}
248-
// TODO (@kyle): There's an obvious race-condition here.
249-
// This is an edge-case, as most-frequently data won't
250-
// be pooled so synchronously, but is definitely possible.
248+
// REMARK: There's an obvious race-condition here. This is an edge-case, as
249+
// most-frequently data won't be pooled so synchronously, but is
250+
// definitely possible.
251251
//
252252
// See: https://github.com/pion/sctp/issues/181
253253
time.Sleep(time.Microsecond)

scripts/apitypings/main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"log"
99
"os"
1010
"path/filepath"
11+
"sort"
1112
"strings"
1213

1314
"golang.org/x/xerrors"
@@ -69,9 +70,16 @@ func run() error {
6970
handleValueSpec(s, enums)
7071
})
7172

73+
// sort keys so output is always the same
74+
var keys []string
75+
for k := range enums {
76+
keys = append(keys, k)
77+
}
78+
sort.Strings(keys)
79+
7280
// write each type alias declaration with possible values
73-
for _, v := range enums {
74-
_, _ = fmt.Printf("%s\n", v)
81+
for _, k := range keys {
82+
_, _ = fmt.Printf("%s\n", enums[k])
7583
}
7684

7785
return nil

scripts/yarn_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Run "yarn install" with flags appropriate to the environment
44
# (local development vs build system)

site/.storybook/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createMemoryHistory } from "history"
55
import { addDecorator } from "node_modules/@storybook/react"
66
import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom"
77
import { dark, light } from "../src/theme"
8-
import "../src/theme/global-fonts"
8+
import "../src/theme/globalFonts"
99

1010
const providerFn = ({ children, theme }) => (
1111
<ThemeProvider theme={theme}>

0 commit comments

Comments
 (0)