Skip to content

Commit d6c14f3

Browse files
authored
feat(agent/agentcontainers): update containers periodically (#17972)
This change introduces a significant refactor to the agentcontainers API and enables 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 13b41c2 commit d6c14f3

File tree

6 files changed

+525
-334
lines changed

6 files changed

+525
-334
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy