Bug 1826664 - Even though Git Repo is not reachable, user can create the build
Summary: Even though Git Repo is not reachable, user can create the build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.5.0
Assignee: Debsmita Santra
QA Contact: Gajanan More
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-22 09:25 UTC by Debsmita Santra
Modified: 2023-10-06 19:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:30:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
console screenshot validating a repository (77.54 KB, image/png)
2020-05-29 15:39 UTC, Sergio G.
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5145 0 None closed Bug 1826664: handle Builder image detection when url is changed 2020-12-29 11:10:13 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:30:22 UTC

Description Debsmita Santra 2020-04-22 09:25:26 UTC
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:

Comment 3 Gajanan More 2020-05-12 06:01:59 UTC
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.

Comment 6 Debsmita Santra 2020-05-29 15:27:43 UTC
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.

Comment 7 Sergio G. 2020-05-29 15:32:57 UTC
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?

Comment 8 Sergio G. 2020-05-29 15:38:34 UTC
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.

Comment 9 Sergio G. 2020-05-29 15:39:07 UTC
Created attachment 1693417 [details]
console screenshot validating a repository

Comment 10 Debsmita Santra 2020-05-29 17:51:54 UTC
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.

Comment 14 errata-xmlrpc 2020-07-13 17:30:08 UTC
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


Note You need to log in before you can comment on or make changes to this bug.