Skip to content

Sidecar/Init containers causes verify to stop working #9626

Open
@davidgammon-mettle

Description

Expected behaviour

A test pod with side cars and init containers used by verify should work the same as one without side cars and init containers

Actual behaviour

When a pod has more than one container, verify does not work and the command hangs.

Information

  • Skaffold version: v2.13.2
  • Operating system: Mac
  • Installed via: Homebrew

Steps to reproduce the behavior

  1. Enable istio on the default namespace: istio-injection
  2. Run verify: skaffold verify -a actifacts.json

Problem

When Skaffold is querying for logs the following error occurs due to there being an Istio init container and istio side car container:
a container name must be specified for pod
Unfortunately this exception is swallowed by this code and the command seems to hang:

if err != nil {
    return false, nil
}

This PR fixes the issue by supplying the container name as part of the log options used to get the logs. This assumes that the first container is the container that is running the test image (so not ideal).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions