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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5ecc277
add prebuilds system user database changes and associated changes
SasSwart Mar 12, 2025
bc5f4f4
optionally prevent system users from counting to user count
dannykopping Mar 13, 2025
48c5372
appease the linter
dannykopping Mar 13, 2025
b16d126
add unit test for system user behaviour
dannykopping Mar 13, 2025
2c25542
reverting RBAC changes; not relevant here
dannykopping Mar 13, 2025
8e491d8
removing unnecessary changes
dannykopping Mar 13, 2025
514fdbf
exclude system user db tests from non-linux OSs
dannykopping Mar 13, 2025
390a1fd
feat: add migrations and queries to support prebuilds
SasSwart Mar 12, 2025
07e9613
Merge remote-tracking branch 'origin/main' into prebuilds-db
SasSwart Mar 17, 2025
a07c2b2
feat: persist prebuild definitions on template import
SasSwart Mar 17, 2025
300e80f
add prebuilds system user database changes and associated changes
SasSwart Mar 12, 2025
b788237
optionally prevent system users from counting to user count
dannykopping Mar 13, 2025
8122595
appease the linter
dannykopping Mar 13, 2025
bfb7c28
add unit test for system user behaviour
dannykopping Mar 13, 2025
6639167
reverting RBAC changes; not relevant here
dannykopping Mar 13, 2025
769ae1d
removing unnecessary changes
dannykopping Mar 13, 2025
e7e9c27
exclude system user db tests from non-linux OSs
dannykopping Mar 13, 2025
3936047
Rename prebuild system user reference
SasSwart Mar 17, 2025
8bdcafb
ensure that users.IsSystem is not nullable
SasSwart Mar 17, 2025
412d198
feat: add migrations and queries to support prebuilds
SasSwart Mar 12, 2025
51773ec
Simplify workspace_latest_build view
dannykopping Mar 14, 2025
23773c2
Revert test change
dannykopping Mar 17, 2025
bc3ff44
make gen
dannykopping Mar 17, 2025
baa3076
refactor: add comments to SQL queries
evgeniy-scherbina Mar 19, 2025
ed14fb3
test: added get-presets-backoff test
evgeniy-scherbina Mar 20, 2025
3cc74fb
refactor: add comment to SQL query
evgeniy-scherbina Mar 20, 2025
fc32154
refactor: add comments + improve tests
evgeniy-scherbina Mar 21, 2025
d7b4ec4
fix: bug in SQL
evgeniy-scherbina Mar 21, 2025
e8b53f7
test: minor changes to the test
evgeniy-scherbina Mar 21, 2025
9df6554
refactor: remove job_status from SQL query
evgeniy-scherbina Mar 21, 2025
ccc309e
refactor: embed preset_prebuilds table into presets table
evgeniy-scherbina Mar 21, 2025
ee1f16a
refactor: rename sql table
evgeniy-scherbina Mar 21, 2025
d040ddd
refactor: remove unnecessary JOIN
evgeniy-scherbina Mar 23, 2025
83a6722
refactor: remove unnecessary JOIN
evgeniy-scherbina Mar 23, 2025
cd70710
refactor: use INNER JOIN for consistency
evgeniy-scherbina Mar 23, 2025
0f3bda0
Merge remote-tracking branch 'origin/prebuilds-db' into jjs/insert-pr…
SasSwart Mar 24, 2025
a7c7cd2
make lint
SasSwart Mar 24, 2025
97cc4ff
refactor: simplify GetPresetsBackoff SQL Query
evgeniy-scherbina Mar 24, 2025
4d59039
Revert "refactor: simplify GetPresetsBackoff SQL Query"
evgeniy-scherbina Mar 24, 2025
205d6af
refactor: improve GetPresetsBackoff query
evgeniy-scherbina Mar 24, 2025
e489e1b
Merge remote-tracking branch 'origin/main' into prebuilds-db
evgeniy-scherbina Mar 25, 2025
1b29686
Merge remote-tracking branch 'origin/main' into prebuilds-db
evgeniy-scherbina Mar 25, 2025
20470e4
fix: bump migration numbers
evgeniy-scherbina Mar 25, 2025
6fc1889
Merge remote-tracking branch 'origin/main' into jjs/insert-prebuilds
SasSwart Mar 25, 2025
7b9c8ce
test: remove deprecated test
evgeniy-scherbina Mar 25, 2025
e189a0b
fix: fix linter
evgeniy-scherbina Mar 25, 2025
692c0e5
fix: fix 000310_prebuilds.down migration
evgeniy-scherbina Mar 25, 2025
f747db0
fix: fix fixture migration
evgeniy-scherbina Mar 25, 2025
3166a42
fix: fix get-presets-backoff test
evgeniy-scherbina Mar 25, 2025
aa6b490
fix: fix linter
evgeniy-scherbina Mar 25, 2025
bc4e7d2
fix: fix linter
evgeniy-scherbina Mar 25, 2025
f167b92
correctly select for the latest built with a preset in latest_prebuil…
SasSwart Mar 26, 2025
8fd34ab
Merge remote-tracking branch 'origin/main' into prebuilds-db
SasSwart Mar 26, 2025
7a8ec49
Properly label and filter metrics for prebuilds
SasSwart Mar 26, 2025
a64d661
test: fix db tests
evgeniy-scherbina Mar 27, 2025
865998b
Merge branch 'prebuilds-db' into jjs/insert-prebuilds
SasSwart Mar 27, 2025
c787cd2
test: added tests for workspaces with multiple agents
evgeniy-scherbina Mar 27, 2025
bd38603
refactor: avoid code duplication
evgeniy-scherbina Mar 27, 2025
097f9c3
clarify query clause
SasSwart Mar 27, 2025
4cfdd6f
tidy up dbauthz_test.go
SasSwart Mar 27, 2025
4a34d52
refactor: remove * usage from prebuilds.sql queries
evgeniy-scherbina Mar 27, 2025
8d9cd45
refactor: remove * usage from prebuilds views
evgeniy-scherbina Mar 27, 2025
f870d7e
refactor: join wlb with pj
evgeniy-scherbina Mar 27, 2025
18ad931
refactor: Rename SQL query
evgeniy-scherbina Mar 27, 2025
4667171
Added comments for SQL query
evgeniy-scherbina Mar 27, 2025
a26c094
refactor: fix down migration
evgeniy-scherbina Mar 27, 2025
bf4ab53
make lint
SasSwart Mar 28, 2025
a84b1bb
Merge remote-tracking branch 'origin/main' into jjs/insert-prebuilds
SasSwart Mar 28, 2025
6ed4121
Merge remote-tracking branch 'origin/main' into prebuilds-db
SasSwart Mar 28, 2025
e8b1502
Merge branch 'prebuilds-db' into jjs/insert-prebuilds
SasSwart Mar 28, 2025
2312f41
renumber migrations
SasSwart Mar 28, 2025
4540a55
add tests for prebuilds in the provisionerdserver
SasSwart Mar 28, 2025
5c41ba9
Merge branch 'prebuilds-db' into jjs/insert-prebuilds
SasSwart Mar 28, 2025
d09b757
fix indent
SasSwart Mar 28, 2025
61e86f6
make more use of dbgen
SasSwart Mar 28, 2025
1419df0
update dbmemt
SasSwart Mar 28, 2025
6589221
Add tests
SasSwart Mar 28, 2025
b15b97a
Merge origin/main
SasSwart Apr 3, 2025
dd656a7
Merge remote-tracking branch 'origin/main' into jjs/insert-prebuilds
SasSwart Apr 3, 2025
508b244
fix tests
SasSwart Apr 3, 2025
e1f585d
remove duplicate migrations fixture
SasSwart Apr 3, 2025
7d4f1b9
clean up go.mod slightly
SasSwart Apr 3, 2025
43f82b9
update dependency on terraform-provider-coder
SasSwart Apr 7, 2025
5d8de71
simplify query
SasSwart Apr 7, 2025
a87933a
Correct the prebuilds type
SasSwart Apr 7, 2025
798cfa1
fix prebuild decoding
SasSwart Apr 7, 2025
dc87f45
make fmt
SasSwart Apr 7, 2025
7c17fcd
update our dependency on terraform-provider-coder
SasSwart Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge origin/main
  • Loading branch information
SasSwart committed Apr 3, 2025
commit b15b97a922653d8ad17deeae5e0a48cc8c8a8f14
122 changes: 122 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Cursor Rules

This project is called "Coder" - an application for managing remote development environments.

Coder provides a platform for creating, managing, and using remote development environments (also known as Cloud Development Environments or CDEs). It leverages Terraform to define and provision these environments, which are referred to as "workspaces" within the project. The system is designed to be extensible, secure, and provide developers with a seamless remote development experience.

# Core Architecture

The heart of Coder is a control plane that orchestrates the creation and management of workspaces. This control plane interacts with separate Provisioner processes over gRPC to handle workspace builds. The Provisioners consume workspace definitions and use Terraform to create the actual infrastructure.

The CLI package serves dual purposes - it can be used to launch the control plane itself and also provides client functionality for users to interact with an existing control plane instance. All user-facing frontend code is developed in TypeScript using React and lives in the `site/` directory.

The database layer uses PostgreSQL with SQLC for generating type-safe database code. Database migrations are carefully managed to ensure both forward and backward compatibility through paired `.up.sql` and `.down.sql` files.

# API Design

Coder's API architecture combines REST and gRPC approaches. The REST API is defined in `coderd/coderd.go` and uses Chi for HTTP routing. This provides the primary interface for the frontend and external integrations.

Internal communication with Provisioners occurs over gRPC, with service definitions maintained in `.proto` files. This separation allows for efficient binary communication with the components responsible for infrastructure management while providing a standard REST interface for human-facing applications.

# Network Architecture

Coder implements a secure networking layer based on Tailscale's Wireguard implementation. The `tailnet` package provides connectivity between workspace agents and clients through DERP (Designated Encrypted Relay for Packets) servers when direct connections aren't possible. This creates a secure overlay network allowing access to workspaces regardless of network topology, firewalls, or NAT configurations.

## Tailnet and DERP System

The networking system has three key components:

1. **Tailnet**: An overlay network implemented in the `tailnet` package that provides secure, end-to-end encrypted connections between clients, the Coder server, and workspace agents.

2. **DERP Servers**: These relay traffic when direct connections aren't possible. Coder provides several options:
- A built-in DERP server that runs on the Coder control plane
- Integration with Tailscale's global DERP infrastructure
- Support for custom DERP servers for lower latency or offline deployments

3. **Direct Connections**: When possible, the system establishes peer-to-peer connections between clients and workspaces using STUN for NAT traversal. This requires both endpoints to send UDP traffic on ephemeral ports.

## Workspace Proxies

Workspace proxies (in the Enterprise edition) provide regional relay points for browser-based connections, reducing latency for geo-distributed teams. Key characteristics:

- Deployed as independent servers that authenticate with the Coder control plane
- Relay connections for SSH, workspace apps, port forwarding, and web terminals
- Do not make direct database connections
- Managed through the `coder wsproxy` commands
- Implemented primarily in the `enterprise/wsproxy/` package

# Agent System

The workspace agent runs within each provisioned workspace and provides core functionality including:
- SSH access to workspaces via the `agentssh` package
- Port forwarding
- Terminal connectivity via the `pty` package for pseudo-terminal support
- Application serving
- Healthcheck monitoring
- Resource usage reporting

Agents communicate with the control plane using the tailnet system and authenticate using secure tokens.

# Workspace Applications

Workspace applications (or "apps") provide browser-based access to services running within workspaces. The system supports:

- HTTP(S) and WebSocket connections
- Path-based or subdomain-based access URLs
- Health checks to monitor application availability
- Different sharing levels (owner-only, authenticated users, or public)
- Custom icons and display settings

The implementation is primarily in the `coderd/workspaceapps/` directory with components for URL generation, proxying connections, and managing application state.

# Implementation Details

The project structure separates frontend and backend concerns. React components and pages are organized in the `site/src/` directory, with Jest used for testing. The backend is primarily written in Go, with a strong emphasis on error handling patterns and test coverage.

Database interactions are carefully managed through migrations in `coderd/database/migrations/` and queries in `coderd/database/queries/`. All new queries require proper database authorization (dbauthz) implementation to ensure that only users with appropriate permissions can access specific resources.

# Authorization System

The database authorization (dbauthz) system enforces fine-grained access control across all database operations. It uses role-based access control (RBAC) to validate user permissions before executing database operations. The `dbauthz` package wraps the database store and performs authorization checks before returning data. All database operations must pass through this layer to ensure security.

# Testing Framework

The codebase has a comprehensive testing approach with several key components:

1. **Parallel Testing**: All tests must use `t.Parallel()` to run concurrently, which improves test suite performance and helps identify race conditions.

2. **coderdtest Package**: This package in `coderd/coderdtest/` provides utilities for creating test instances of the Coder server, setting up test users and workspaces, and mocking external components.

3. **Integration Tests**: Tests often span multiple components to verify system behavior, such as template creation, workspace provisioning, and agent connectivity.

4. **Enterprise Testing**: Enterprise features have dedicated test utilities in the `coderdenttest` package.

# Open Source and Enterprise Components

The repository contains both open source and enterprise components:

- Enterprise code lives primarily in the `enterprise/` directory
- Enterprise features focus on governance, scalability (high availability), and advanced deployment options like workspace proxies
- The boundary between open source and enterprise is managed through a licensing system
- The same core codebase supports both editions, with enterprise features conditionally enabled

# Development Philosophy

Coder emphasizes clear error handling, with specific patterns required:
- Concise error messages that avoid phrases like "failed to"
- Wrapping errors with `%w` to maintain error chains
- Using sentinel errors with the "err" prefix (e.g., `errNotFound`)

All tests should run in parallel using `t.Parallel()` to ensure efficient testing and expose potential race conditions. The codebase is rigorously linted with golangci-lint to maintain consistent code quality.

Git contributions follow a standard format with commit messages structured as `type: <message>`, where type is one of `feat`, `fix`, or `chore`.

# Development Workflow

Development can be initiated using `scripts/develop.sh` to start the application after making changes. Database schema updates should be performed through the migration system using `create_migration.sh <name>` to generate migration files, with each `.up.sql` migration paired with a corresponding `.down.sql` that properly reverts all changes.

If the development database gets into a bad state, it can be completely reset by removing the PostgreSQL data directory with `rm -rf .coderv2/postgres`. This will destroy all data in the development database, requiring you to recreate any test users, templates, or workspaces after restarting the application.

Code generation for the database layer uses `coderd/database/generate.sh`, and developers should refer to `sqlc.yaml` for the appropriate style and patterns to follow when creating new queries or tables.

The focus should always be on maintaining security through proper database authorization, clean error handling, and comprehensive test coverage to ensure the platform remains robust and reliable.
1 change: 1 addition & 0 deletions .github/.linkspector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ ignorePatterns:
- pattern: "wiki.ubuntu.com"
- pattern: "mutagen.io"
- pattern: "docs.github.com"
- pattern: "claude.ai"
aliveStatusCodes:
- 200
11 changes: 7 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ jobs:
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install storj.io/drpc/cmd/[email protected]
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/goimports@v0.31.0
go install github.com/mikefarah/yq/[email protected]
go install go.uber.org/mock/[email protected]

Expand Down Expand Up @@ -299,6 +299,9 @@ jobs:
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Check Go version
run: IGNORE_NIX=true ./scripts/check_go_versions.sh

