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

Fixed #1769 Suggest to rename the image name #2245

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -70,7 +70,10 @@
try {
dockerServices.getRegistryService().pushImage(imageConfiguration, retries, registryConfig, skipTag);
} catch (IOException ex) {
throw new JKubeServiceException("Error while trying to push the image: " + ex.getMessage(), ex);
String message = "Error while trying to push the image: " + ex.getMessage() +

Check warning on line 73 in jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/DockerBuildService.java

View check run for this annotation

Codecov / codecov/patch

jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/DockerBuildService.java#L73

Added line #L73 was not covered by tests
"\nPossible issue: wrong image name or registry." +
"\nHint: Rename image name or registry with the jkube.generator.name property = registry name and user name and image name";
throw new JKubeServiceException(message, ex);

Check warning on line 76 in jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/DockerBuildService.java

View check run for this annotation

Codecov / codecov/patch

jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/DockerBuildService.java#L76

Added line #L76 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should always log this warning. IOException could also mean problems with network. It would be better if we could rely on docker response codes. If not you can check the exception message for keywords like unauthorized/denied etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to do the same for JibBuildService as well.

}
}

Expand Down