Skip to content

[backend] Inverted condition in get_container_name function makes return unreachable #697

@ai-naymul

Description

@ai-naymul

ref:

if len(candidates) > 0:

When filtering out sidecar containers leaves exactly one candidate (the expected success case), the function raises "No container names left" instead of returning the candidate. When candidates is empty, it falls through to candidates[0] which raises an IndexError.

Expected: if len(candidates) == 0 so that one remaining candidate is returned successfully.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions