Skip to content

[pull] main from coder:main #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f974add
chore: rollback PR #18025 (#18118)
BrunoQuaresma May 30, 2025
be8474a
feat: add textarea auto size (#18127)
BrunoQuaresma May 30, 2025
80b7947
chore: bump next from 14.2.26 to 15.2.4 in /offlinedocs (#18131)
dependabot[bot] May 30, 2025
4597142
feat: set default workspace proxy based on latency (#17812)
Emyrk May 30, 2025
1fba419
docs: add backend contributing guide (#18077)
mtojek May 30, 2025
216fe44
chore: align CSRF settings with deployment config (#18116)
Emyrk May 30, 2025
9afdd33
fix(coderd/database/dbmem): apply rlock/runlock on GetTelemetryItems …
johnstcn May 30, 2025
562c469
fix(coderd/database/dbmem): fill `DisplayGroup` field for `InsertWork…
DanielleMaywood May 30, 2025
9db114d
feat: add filecache prometheus metrics (#18089)
Emyrk May 30, 2025
9b53e69
feat: add early access badges for dynamic parameters (#18114)
jaaydenh May 30, 2025
d44d8ab
fix: improve task report tool complete status (#18138)
kylecarbs May 30, 2025
696d264
refactor: remove app column from tasks table (#18135)
BrunoQuaresma May 30, 2025
00502dc
feat: hide parent apps on devcontainer agents (#18120)
BrunoQuaresma May 30, 2025
9fbccc0
chore: improve iframe loading time (#18134)
BrunoQuaresma May 30, 2025
19745a2
feat: filter tasks by user (#18130)
BrunoQuaresma May 30, 2025
854ef5b
fix: improve create workspace page for dynamic parameters (#18139)
jaaydenh May 30, 2025
bf07a14
feat: add Bun v1.2.15 to dogfood image (#18154)
bpmct Jun 1, 2025
1e407fb
fix: improve build reliability with fallback apt mirrors (#18155)
bpmct Jun 2, 2025
2c8e6b9
chore: upgrade `fergusstrange/embedded-postgres` after bugfix (#18167)
dannykopping Jun 2, 2025
ef17def
chore: bump github.com/mark3labs/mcp-go from 0.30.0 to 0.31.0 (#18168)
dependabot[bot] Jun 2, 2025
33c87a2
chore: bump github.com/mocktools/go-smtp-mock/v2 from 2.4.0 to 2.5.0 …
dependabot[bot] Jun 2, 2025
9812162
chore(coderd/database/dbrollup): remove dbmem from tests (#18153)
hugodutka Jun 2, 2025
9a28cb0
chore(coderd/telemetry): remove dbmem from tests (#18148)
hugodutka Jun 2, 2025
f986d13
chore: bump github.com/fergusstrange/embedded-postgres from 1.30.0 to…
dependabot[bot] Jun 2, 2025
782d01b
chore(coderd/httpmw): remove dbmem usage from tests (#18146)
hugodutka Jun 2, 2025
d3ed6fe
chore(coderd/autobuild): use dbtestutil.WillUsePostgres instead of os…
hugodutka Jun 2, 2025
bdf227c
chore(coderd/database/dbgen): remove dbmem from tests (#18152)
hugodutka Jun 2, 2025
8ca5519
chore(coderd/idpsync): run all tests with postgres (#18149)
hugodutka Jun 2, 2025
74f0fe2
chore: bump github.com/moby/moby from 28.1.1+incompatible to 28.2.2+i…
dependabot[bot] Jun 2, 2025
d1fc0dd
chore(coderd/database/dbmetrics): remove dbmem from tests (#18150)
hugodutka Jun 2, 2025
1d48131
chore(coderd/externalauth): remove dbmem from tests (#18147)
hugodutka Jun 2, 2025
2e7cd0f
chore(coderd/database/dbpurge): remove dbmem from tests (#18151)
hugodutka Jun 2, 2025
2a0a268
chore: exempt blink agent from CLA (#18190)
bpmct Jun 2, 2025
87c4948
fix: do not block form control rendering for dynamic parameters on pa…
jaaydenh Jun 2, 2025
45d46c8
refactor: minor task page design adjustments (#18187)
BrunoQuaresma Jun 2, 2025
322f1e4
fix: improve task prompt placeholder consistency (#18189)
blink-so[bot] Jun 2, 2025
246a829
feat: evaluate dynamic parameters http endpoint (#18182)
Emyrk Jun 2, 2025
1d27d4f
refactor: reduce the default workspace name for a task (#18193)
BrunoQuaresma Jun 2, 2025
fd6981e
fix: fix flashing error dialog in the create workspace page (#18180)
jaaydenh Jun 2, 2025
cba69f3
docs: update SSH command format to use suffix (#18085)
matifali Jun 3, 2025
4a2b243
docs: improve JetBrains Toolbox connection docs (#18125)
matifali Jun 3, 2025
535a59e
docs: add link for Coder Desktop docs on workspace page (#18202)
matifali Jun 3, 2025
b0d23ca
fix: remove duplicated envbuilder vars (#18144)
ericpaulsen Jun 3, 2025
da9a313
fix(cli): allow specifying empty provisioner tag set with --provision…
johnstcn Jun 3, 2025
7b273b0
fix: add blink-so to contributors bypass (#18215)
kylecarbs Jun 3, 2025
cc89820
feat: add template export functionality to UI (#18214)
blink-so[bot] Jun 3, 2025
63adfa5
docs: add link to official jetbrains toolbox (#18128)
EdwardAngert Jun 3, 2025
13449b9
feat: embed chat ui in the task sidebar (#18216)
BrunoQuaresma Jun 3, 2025
00fb610
chore: use Quartz 0.2.1 instead of unreleased tip of main (#18198)
spikecurtis Jun 4, 2025
9e1967b
feat: allow clipboard read and write on app iframes (#18221)
BrunoQuaresma Jun 4, 2025
4d0fe20
chore(coderd/database/dbauthz): update RBAC for InsertWorkspaceApp (#…
DanielleMaywood Jun 4, 2025
5f7e5d7
feat: support prebuilt workspaces in non-default organizations (#18010)
SasSwart Jun 4, 2025
61f2b04
fix: embed agentapi chat in the sidebar iframe (#18230)
hugodutka Jun 4, 2025
51ed624
chore: update preview to handle meta `count` for parameters (#18231)
Emyrk Jun 4, 2025
97ba7f1
docs: fix alert in artifactory guide (#18235)
matifali Jun 4, 2025
a6e2d2d
docs: add descriptions to items in manifest (#18064)
EdwardAngert Jun 4, 2025
60927c7
docs: edit troubleshooting steps in Coder Desktop documentation (#18233)
EdwardAngert Jun 4, 2025
9ef44e6
ci: bump the github-actions group with 3 updates (#18177)
dependabot[bot] Jun 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ jobs:
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4

- name: Set up Flux CLI
uses: fluxcd/flux2/action@8d5f40dca5aa5d3c0fc3414457dda15a0ac92fa4 # v2.5.1
uses: fluxcd/flux2/action@b73c7f7191086ca7629840e680e71873349787f8 # v2.6.1
with:
# Keep this and the github action up to date with the version of flux installed in dogfood cluster
version: "2.5.1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# branch should not be protected
branch: "main"
# Some users have signed a corporate CLA with Coder so are exempt from signing our community one.
allowlist: "coryb,aaronlehmann,dependabot*"
allowlist: "coryb,aaronlehmann,dependabot*,blink-so*"

release-labels:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Node
uses: ./.github/actions/setup-node

- uses: tj-actions/changed-files@3981e4f74104e7a4c67a835e1e5dd5d9eb0f0a57 # v45.0.7
- uses: tj-actions/changed-files@115870536a85eaf050e369291c7895748ff12aea # v45.0.7
id: changed-files
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
Expand Down
2 changes: 1 addition & 1 deletion cli/configssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (r *RootCmd) configSSH() *serpent.Command {
cmd := &serpent.Command{
Annotations: workspaceCommand,
Use: "config-ssh",
Short: "Add an SSH Host entry for your workspaces \"ssh coder.workspace\"",
Short: "Add an SSH Host entry for your workspaces \"ssh workspace.coder\"",
Long: FormatExamples(
Example{
Description: "You can use -o (or --ssh-option) so set SSH options to be used for all your workspaces",
Expand Down
58 changes: 42 additions & 16 deletions cli/templatepush.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/http"
"os"
"path/filepath"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -80,6 +81,46 @@ func (r *RootCmd) templatePush() *serpent.Command {
createTemplate = true
}

var tags map[string]string
// Passing --provisioner-tag="-" allows the user to clear all provisioner tags.
if len(provisionerTags) == 1 && strings.TrimSpace(provisionerTags[0]) == "-" {
cliui.Warn(inv.Stderr, "Not reusing provisioner tags from the previous template version.")
tags = map[string]string{}
} else {
tags, err = ParseProvisionerTags(provisionerTags)
if err != nil {
return err
}

// If user hasn't provided new provisioner tags, inherit ones from the active template version.
if len(tags) == 0 && template.ActiveVersionID != uuid.Nil {
templateVersion, err := client.TemplateVersion(inv.Context(), template.ActiveVersionID)
if err != nil {
return err
}
tags = templateVersion.Job.Tags
cliui.Info(inv.Stderr, "Re-using provisioner tags from the active template version.")
cliui.Info(inv.Stderr, "Tip: You can override these tags by passing "+cliui.Code(`--provisioner-tag="key=value"`)+".")
cliui.Info(inv.Stderr, " You can also clear all provisioner tags by passing "+cliui.Code(`--provisioner-tag="-"`)+".")
}
}

{ // For clarity, display provisioner tags to the user.
var tmp []string
for k, v := range tags {
if k == provisionersdk.TagScope || k == provisionersdk.TagOwner {
continue
}
tmp = append(tmp, fmt.Sprintf("%s=%q", k, v))
}
slices.Sort(tmp)
tagStr := strings.Join(tmp, " ")
if len(tmp) == 0 {
tagStr = "<none>"
}
cliui.Info(inv.Stderr, "Provisioner tags: "+cliui.Code(tagStr))
}

err = uploadFlags.checkForLockfile(inv)
if err != nil {
return xerrors.Errorf("check for lockfile: %w", err)
Expand All @@ -104,21 +145,6 @@ func (r *RootCmd) templatePush() *serpent.Command {
return err
}

tags, err := ParseProvisionerTags(provisionerTags)
if err != nil {
return err
}

// If user hasn't provided new provisioner tags, inherit ones from the active template version.
if len(tags) == 0 && template.ActiveVersionID != uuid.Nil {
templateVersion, err := client.TemplateVersion(inv.Context(), template.ActiveVersionID)
if err != nil {
return err
}
tags = templateVersion.Job.Tags
inv.Logger.Info(inv.Context(), "reusing existing provisioner tags", "tags", tags)
}

userVariableValues, err := codersdk.ParseUserVariableValues(
varsFiles,
variablesFile,
Expand Down Expand Up @@ -214,7 +240,7 @@ func (r *RootCmd) templatePush() *serpent.Command {
},
{
Flag: "provisioner-tag",
Description: "Specify a set of tags to target provisioner daemons.",
Description: "Specify a set of tags to target provisioner daemons. If you do not specify any tags, the tags from the active template version will be reused, if available. To remove existing tags, use --provisioner-tag=\"-\".",
Value: serpent.StringArrayOf(&provisionerTags),
},
{
Expand Down
71 changes: 70 additions & 1 deletion cli/templatepush_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ func TestTemplatePush(t *testing.T) {
templateVersion = coderdtest.AwaitTemplateVersionJobCompleted(t, client, templateVersion.ID)
template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, templateVersion.ID)

// Push new template version without provisioner tags. CLI should reuse tags from the previous version.
// Push new template version with different provisioner tags.
source := clitest.CreateTemplateVersionSource(t, &echo.Responses{
Parse: echo.ParseComplete,
ProvisionApply: echo.ApplyComplete,
Expand Down Expand Up @@ -639,6 +639,75 @@ func TestTemplatePush(t *testing.T) {
require.EqualValues(t, map[string]string{"foobar": "foobaz", "owner": "", "scope": "organization"}, templateVersion.Job.Tags)
})

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

ctx := testutil.Context(t, testutil.WaitLong)

// Start the first provisioner with no tags.
client, provisionerDocker, api := coderdtest.NewWithAPI(t, &coderdtest.Options{
IncludeProvisionerDaemon: true,
ProvisionerDaemonTags: map[string]string{},
})
defer provisionerDocker.Close()

// Start the second provisioner with a tag set.
provisionerFoobar := coderdtest.NewTaggedProvisionerDaemon(t, api, "provisioner-foobar", map[string]string{
"foobar": "foobaz",
})
defer provisionerFoobar.Close()

owner := coderdtest.CreateFirstUser(t, client)
templateAdmin, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID, rbac.RoleTemplateAdmin())

// Create the template with initial tagged template version.
templateVersion := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, nil, func(ctvr *codersdk.CreateTemplateVersionRequest) {
ctvr.ProvisionerTags = map[string]string{
"foobar": "foobaz",
}
})
templateVersion = coderdtest.AwaitTemplateVersionJobCompleted(t, client, templateVersion.ID)
template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, templateVersion.ID)

// Stop the tagged provisioner daemon.
provisionerFoobar.Close()

// Push new template version with no provisioner tags.
source := clitest.CreateTemplateVersionSource(t, &echo.Responses{
Parse: echo.ParseComplete,
ProvisionApply: echo.ApplyComplete,
})
inv, root := clitest.New(t, "templates", "push", template.Name, "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho), "--name", template.Name, "--provisioner-tag=\"-\"")
clitest.SetupConfig(t, templateAdmin, root)
pty := ptytest.New(t).Attach(inv)

execDone := make(chan error)
go func() {
execDone <- inv.WithContext(ctx).Run()
}()

matches := []struct {
match string
write string
}{
{match: "Upload", write: "yes"},
}
for _, m := range matches {
pty.ExpectMatch(m.match)
pty.WriteLine(m.write)
}

require.NoError(t, <-execDone)

// Verify template version tags
template, err := client.Template(ctx, template.ID)
require.NoError(t, err)

templateVersion, err = client.TemplateVersion(ctx, template.ActiveVersionID)
require.NoError(t, err)
require.EqualValues(t, map[string]string{"owner": "", "scope": "organization"}, templateVersion.Job.Tags)
})

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

Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SUBCOMMANDS:
completion Install or update shell completion scripts for the
detected or chosen shell.
config-ssh Add an SSH Host entry for your workspaces "ssh
coder.workspace"
workspace.coder"
create Create a workspace
delete Delete a workspace
dotfiles Personalize your workspace by applying a canonical
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_config-ssh_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ coder v0.0.0-devel
USAGE:
coder config-ssh [flags]

Add an SSH Host entry for your workspaces "ssh coder.workspace"
Add an SSH Host entry for your workspaces "ssh workspace.coder"

- You can use -o (or --ssh-option) so set SSH options to be used for all
your
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_list_--output_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"workspace_id": "===========[workspace ID]===========",
"workspace_name": "test-workspace",
"workspace_owner_id": "==========[first user ID]===========",
"workspace_owner_username": "testuser",
"workspace_owner_name": "testuser",
"template_version_id": "============[version ID]============",
"template_version_name": "===========[version name]===========",
"build_number": 1,
Expand Down
5 changes: 4 additions & 1 deletion cli/testdata/coder_templates_push_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ OPTIONS:
generated if not provided.

--provisioner-tag string-array
Specify a set of tags to target provisioner daemons.
Specify a set of tags to target provisioner daemons. If you do not
specify any tags, the tags from the active template version will be
reused, if available. To remove existing tags, use
--provisioner-tag="-".

--var string-array
Alias of --variable.
Expand Down
Loading
Loading