Skip to content

Commit dec5883

Browse files
committed
Merge branch 'main' into 7452-remove-legacy-parameters
2 parents 51bb3c0 + 2b63492 commit dec5883

Some content is hidden

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

54 files changed

+847
-649
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ runs:
88
with:
99
cache: true
1010
go-version: "~1.20"
11+
- name: Install gotestsum
12+
uses: jaxxstorm/action-install-gh-release@v1.10.0
13+
with:
14+
repo: gotestyourself/gotestsum
15+
tag: v1.9.0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Upload tests to datadog
2+
if: always()
3+
inputs:
4+
api-key:
5+
description: "Datadog API key"
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- shell: bash
11+
run: |
12+
npm install -g @datadog/datadog-ci
13+
datadog-ci junit upload --service coder ./gotests.xml \
14+
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
15+
env:
16+
DATADOG_API_KEY: ${{ inputs.api-key }}

.github/workflows/ci.yaml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,6 @@ jobs:
199199

200200
- uses: ./.github/actions/setup-go
201201

202-
- name: Install gotestsum
203-
uses: jaxxstorm/action-install-gh-release@v1.10.0
204-
env:
205-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206-
with:
207-
repo: gotestyourself/gotestsum
208-
tag: v1.9.0
209-
210202
- uses: hashicorp/setup-terraform@v2
211203
with:
212204
terraform_version: 1.1.9
@@ -243,6 +235,11 @@ jobs:
243235
path: ./gotests.xml
244236
retention-days: 30
245237

238+
- uses: ./.github/actions/upload-datadog
239+
if: always()
240+
with:
241+
api-key: ${{ secrets.DATADOG_API_KEY }}
242+
246243
- uses: codecov/codecov-action@v3
247244
# This action has a tendency to error out unexpectedly, it has
248245
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -267,14 +264,6 @@ jobs:
267264

268265
- uses: ./.github/actions/setup-go
269266

270-
- name: Install gotestsum
271-
uses: jaxxstorm/action-install-gh-release@v1.10.0
272-
env:
273-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
274-
with:
275-
repo: gotestyourself/gotestsum
276-
tag: v1.9.0
277-
278267
- uses: hashicorp/setup-terraform@v2
279268
with:
280269
terraform_version: 1.1.9
@@ -299,6 +288,11 @@ jobs:
299288
path: ./gotests.xml
300289
retention-days: 30
301290

291+
- uses: ./.github/actions/upload-datadog
292+
if: always()
293+
with:
294+
api-key: ${{ secrets.DATADOG_API_KEY }}
295+
302296
- uses: codecov/codecov-action@v3
303297
# This action has a tendency to error out unexpectedly, it has
304298
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -326,7 +320,12 @@ jobs:
326320

327321
- name: Run Tests
328322
run: |
329-
go test -race ./...
323+
gotestsum --junitfile="gotests.xml" -- -race ./...
324+
325+
- uses: ./.github/actions/upload-datadog
326+
if: always()
327+
with:
328+
api-key: ${{ secrets.DATADOG_API_KEY }}
330329

331330
deploy:
332331
name: "deploy"

cli/server_createadminuser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (r *RootCmd) newCreateAdminUserCommand() *clibase.Cmd {
238238

239239
createAdminUserCommand.Options.Add(
240240
clibase.Option{
241-
Env: "CODER_POSTGRES_URL",
241+
Env: "CODER_PG_CONNECTION_URL",
242242
Flag: "postgres-url",
243243
Description: "URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).",
244244
Value: clibase.StringOf(&newUserDBURL),

cli/server_createadminuser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func TestServerCreateAdminUser(t *testing.T) {
157157
defer cancel()
158158

159159
inv, _ := clitest.New(t, "server", "create-admin-user")
160-
inv.Environ.Set("CODER_POSTGRES_URL", connectionURL)
160+
inv.Environ.Set("CODER_PG_CONNECTION_URL", connectionURL)
161161
inv.Environ.Set("CODER_SSH_KEYGEN_ALGORITHM", "ed25519")
162162
inv.Environ.Set("CODER_USERNAME", username)
163163
inv.Environ.Set("CODER_EMAIL", email)

cli/testdata/coder_server_create-admin-user_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ to every organization.
1212
The password of the new user. If not specified, you will be prompted
1313
via stdin.
1414

15-
--postgres-url string, $CODER_POSTGRES_URL
15+
--postgres-url string, $CODER_PG_CONNECTION_URL
1616
URL of a PostgreSQL database. If empty, the built-in PostgreSQL
1717
deployment will be used (Coder must not be already running in this
1818
case).

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

coderd/coderd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ type Options struct {
130130
// AppSecurityKey is the crypto key used to sign and encrypt tokens related to
131131
// workspace applications. It consists of both a signing and encryption key.
132132
AppSecurityKey workspaceapps.SecurityKey
133-
HealthcheckFunc func(ctx context.Context, apiKey string) (*healthcheck.Report, error)
133+
HealthcheckFunc func(ctx context.Context, apiKey string) *healthcheck.Report
134134
HealthcheckTimeout time.Duration
135135
HealthcheckRefresh time.Duration
136136

@@ -266,7 +266,7 @@ func New(options *Options) *API {
266266
options.TemplateScheduleStore.Store(&v)
267267
}
268268
if options.HealthcheckFunc == nil {
269-
options.HealthcheckFunc = func(ctx context.Context, apiKey string) (*healthcheck.Report, error) {
269+
options.HealthcheckFunc = func(ctx context.Context, apiKey string) *healthcheck.Report {
270270
return healthcheck.Run(ctx, &healthcheck.ReportOptions{
271271
AccessURL: options.AccessURL,
272272
DERPMap: options.DERPMap.Clone(),

coderd/coderdtest/coderdtest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ type Options struct {
107107
TrialGenerator func(context.Context, string) error
108108
TemplateScheduleStore schedule.TemplateScheduleStore
109109

110-
HealthcheckFunc func(ctx context.Context, apiKey string) (*healthcheck.Report, error)
110+
HealthcheckFunc func(ctx context.Context, apiKey string) *healthcheck.Report
111111
HealthcheckTimeout time.Duration
112112
HealthcheckRefresh time.Duration
113113

0 commit comments

Comments
 (0)