# Use default Go version
- name: Setup Go
uses: ./.github/actions/setup-go
Expand Down Expand Up @@ -674,8 +677,8 @@ jobs:
variant:
- premium: false
name: test-e2e
- premium: true
name: test-e2e-premium
#- premium: true
# name: test-e2e-premium
# Skip test-e2e on forks as they don't have access to CI secrets
if: (needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main') && !(github.event.pull_request.head.repo.fork)
timeout-minutes: 20
Expand Down Expand Up @@ -860,7 +863,7 @@ jobs:
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install storj.io/drpc/cmd/[email protected]
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/goimports@v0.31.0
go install github.com/mikefarah/yq/[email protected]
go install go.uber.org/mock/[email protected]

Expand Down
3 changes: 1 addition & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ linters-settings:
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
exclude: "**/*_test.go"
- name: unused-receiver
- name: var-declaration
- name: var-naming
Expand Down Expand Up @@ -195,8 +196,6 @@ issues:
- errcheck
- forcetypeassert
- exhaustruct # This is unhelpful in tests.
- revive # TODO(JonA): disabling in order to update golangci-lint
- gosec # TODO(JonA): disabling in order to update golangci-lint
- path: scripts/*
linters:
- exhaustruct
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@
"[css][html][markdown][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typos.config": ".github/workflows/typos.toml"
"typos.config": ".github/workflows/typos.toml",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
}
}
12 changes: 12 additions & 0 deletions agent/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"
"regexp"
"runtime"
"slices"
"strings"

"github.com/shirou/gopsutil/v4/disk"
Expand Down Expand Up @@ -103,6 +104,17 @@ func listFiles(query LSRequest) (LSResponse, error) {
})
}

// Sort alphabetically: directories then files
slices.SortFunc(respContents, func(a, b LSFile) int {
if a.IsDir && !b.IsDir {
return -1
}
if !a.IsDir && b.IsDir {
return 1
}
return strings.Compare(a.Name, b.Name)
})

absolutePath := pathToArray(absolutePathString)

return LSResponse{
Expand Down
11 changes: 6 additions & 5 deletions agent/ls_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,16 @@ func TestListFilesSuccess(t *testing.T) {
require.NoError(t, err)

require.Equal(t, tmpDir, resp.AbsolutePathString)
require.ElementsMatch(t, []LSFile{
// Output is sorted
require.Equal(t, []LSFile{
{
Name: "repos",
AbsolutePathString: reposDir,
Name: "Downloads",
AbsolutePathString: downloadsDir,
IsDir: true,
},
{
Name: "Downloads",
AbsolutePathString: downloadsDir,
Name: "repos",
AbsolutePathString: reposDir,
IsDir: true,
},
{
Expand Down
17 changes: 17 additions & 0 deletions archive/fs/tar.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package archivefs

import (
"archive/tar"
"io"
"io/fs"

"github.com/spf13/afero"
"github.com/spf13/afero/tarfs"
)

func FromTarReader(r io.Reader) fs.FS {
tr := tar.NewReader(r)
tfs := tarfs.New(tr)
rofs := afero.NewReadOnlyFs(tfs)
return afero.NewIOFS(rofs)
}
8 changes: 3 additions & 5 deletions cli/clitest/golden.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"strings"
"testing"

"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/cli/config"
Expand Down Expand Up @@ -117,11 +119,7 @@ func TestGoldenFile(t *testing.T, fileName string, actual []byte, replacements m
require.NoError(t, err, "read golden file, run \"make gen/golden-files\" and commit the changes")

expected = normalizeGoldenFile(t, expected)
require.Equal(
t, string(expected), string(actual),
"golden file mismatch: %s, run \"make gen/golden-files\", verify and commit the changes",
goldenPath,
)
assert.Empty(t, cmp.Diff(string(expected), string(actual)), "golden file mismatch (-want +got): %s, run \"make gen/golden-files\", verify and commit the changes", goldenPath)
}

// normalizeGoldenFile replaces any strings that are system or timing dependent
Expand Down
27 changes: 14 additions & 13 deletions cli/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,21 @@ func TestCreateWithRichParameters(t *testing.T) {
immutableParameterValue = "4"
)

echoResponses := prepareEchoResponses([]*proto.RichParameter{
{Name: firstParameterName, Description: firstParameterDescription, Mutable: true},
{Name: secondParameterName, DisplayName: secondParameterDisplayName, Description: secondParameterDescription, Mutable: true},
{Name: immutableParameterName, Description: immutableParameterDescription, Mutable: false},
},
)
echoResponses := func() *echo.Responses {
return prepareEchoResponses([]*proto.RichParameter{
{Name: firstParameterName, Description: firstParameterDescription, Mutable: true},
{Name: secondParameterName, DisplayName: secondParameterDisplayName, Description: secondParameterDescription, Mutable: true},
{Name: immutableParameterName, Description: immutableParameterDescription, Mutable: false},
})
}

t.Run("InputParameters", func(t *testing.T) {
t.Parallel()

client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down Expand Up @@ -385,7 +386,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down Expand Up @@ -447,7 +448,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down Expand Up @@ -488,7 +489,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down Expand Up @@ -524,7 +525,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand All @@ -549,7 +550,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down Expand Up @@ -603,7 +604,7 @@ func TestCreateWithRichParameters(t *testing.T) {
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
owner := coderdtest.CreateFirstUser(t, client)
member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses)
version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, echoResponses())
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)
Expand Down
1 change: 1 addition & 0 deletions cli/exp.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func (r *RootCmd) expCmd() *serpent.Command {
Children: []*serpent.Command{
r.scaletestCmd(),
r.errorExample(),
r.mcpCommand(),
r.promptExample(),
r.rptyCommand(),
},
Expand Down
Loading