Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception viewing logs #1068

Closed
elthrasher opened this issue Aug 2, 2019 · 0 comments · Fixed by #1086
Closed

Unhandled exception viewing logs #1068

elthrasher opened this issue Aug 2, 2019 · 0 comments · Fixed by #1086
Assignees
Labels
bug priority:medium Medium priority issue or feature

Comments

@elthrasher
Copy link

Bug

Current Behavior

When clicking "Logs" on the daskboard, it spins forever, and I see this in my console:

Screen Shot 2019-08-02 at 8 51 18 AM

The line of code throwing this error appears to be: https://github.com/garden-io/garden/blob/master/garden-service/src/plugins/kubernetes/util.ts#L67

I am using the stable/mysql helm chart which doesn't have a selector key in the spec. I logged the object to my console:

{ apiVersion: 'extensions/v1beta1',
  kind: 'Deployment',
  metadata:
   { name: 'mysql',
     namespace: 'local',
     labels:
      { app: 'mysql',
        chart: 'mysql-1.3.0',
        release: 'mysql',
        heritage: 'Tiller' },
     annotations: {} },
  spec: { template: { metadata: [Object], spec: [Object] } } }

Here's from my garden.yml:

kind: Module
type: helm
name: mysql
description: Mysql deployment via helm
chart: stable/mysql
values:
  mysqlRootPassword: password
  initializationFiles:
    oauth-db.sql: |-
      CREATE DATABASE IF NOT EXISTS oauth;

Expected behavior

Exceptions are caught. Logs can be viewed.

Reproducible example

kind: Project
name: oauth2
environments:
  - name: local
    variables:
      namespace: local
providers:
  - name: local-kubernetes
    environments: [local]
    namespace: local
    
---
# mysql
kind: Module
type: helm
name: mysql
description: Mysql deployment via helm
chart: stable/mysql
values:
  mysqlRootPassword: password
  initializationFiles:
    oauth-db.sql: |-
      CREATE DATABASE IF NOT EXISTS oauth;

Workaround

Get logs via kubectl :(

Suggested solution(s)

🔜 microsoft/TypeScript#16 (comment)

Your environment

docker-for-desktop mac

garden version
0.10.3
kubectl version

Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}```
`docker version`

Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:18:17 2019
OS/Arch: darwin/amd64
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:17:52 2019
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683

@10ko 10ko self-assigned this Aug 2, 2019
@10ko 10ko added the bug label Aug 2, 2019
@eysi09 eysi09 added the priority:medium Medium priority issue or feature label Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority:medium Medium priority issue or feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants