Skip to content

kbld with flag --json swallows error #455

Open
@kumaritanushree

Description

What steps did you take:
I have config.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kbld-nginx
spec:
  selector:
    matchLabels:
      app: kbld-nginx
  template:
    metadata:
      labels:
        app: kbld-nginx
    spec:
      containers:
      - name: my-app
        image: nginxix

And it is throwing error when run kbld command without --json flag:

$ kbld -f nginx/config.yml 
kbld: Error: 
- Resolving image 'nginxix': GET https://index.docker.io/v2/library/nginxix/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/nginxix Type:repository]]

While it will exit without printing any error message or any log if will run with flag --json

What happened:
When we run kbld command with flag --json it is exiting without printing any error message or any log in case of failure.

What did you expect:
When we run kbld command with flag --json it should print error message in case of failure.

Anything else you would like to add:
[Additional information that will assist in solving the issue.]

Environment:

  • kbld version (use kbld --version):
  • Docker registry used (e.g. Docker HUB):
  • OS (e.g. from /etc/os-release):

If building images using docker:

  • Docker CLI Version (e.g. docker version)

If building images using buildkit:

  • Buildkit version (e.g. kubectl buildkit version):
  • Kubernetes version (e.g. kubectl version):

If building images using pack

  • Pack Version (e.g. pack version):

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behaviorcarvel acceptedThis issue should be considered for future work and that the triage process has been completedgood first issueAn issue that will be a good candidate for a new contributor

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions