Bug 1948666

Summary: After entering valid git repo url on Import from git page, throwing warning message instead Validated
Product: OpenShift Container Platform Reporter: harsharm
Component: Dev ConsoleAssignee: divgupta
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 4.6CC: aivaras.laimikis, amuhamme, aos-bugs, cjerolim, divgupta, ilabrovic, kadams1, msaud, nmukherj, spathak, ssiddhar
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
===== Improved warning messages in Import from Git flow With this update, *Import from Git* flow captures more errors that occur while accessing the Git repository and shows more accurate warning messages corresponding to each error for Git repository accessibility.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-17 22:46:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description harsharm 2021-04-12 17:54:04 UTC
Description of problem:

When users try to deploy an application from git method on dev console it throws warning message for specific public repos `URL is valid but cannot be reached. If this is a private repository, enter a source secret in Advanced Git Options.`. If we ignore the warning and go ahead the build will be successful although the warning message seems to be misleading.

Actual results:
Getting a warning for url while trying to deploy an application from git method on dev console from a public repo

Expected results:
It should show validated

Comment 7 Christoph Jerolimov 2022-08-09 14:49:24 UTC
For this case with an on-prem BitBucket installation the REST API fails with CORS errors.

But the browser (Chrome at least) just throws a generic "TypeError: Failed to fetch" error in this case. So we can not add a special case for CORS errors.

I agree that should NOT show the warning "URL is valid but cannot be reached. If this is a private repository, enter a source Secret in advanced Git options" when the user enters an URL we don't understand and asking for a "Git type". In this case, we should just show the Git type dropdown.

Under this dropdown we show already an info alert "Defaulting Git type to other \n We failed to detect the Git type."

Comment 10 Ivan Labrovic 2022-12-28 16:41:42 UTC
I have the same issue. Can you share information where the "TypeError: Failed to fetch" could be found, to verify if my issue is the same as this case?

Comment 12 spathak@redhat.com 2023-02-01 14:18:14 UTC
Verified on build version: 4.13.0-0.ci-2023-01-27-131032
Browser version: Chrome 105

Comment 16 errata-xmlrpc 2023-05-17 22:46:32 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 (Important: OpenShift Container Platform 4.13.0 security update), 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/RHSA-2023:1326