Skip to content

Commit 25ead7b

Browse files
committed
feat(agent/agentcontainers): update containers periodically
This change introduces a significant refactor to the agentcontainers API and enabled periodic updates of Docker containers rather than on-demand. Consequently this change also allows us to move away from using a locking channel and replace it with a mutex, which simplifies usage. Additionally a previous oversight was fixed, and testing added, to clear devcontainer running/dirty status when the container has been removed. Updates #16424 Updates coder/internal#621
1 parent 98e2ec4 commit 25ead7b

File tree

5 files changed

+467
-327
lines changed

5 files changed

+467
-327
lines changed

agent/agent.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,12 +1176,6 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
11761176
}
11771177
a.metrics.startupScriptSeconds.WithLabelValues(label).Set(dur)
11781178
a.scriptRunner.StartCron()
1179-
if containerAPI := a.containerAPI.Load(); containerAPI != nil {
1180-
// Inform the container API that the agent is ready.
1181-
// This allows us to start watching for changes to
1182-
// the devcontainer configuration files.
1183-
containerAPI.SignalReady()
1184-
}
11851179
})
11861180
if err != nil {
11871181
return xerrors.Errorf("track conn goroutine: %w", err)

0 commit comments

Comments
 (0)