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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ protected void pushSingleImage(ImageConfiguration imageConfiguration, int retrie
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() +
"\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);
Copy link
Member

@rohanKanojia rohanKanojia Jun 27, 2023

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