Description of the problem: When creating an application -> subscription using the UI, the git branch field is not mandatory. But it doesn't work if you don't specify one Release version: 2.4.1 Operator snapshot version: 2.4.1 OCP version: Browser Info: Firefox/Chrome/Whatever Steps to reproduce: 1. Create an application -> subscription 2. Point it to a git repo 3. Actual results: The subscription fails with: 'failed to initialize Git connection, err: Failed to get Git clone options with the secondary channel: err: no secondary channel to try' Expected results: To use the default branch Additional info: https://github.com/stolostron/multicloud-operators-subscription/blob/main/pkg/utils/gitrepo.go#L569-L578 doesn't seem to set a default branch.
I guess it would be better if instead of an annotation it is a spec on the object itself so it can be enforced.
The backend defaults to master branch if no branch is specified by the user. https://github.com/stolostron/multicloud-operators-subscription/blob/38971b8046fd763ba9b14fe7117deab3c6a44adb/pkg/utils/gitrepo.go#L581 This is also documented in 1.4.1.4.1. Subscribing to a specific branch section of https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.4/html/applications/managing-applications#subscribing-git-resources. We could make UI display this default master branch.
(In reply to Roke Jung from comment #2) > The backend defaults to master branch if no branch is specified by the user. > https://github.com/stolostron/multicloud-operators-subscription/blob/ > 38971b8046fd763ba9b14fe7117deab3c6a44adb/pkg/utils/gitrepo.go#L581 > > This is also documented in 1.4.1.4.1. Subscribing to a specific branch > section of > https://access.redhat.com/documentation/en-us/ > red_hat_advanced_cluster_management_for_kubernetes/2.4/html/applications/ > managing-applications#subscribing-git-resources. > > We could make UI display this default master branch. +1 and add a more detailed information about the branch used by default (see attachment for current version)
It will be fixed in 2.4.2 so that when Git branch is not provided, the default branch of the repo will be used regardless of the branch name.
Shouldnt this be moved to ON QA or errate stage since the fix has been pushed to 2.4.2?
CICD mentioned the state can be MODIFIED or VERIFIED to pick up the ERRATA properly.
G2Bsync 1048867667 comment rafat-islam1 Wed, 23 Feb 2022 14:54:26 UTC G2Bsync Verified in 2.4.2 RC3. I was able to deploy an app without mentioning the branch and only mentioning the path to the application yaml. The application was successfully deployed Tested on : Azure with OCP 4.9 and ACM 2.4.2 RC3
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: Red Hat Advanced Cluster Management 2.4.2 security updates and bug fixes), 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:0735