Description of problem: User is able to create an application even when the git repo url is unreachable Version-Release number of selected component (if applicable): 4.5 How reproducible: Always Steps to Reproduce: 1. Go to +Add page 2. Click on From Git 3. Enter URL: 'https://github.com/gajanan194' and do not add any repo at the end and click outside and you will observe that it is showing error message as 'Git repository is not reachable.' 4. Enter all the required details and you will see that it has created the build even though it is not reachable. Actual results: Submit button is enabled. user can click on it and create an application Expected results: Submit button should be disabled if Git url is unreachable Additional info:
I have validated the bugzilla Build: 4.5.0-0.ci-2020-05-11-234936 Browser: Google Chrome Version 81.0.4044.129 Marking this as verified.
When the URL is unreachable, we don't have the capability to decide whether it's invalid or a private one because in both cases it will show the same error.
So the only test done is reaching the URL? Can you point me to the code which makes the validation so I can make some test?
Please find attached the screenshot which makes some connections to api.github.com as I type my repository. It seems that it makes something more than just reaching the URL. If the validation is going to fail for some reason and the button is going to be disable the validation should be clarified in the documentation so users are aware of them.
Created attachment 1693417 [details] console screenshot validating a repository
https://github.com/openshift/console/blob/e9536bd6d58ecaeacde5b52ceb07daa0dd776362/frontend/packages/dev-console/src/components/import/git/GitSection.tsx#L45 this is the service that we call to check if the repo is reachable. The git service that we are using doesn't help us distinguish between the scenarios: the git URL is unreachable because it's a private repo and the git URL is unreachable because the repo doesn't exist. So as part of this bug fix, we have tried to ensure that the builder image is not set if the user never manually touched the field. The form will always wait for validation of the URL and auto/manual selection of the builder image. I understand that the error message is misleading and for that, there is an action item in our backlog where the UX is going to help us with a better message having an instruction to create the source secret.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409