Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Improve "not found" error message #121

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

drigz
Copy link

@drigz drigz commented Mar 6, 2018

The current message:

The following image references were not found: [eu.gcr.io/robco-rodrigoq/move-endpoint:latest]

suggests to the untrained eye that they should check that image has not
been found on the container registry, as the user may not know that the
resolver is replacing image references inside the YAML file.

This commit changes the message to:

ERROR: The following image references were not found in '/your/bazel/cache/dir/execroot/__main__bazel-out/k8-opt/bin/your/package/path/k8s.runfiles/__main__/your/package/path/deployment.yaml':
    eu.gcr.io/robco-rodrigoq/move-endpoint:latest

which is very long but hopefully clearer, as the user can look at that
file to work out why the image reference is not found.

The current message:

```
The following image references were not found: [eu.gcr.io/robco-rodrigoq/move-endpoint:latest]
```

suggests to the untrained eye that they should check that image has not
been found on the container registry, as the user may not know that the
resolver is replacing image references inside the YAML file.

This commit changes the message to:

```
ERROR: The following image references were not found in '/your/bazel/cache/dir/execroot/__main__bazel-out/k8-opt/bin/your/package/path/k8s.runfiles/__main__/your/package/path/deployment.yaml':
    eu.gcr.io/robco-rodrigoq/move-endpoint:latest
```

which is very long but hopefully clearer, as the user can look at that
file to work out why the image reference is not found.
@drigz
Copy link
Author

drigz commented Mar 6, 2018

@ensonic found the original error message unclear. Do you think this would have avoided the confusion?

@drigz
Copy link
Author

drigz commented Mar 6, 2018

Error on Travis build:

$ docker login -u _json_key -p "${GOOGLE_JSON_KEY}" https://us.gcr.io
Password: 
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

@drigz drigz closed this Mar 6, 2018
@drigz drigz reopened this Mar 6, 2018
@drigz
Copy link
Author

drigz commented Mar 6, 2018

Oops, wrong button.

@mattmoor
Copy link
Contributor

mattmoor commented Mar 6, 2018

@drigz that's because it's not from a branch on the repo, ignore Travis for now.

@mattmoor mattmoor changed the base branch from master to improve-errors March 8, 2018 04:54
@mattmoor mattmoor merged commit 03a073f into bazelbuild:improve-errors Mar 8, 2018
mattmoor added a commit that referenced this pull request Mar 8, 2018
The current message:

```
The following image references were not found: [eu.gcr.io/robco-rodrigoq/move-endpoint:latest]
```

suggests to the untrained eye that they should check that image has not
been found on the container registry, as the user may not know that the
resolver is replacing image references inside the YAML file.

This commit changes the message to:

```
ERROR: The following image references were not found in '/your/bazel/cache/dir/execroot/__main__bazel-out/k8-opt/bin/your/package/path/k8s.runfiles/__main__/your/package/path/deployment.yaml':
    eu.gcr.io/robco-rodrigoq/move-endpoint:latest
```

which is very long but hopefully clearer, as the user can look at that
file to work out why the image reference is not found.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants