GoogleContainerTools / GoogleContainerTools/skaffold

Cloud Run deployer is not streaming the logs from all the services associated

Open
#8,370 2 comments 0 reactions 0 assignees View on GitHub
area/logging deploy/cloud-run kind/bug priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

A Skaffold project configured with the `cloudrun` deployer, that deploys more than one Cloud Run service in a single module, only streams the logs from one of those services, the others are not printed in the console.

This works as expected when we have more than one module, each with one Cloud Run service.

### Expected behavior
To have the output of all the services deployed from the project streamed to the console.

### Actual behavior
Only one service is doing log stream.

### Information

- Skaffold version: v2.1.0
- Operating system: Mac
- Installed via: Compiled from source
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v4beta2
kind: Config

manifests:
rawYaml:
- service1.yaml
- service2.yaml

deploy:
cloudrun:
projectid:
region:
```
- service1.yaml:
```yaml
apiVersion: "serving.knative.dev/v1"
kind: Service
metadata:
name: skaffold-example-cloudrun-img-1
spec:
template:
spec:
containers:
- image: gcr.io/cloudrun/hello
```

- service2.yaml
```yaml
apiVersion: "serving.knative.dev/v1"
kind: Service
metadata:
name: skaffold-example-cloudrun-img-2
spec:
template:
spec:
containers:
- image: gcr.io/cloudrun/hello
```

### Steps to reproduce the behavior

1. Create a new folder with the `skaffold.yaml`, `service1.yaml`, and `service2.yaml` files provided above, all in the same folder
2. Run `skaffold dev` or `skaffold run --tail` (the error is present in both)
3. You'll see the following output:
```
No tags generated
Starting deploy...
Deploying Cloud Run service:
skaffold-example-cloudrun-img-1
Deploying Cloud Run service:
skaffold-example-cloudrun-img-2
Cloud Run Service skaffold-example-cloudrun-img-1 finished: Service started. 1/2 deployment(s) still pending
skaffold-example-cloudrun-img-2: Service starting: Deploying Revision. Waiting on revision skaffold-example-cloudrun-img-2-p6jd6.
Cloud Run Service skaffold-example-cloudrun-img-2 finished: Service started. 0/2 deployment(s) still pending
No artifacts found to watch
Press Ctrl+C to exit
Watching for changes...
[skaffold-example-cloudrun-img-1] streaming logs from renzo-friction-log-cloud-run
```
Here you'll see that only `skaffold-example-cloudrun-img-1` streamed the logs, and no output was produced for `skaffold-example-cloudrun-img-2`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.