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

Skip to content

Commit ab8ff07

Browse files
authored
Merge branch 'main' into mes/logo-revamp
2 parents 55579c7 + fe22b2c commit ab8ff07

File tree

204 files changed

+10238
-2729
lines changed

Some content is hidden

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

204 files changed

+10238
-2729
lines changed

.github/.linkspector.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ ignorePatterns:
2424
- pattern: "mutagen.io"
2525
- pattern: "docs.github.com"
2626
- pattern: "claude.ai"
27+
- pattern: "splunk.com"
2728
aliveStatusCodes:
2829
- 200

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,4 @@ Read [cursor rules](.cursorrules).
103103

104104
The frontend is contained in the site folder.
105105

106-
For building Frontend refer to [this document](docs/contributing/frontend.md)
107106
For building Frontend refer to [this document](docs/about/contributing/frontend.md)

agent/agent.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ type Options struct {
8989
ServiceBannerRefreshInterval time.Duration
9090
BlockFileTransfer bool
9191
Execer agentexec.Execer
92-
93-
ExperimentalDevcontainersEnabled bool
94-
ContainerAPIOptions []agentcontainers.Option // Enable ExperimentalDevcontainersEnabled for these to be effective.
92+
Devcontainers bool
93+
DevcontainerAPIOptions []agentcontainers.Option // Enable Devcontainers for these to be effective.
9594
}
9695

9796
type Client interface {
@@ -190,8 +189,8 @@ func New(options Options) Agent {
190189
metrics: newAgentMetrics(prometheusRegistry),
191190
execer: options.Execer,
192191

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

275-
experimentalDevcontainersEnabled bool
276-
containerAPIOptions []agentcontainers.Option
277-
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.
274+
devcontainers bool
275+
containerAPIOptions []agentcontainers.Option
276+
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.
278277
}
279278

280279
func (a *agent) TailnetConn() *tailnet.Conn {
@@ -311,7 +310,7 @@ func (a *agent) init() {
311310
return a.reportConnection(id, connectionType, ip)
312311
},
313312

314-
ExperimentalDevContainersEnabled: a.experimentalDevcontainersEnabled,
313+
ExperimentalContainers: a.devcontainers,
315314
})
316315
if err != nil {
317316
panic(err)
@@ -340,7 +339,7 @@ func (a *agent) init() {
340339
a.metrics.connectionsTotal, a.metrics.reconnectingPTYErrors,
341340
a.reconnectingPTYTimeout,
342341
func(s *reconnectingpty.Server) {
343-
s.ExperimentalDevcontainersEnabled = a.experimentalDevcontainersEnabled
342+
s.ExperimentalContainers = a.devcontainers
344343
},
345344
)
346345
go a.runLoop()
@@ -1087,9 +1086,9 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
10871086
slog.F("parent_id", manifest.ParentID),
10881087
slog.F("agent_id", manifest.AgentID),
10891088
)
1090-
if a.experimentalDevcontainersEnabled {
1089+
if a.devcontainers {
10911090
a.logger.Info(ctx, "devcontainers are not supported on sub agents, disabling feature")
1092-
a.experimentalDevcontainersEnabled = false
1091+
a.devcontainers = false
10931092
}
10941093
}
10951094
a.client.RewriteDERPMap(manifest.DERPMap)
@@ -1145,7 +1144,7 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
11451144
scripts = manifest.Scripts
11461145
scriptRunnerOpts []agentscripts.InitOption
11471146
)
1148-
if a.experimentalDevcontainersEnabled {
1147+
if a.devcontainers {
11491148
var dcScripts []codersdk.WorkspaceAgentScript
11501149
scripts, dcScripts = agentcontainers.ExtractAndInitializeDevcontainerScripts(manifest.Devcontainers, scripts)
11511150
// See ExtractAndInitializeDevcontainerScripts for motivation

agent/agent_test.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,8 +1954,8 @@ func TestAgent_ReconnectingPTYContainer(t *testing.T) {
19541954

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

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

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

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

24452444
// Query the containers API endpoint. This should fail because

0 commit comments

Comments
 (0)