Mark provisioned agent auth failures as error#114
Mark provisioned agent auth failures as error#114mfreeman451 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
593bc6e to
8ae1cbd
Compare
bfa7893 to
3d360f2
Compare
|
Applied the same cleanup pattern here. Changes:
Current head: |
PR #114 Review: Mark provisioned agent auth failures as errorBranch: Executive SummaryThis PR adds a Critical Issues1. Duplicate & Unscoped Container Existence Check — Grove Isolation BypassFile: The PR adds a new container-existence check at the top of // Line 60-85 (NEW)
agents, err := m.Runtime.List(ctx, nil) // lists ALL containers
if err == nil {
for _, a := range agents {
if a.ContainerID == opts.Name || strings.EqualFold(a.Name, opts.Name) || ... {
// ... may return or DELETE without grove check
}
}
}The original grove-scoped check remains at lines 100–128, performing the same logic but correctly filtered by label and grove: // Line 100-128 (EXISTING)
agents, err = m.Runtime.List(ctx, map[string]string{"scion.name": slug})
// ... with matchAgentGrove(a, groveName, groveID) guardProblems:
Suggested Fix: Remove the unscoped block (lines 60–85) entirely unless there is a specific requirement to match containers that lack Scion labels. If such a requirement exists, the grove-isolation guard ( Observations2.
|
3d360f2 to
fab9d7d
Compare
|
This branch is empty against current |
Summary
errorwhen startup fails afterGetAgent()has already createdagent-info.jsonruntime.Run()is calledTesting
go test ./pkg/agent -run 'TestStart_(ErrorPropagation_Tmux|ErrorPropagation_Tmux_Missing|RunFailureMarksAgentInfoError|AuthFailureMarksAgentInfoError)$'\n