Bug 2074465

Summary: PipelineRun fails in import from Git flow if "main" branch is default
Product: OpenShift Container Platform Reporter: Siamak Sadeghianfar <ssadeghi>
Component: Dev ConsoleAssignee: Karthik Jeeyar <kjeeyar>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: high Docs Contact:
Priority: high    
Version: 4.10CC: aos-bugs, kjeeyar, nmukherj, viraj
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:06:14 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:
Bug Depends On:    
Bug Blocks: 2081946    

Description Siamak Sadeghianfar 2022-04-12 09:37:07 UTC
Description of problem:
The pipeline generated for a Git repo through the "Import from Git" flow fails if the Git repo uses "main". Console assumes the default branch is called "master" and sets that as the value of the GIT_REVISION pipeline parameter which would be incorrect for repositories that use "main" as the default branch and don't have a "master" branch.


How reproducible:


Steps to Reproduce:
1. Import from Git in Dev perspective
2. Provide https://github.com/siamaksade/todo-demo-app
3. Select checkbox to add pipeline
4. Create

Actual results:
The pipelinerun fails because the Git repo doesn't not have a "master" branch

Expected results:
The pipelinerun executes successfully

Comment 4 spathak@redhat.com 2022-05-24 13:01:48 UTC
Verified on build version: 4.11.0-0.nightly-2022-05-11-054135
browser version: Chrome 99

Comment 6 errata-xmlrpc 2022-08-10 11:06:14 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.11.0 bug fix and 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-2022:5069