Skip to content

Commit 1c4cd78

Browse files
committed
add needs
1 parent c881491 commit 1c4cd78

File tree

5 files changed

+34
-14
lines changed

5 files changed

+34
-14
lines changed

.github/workflows/coder.yaml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
changes:
3434
runs-on: ubuntu-latest
3535
outputs:
36-
docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }}
36+
docs-only: ${{ env.DOCS_ONLY }}
3737
steps:
3838
# For pull requests it's not necessary to checkout the code
3939
- uses: dorny/paths-filter@v2
@@ -45,10 +45,15 @@ jobs:
4545
docs:
4646
- 'docs/**'
4747
- '.github/**'
48+
- id: log
49+
run: |
50+
echo "${{ toJSON(steps.filter) }}"
51+
echo "DOCS_ONLY=${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }} >> $GITHUB_ENV"
4852
style-lint-golangci:
4953
name: style/lint/golangci
5054
timeout-minutes: 5
51-
if: ${{ !needs.changes.outputs.docs_only }}
55+
needs: changes
56+
if: needs.changes.outputs.docs_only == 'false'
5257
runs-on: ubuntu-latest
5358
steps:
5459
- uses: actions/checkout@v3
@@ -64,7 +69,8 @@ jobs:
6469
name: style/lint/shellcheck
6570
timeout-minutes: 5
6671
runs-on: ubuntu-latest
67-
if: ${{ !needs.changes.outputs.docs_only }}
72+
needs: changes
73+
if: needs.changes.outputs.docs_only == 'false'
6874
steps:
6975
- uses: actions/checkout@v3
7076
- name: Run ShellCheck
@@ -77,7 +83,8 @@ jobs:
7783
style-lint-typescript:
7884
name: "style/lint/typescript"
7985
timeout-minutes: 5
80-
if: ${{ !needs.changes.outputs.docs_only }}
86+
needs: changes
87+
if: needs.changes.outputs.docs_only == 'false'
8188
runs-on: ubuntu-latest
8289
steps:
8390
- name: Checkout
@@ -105,7 +112,8 @@ jobs:
105112
name: "style/gen"
106113
timeout-minutes: 5
107114
runs-on: ubuntu-latest
108-
if: ${{ !needs.changes.outputs.docs_only }}
115+
needs: changes
116+
if: needs.changes.outputs.docs_only == 'false'
109117
steps:
110118
- uses: actions/checkout@v3
111119

@@ -141,7 +149,8 @@ jobs:
141149

142150
style-fmt:
143151
name: "style/fmt"
144-
if: ${{ !needs.changes.outputs.docs_only }}
152+
needs: changes
153+
if: needs.changes.outputs.docs_only == 'false'
145154
runs-on: ubuntu-latest
146155
timeout-minutes: 5
147156
steps:
@@ -174,7 +183,8 @@ jobs:
174183
175184
test-go:
176185
name: "test/go"
177-
if: ${{ !needs.changes.outputs.docs_only }}
186+
needs: changes
187+
if: needs.changes.outputs.docs_only == 'false'
178188
runs-on: ${{ matrix.os }}
179189
timeout-minutes: 20
180190
strategy:
@@ -251,7 +261,8 @@ jobs:
251261

252262
test-go-postgres:
253263
name: "test/go/postgres"
254-
if: ${{ !needs.changes.outputs.docs_only }}
264+
needs: changes
265+
if: needs.changes.outputs.docs_only == 'false'
255266
runs-on: ubuntu-latest
256267
# This timeout must be greater than the timeout set by `go test` in
257268
# `make test-postgres` to ensure we receive a trace of running
@@ -323,9 +334,10 @@ jobs:
323334
name: "deploy"
324335
runs-on: ubuntu-latest
325336
timeout-minutes: 30
337+
needs: changes
326338
if: |
327339
github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
328-
&& !needs.changes.outputs.docs_only
340+
&& needs.changes.outputs.docs_only == 'false'
329341
permissions:
330342
contents: read
331343
id-token: write
@@ -431,7 +443,8 @@ jobs:
431443

432444
test-js:
433445
name: "test/js"
434-
if: ${{ !needs.changes.outputs.docs_only }}
446+
needs: changes
447+
if: needs.changes.outputs.docs_only == 'false'
435448
runs-on: ubuntu-latest
436449
timeout-minutes: 20
437450
steps:
@@ -485,6 +498,7 @@ jobs:
485498

486499
test-e2e:
487500
name: "test/e2e/${{ matrix.os }}"
501+
needs: changes
488502
runs-on: ${{ matrix.os }}
489503
timeout-minutes: 20
490504
strategy:

cli/ssh_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ func TestSSH(t *testing.T) {
9191

9292
// Shells on Mac, Windows, and Linux all exit shells with the "exit" command.
9393
pty.WriteLine("exit")
94+
// Read output to prevent hang on macOS, see:
95+
// https://github.com/coder/coder/issues/2122
96+
pty.ExpectMatch("exit")
9497
<-cmdDone
9598
})
9699
t.Run("Stdio", func(t *testing.T) {
@@ -224,6 +227,9 @@ func TestSSH(t *testing.T) {
224227

225228
// And we're done.
226229
pty.WriteLine("exit")
230+
// Read output to prevent hang on macOS, see:
231+
// https://github.com/coder/coder/issues/2122
232+
pty.ExpectMatch("exit")
227233
<-cmdDone
228234
})
229235
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ require (
243243
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
244244
github.com/rivo/uniseg v0.2.0 // indirect
245245
github.com/sirupsen/logrus v1.8.1 // indirect
246-
github.com/spf13/afero v1.9.0
246+
github.com/spf13/afero v1.9.2
247247
github.com/spf13/cast v1.5.0 // indirect
248248
github.com/spf13/jwalterweatherman v1.1.0 // indirect
249249
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,8 +1699,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B
16991699
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
17001700
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
17011701
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
1702-
github.com/spf13/afero v1.9.0 h1:sFSLUHgxdnN32Qy38hK3QkYBFXZj9DKjVjCUCtD7juY=
1703-
github.com/spf13/afero v1.9.0/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
1702+
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
1703+
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
17041704
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
17051705
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
17061706
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=

site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dayjs.extend(timezone)
3333

3434
export const Language = {
3535
errorNoDayOfWeek: "Must set at least one day of week if start time is set",
36-
errorNoTime: "Start time is required",
36+
errorNoTime: "Start time is required when days of the week are selected",
3737
errorTime: "Time must be in HH:mm format (24 hours)",
3838
errorTimezone: "Invalid timezone",
3939
daysOfWeekLabel: "Days of Week",

0 commit comments

Comments
 (0)