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

Skip to content

[pull] main from coder:main #270

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 23 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45ab265
chore: add permissions to autobuilder & prebuilder to run wsbuild (#1…
Emyrk Jun 24, 2025
4ff2254
chore: remove ai tasks from experiment (#18511)
hugodutka Jun 24, 2025
1d2b96b
feat: implement efficient backend querying on the tasks page (#18488)
hugodutka Jun 24, 2025
a4f1c64
fix: allow dynamic parameters to consider the prebuilds user an owner…
SasSwart Jun 24, 2025
5816455
fix: remove reference to a deleted variable (#18532)
hugodutka Jun 24, 2025
341b54e
fix: allow dynamic parameters without requiring org membership (#18531)
Emyrk Jun 24, 2025
f44969b
chore: reorder prebuilt workspace authorization logic (#18506)
ssncferreira Jun 24, 2025
dc24922
fix: use the correct key for tasks tab visibility in embedded metadat…
hugodutka Jun 24, 2025
cd484db
fix: only override img size for direct button children (#18540)
BrunoQuaresma Jun 24, 2025
e5eb2a8
fix: prebuild user without ssh key when fetching owner ctx (#18541)
Emyrk Jun 24, 2025
ccf294e
chore: improve visuals of dynamic parameters (#18537)
jaaydenh Jun 24, 2025
b2009b2
chore: add a claude.md markdown file focusing on the frontend (#18510)
jaaydenh Jun 24, 2025
b6c493d
fix: correct hasAITaskResources logic for child modules (#18542)
hugodutka Jun 24, 2025
64a2214
fix(agent/agentcontainers): remove shellquote in favor of %q (#18544)
mafredri Jun 24, 2025
4fd0312
feat: use backend-supplied sidebar app id on the /task/$id page (#18458)
hugodutka Jun 24, 2025
fcf9371
feat(agent/agentcontainers): retry with longer name on failure (#18513)
DanielleMaywood Jun 24, 2025
99d124e
feat(agent): enable devcontainers by default (#18533)
mafredri Jun 24, 2025
7070e47
fix: update workspace table icons in WorkspacesTable (#18525)
johnstcn Jun 24, 2025
b9e32c8
refactor: remove unused enterprise prebuilds id.go (#18543)
ssncferreira Jun 24, 2025
06c997a
chore: make telemetry use_classic_parameter_flow nullable (#18547)
Emyrk Jun 24, 2025
e443f86
feat(agent/agentcontainers): implement ignore customization for devco…
mafredri Jun 24, 2025
b93db1c
fix: site: replace CirclePlayIcon with PlayIcon (#18549)
johnstcn Jun 24, 2025
6ed2204
chore: use pause icon for app idle state (#18546)
code-asher Jun 24, 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
25 changes: 12 additions & 13 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ type Options struct {
ServiceBannerRefreshInterval time.Duration
BlockFileTransfer bool
Execer agentexec.Execer

ExperimentalDevcontainersEnabled bool
ContainerAPIOptions []agentcontainers.Option // Enable ExperimentalDevcontainersEnabled for these to be effective.
Devcontainers bool
DevcontainerAPIOptions []agentcontainers.Option // Enable Devcontainers for these to be effective.
}

type Client interface {
Expand Down Expand Up @@ -190,8 +189,8 @@ func New(options Options) Agent {
metrics: newAgentMetrics(prometheusRegistry),
execer: options.Execer,

experimentalDevcontainersEnabled: options.ExperimentalDevcontainersEnabled,
containerAPIOptions: options.ContainerAPIOptions,
devcontainers: options.Devcontainers,
containerAPIOptions: options.DevcontainerAPIOptions,
}
// Initially, we have a closed channel, reflecting the fact that we are not initially connected.
// Each time we connect we replace the channel (while holding the closeMutex) with a new one
Expand Down Expand Up @@ -272,9 +271,9 @@ type agent struct {
metrics *agentMetrics
execer agentexec.Execer

experimentalDevcontainersEnabled bool
containerAPIOptions []agentcontainers.Option
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.
devcontainers bool
containerAPIOptions []agentcontainers.Option
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.
}

func (a *agent) TailnetConn() *tailnet.Conn {
Expand Down Expand Up @@ -311,7 +310,7 @@ func (a *agent) init() {
return a.reportConnection(id, connectionType, ip)
},

ExperimentalDevContainersEnabled: a.experimentalDevcontainersEnabled,
ExperimentalContainers: a.devcontainers,
})
if err != nil {
panic(err)
Expand Down Expand Up @@ -340,7 +339,7 @@ func (a *agent) init() {
a.metrics.connectionsTotal, a.metrics.reconnectingPTYErrors,
a.reconnectingPTYTimeout,
func(s *reconnectingpty.Server) {
s.ExperimentalDevcontainersEnabled = a.experimentalDevcontainersEnabled
s.ExperimentalContainers = a.devcontainers
},
)
go a.runLoop()
Expand Down Expand Up @@ -1087,9 +1086,9 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
slog.F("parent_id", manifest.ParentID),
slog.F("agent_id", manifest.AgentID),
)
if a.experimentalDevcontainersEnabled {
if a.devcontainers {
a.logger.Info(ctx, "devcontainers are not supported on sub agents, disabling feature")
a.experimentalDevcontainersEnabled = false
a.devcontainers = false
}
}
a.client.RewriteDERPMap(manifest.DERPMap)
Expand Down Expand Up @@ -1145,7 +1144,7 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
scripts = manifest.Scripts
scriptRunnerOpts []agentscripts.InitOption
)
if a.experimentalDevcontainersEnabled {
if a.devcontainers {
var dcScripts []codersdk.WorkspaceAgentScript
scripts, dcScripts = agentcontainers.ExtractAndInitializeDevcontainerScripts(manifest.Devcontainers, scripts)
// See ExtractAndInitializeDevcontainerScripts for motivation
Expand Down
17 changes: 8 additions & 9 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1954,8 +1954,8 @@ func TestAgent_ReconnectingPTYContainer(t *testing.T) {

// nolint: dogsled
conn, _, _, _, _ := setupAgent(t, agentsdk.Manifest{}, 0, func(_ *agenttest.Client, o *agent.Options) {
o.ExperimentalDevcontainersEnabled = true
o.ContainerAPIOptions = append(o.ContainerAPIOptions,
o.Devcontainers = true
o.DevcontainerAPIOptions = append(o.DevcontainerAPIOptions,
agentcontainers.WithContainerLabelIncludeFilter("this.label.does.not.exist.ignore.devcontainers", "true"),
)
})
Expand Down Expand Up @@ -2161,9 +2161,9 @@ func TestAgent_DevcontainerAutostart(t *testing.T) {

//nolint:dogsled
_, agentClient, _, _, _ := setupAgent(t, manifest, 0, func(_ *agenttest.Client, o *agent.Options) {
o.ExperimentalDevcontainersEnabled = true
o.ContainerAPIOptions = append(
o.ContainerAPIOptions,
o.Devcontainers = true
o.DevcontainerAPIOptions = append(
o.DevcontainerAPIOptions,
// Only match this specific dev container.
agentcontainers.WithClock(mClock),
agentcontainers.WithContainerLabelIncludeFilter("devcontainer.local_folder", tempWorkspaceFolder),
Expand Down Expand Up @@ -2312,8 +2312,8 @@ func TestAgent_DevcontainerRecreate(t *testing.T) {

//nolint:dogsled
conn, client, _, _, _ := setupAgent(t, manifest, 0, func(_ *agenttest.Client, o *agent.Options) {
o.ExperimentalDevcontainersEnabled = true
o.ContainerAPIOptions = append(o.ContainerAPIOptions,
o.Devcontainers = true
o.DevcontainerAPIOptions = append(o.DevcontainerAPIOptions,
agentcontainers.WithContainerLabelIncludeFilter("devcontainer.local_folder", workspaceFolder),
)
})
Expand Down Expand Up @@ -2438,8 +2438,7 @@ func TestAgent_DevcontainersDisabledForSubAgent(t *testing.T) {

// Setup the agent with devcontainers enabled initially.
//nolint:dogsled
conn, _, _, _, _ := setupAgent(t, manifest, 0, func(_ *agenttest.Client, o *agent.Options) {
o.ExperimentalDevcontainersEnabled = true
conn, _, _, _, _ := setupAgent(t, manifest, 0, func(*agenttest.Client, *agent.Options) {
})

// Query the containers API endpoint. This should fail because
Expand Down
Loading
Loading