Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0329a19

Browse files
author
G r e y
authored
Merge branch 'main' into bryphe/refactor/add-stability-workflow
2 parents 68f6ad1 + 22f820c commit 0329a19

Some content is hidden

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

78 files changed

+1462
-807
lines changed

.github/workflows/coder.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install Protoc
8080
uses: arduino/setup-protoc@v1
8181
with:
82-
version: "3.6.1"
82+
version: "3.19.4"
8383
- uses: actions/setup-go@v2
8484
with:
8585
go-version: "^1.17"
@@ -370,4 +370,4 @@ jobs:
370370
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
371371
DD_CATEGORY: e2e
372372
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
373-
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml
373+
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ site/storybook-static/
2323
site/test-results/
2424
site/yarn-error.log
2525
coverage/
26+
site/**/*.typegen.ts
2627

2728
# Build
2829
dist/

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,15 @@ linters-settings:
184184
- r
185185
- i
186186
- db
187+
- t
187188
# Optional list of variable declarations that should be ignored completely. (defaults to empty list)
188189
# Entries must be in the form of "<variable name> <type>" or "<variable name> *<type>" for
189190
# variables, or "const <name>" for constants.
190191
ignore-decls:
191192
- rw http.ResponseWriter
192193
- r *http.Request
193194
- t testing.T
195+
- t testing.TB
194196

195197
issues:
196198
# Rules listed here: https://github.com/securego/gosec#available-rules

.vscode/settings.json

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
11
{
2-
"files.exclude": {
3-
"**/node_modules": true
4-
},
5-
"go.lintTool": "golangci-lint",
6-
"go.lintFlags": ["--fast"],
7-
"go.lintOnSave": "package",
8-
"go.coverOnSave": true,
9-
// The codersdk is used by coderd another other packages extensively.
10-
// To reduce redundancy in tests, it's covered by other packages.
11-
"go.testFlags": ["-coverpkg=./.,github.com/coder/coder/codersdk"],
12-
"go.coverageDecorator": {
13-
"type": "gutter",
14-
"coveredHighlightColor": "rgba(64,128,128,0.5)",
15-
"uncoveredHighlightColor": "rgba(128,64,64,0.25)",
16-
"coveredBorderColor": "rgba(64,128,128,0.5)",
17-
"uncoveredBorderColor": "rgba(128,64,64,0.25)",
18-
"coveredGutterStyle": "blockgreen",
19-
"uncoveredGutterStyle": "blockred"
20-
},
21-
"emeraldwalk.runonsave": {
22-
"commands": [
23-
{
24-
"match": "database/query.sql",
25-
"cmd": "make gen"
26-
}
27-
]
28-
},
292
"cSpell.words": [
303
"coderd",
314
"coderdtest",
@@ -76,5 +49,35 @@
7649
"xerrors",
7750
"yamux"
7851
],
79-
"eslint.workingDirectories": ["./site"]
52+
"emeraldwalk.runonsave": {
53+
"commands": [
54+
{
55+
"match": "database/query.sql",
56+
"cmd": "make gen"
57+
}
58+
]
59+
},
60+
"eslint.workingDirectories": ["./site"],
61+
"files.exclude": {
62+
"**/node_modules": true
63+
},
64+
"go.lintTool": "golangci-lint",
65+
"go.lintFlags": ["--fast"],
66+
"go.lintOnSave": "package",
67+
"go.coverOnSave": true,
68+
// The codersdk is used by coderd another other packages extensively.
69+
// To reduce redundancy in tests, it's covered by other packages.
70+
"go.testFlags": ["-coverpkg=./.,github.com/coder/coder/codersdk"],
71+
"go.coverageDecorator": {
72+
"type": "gutter",
73+
"coveredHighlightColor": "rgba(64,128,128,0.5)",
74+
"uncoveredHighlightColor": "rgba(128,64,64,0.25)",
75+
"coveredBorderColor": "rgba(64,128,128,0.5)",
76+
"uncoveredBorderColor": "rgba(128,64,64,0.25)",
77+
"coveredGutterStyle": "blockgreen",
78+
"uncoveredGutterStyle": "blockred"
79+
},
80+
// We often use a version of TypeScript that's ahead of the version shipped
81+
// with VS Code.
82+
"typescript.tsdk": "./site/node_modules/typescript/lib"
8083
}

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto
8484

8585
site/out:
8686
./scripts/yarn_install.sh
87+
cd site && yarn typegen
8788
cd site && yarn build
8889
# Restores GITKEEP files!
8990
git checkout HEAD site/out

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ To manually run the server and go through first-time set up, run the following c
4848

4949
You'll now be able to login and access the server.
5050

51-
To create a project, run:
5251
- `dist/coder_linux_amd64/coder projects create -d /path/to/project`
5352

5453
### Development
@@ -63,6 +62,10 @@ The `develop.sh` script does three things:
6362

6463
This is the recommend flow for working on the front-end, as hot-reload is set up as part of the webpack config.
6564

65+
Note that `./develop.sh` creates a user and allows you to log into the UI, but does not log you into the CLI, which is required for creating a project. Use the `login` command above before the `projects create` command.
66+
67+
While we're working on automating XState typegen, you may need to run `yarn typegen` from `site`.
68+
6669
## Front-End Plan
6770

6871
For the front-end team, we're planning on 2 phases to the 'v2' work:

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ ignore:
3535
- provisionerd/proto
3636
- provisionersdk/proto
3737
- scripts/datadog-cireport
38+
- site/.storybook
3839
- rules.go

coderd/coderd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ type Options struct {
2727

2828
// New constructs the Coder API into an HTTP handler.
2929
//
30-
// A wait function is returned to handle awaiting closure
31-
// of hijacked HTTP requests.
30+
// A wait function is returned to handle awaiting closure of hijacked HTTP
31+
// requests.
3232
func New(options *Options) (http.Handler, func()) {
3333
api := &api{
3434
Options: options,

coderd/coderdtest/coderdtest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func New(t *testing.T, options *Options) *codersdk.Client {
6161
t.Cleanup(func() {
6262
_ = sqlDB.Close()
6363
})
64-
err = database.Migrate(sqlDB)
64+
err = database.MigrateUp(sqlDB)
6565
require.NoError(t, err)
6666
db = database.New(sqlDB)
6767

0 commit comments

Comments
 (0)