Bug 1999179

Summary: Import from git as Serverless Service creates an incomplete BuildConfig (Secret is missing)
Product: OpenShift Container Platform Reporter: Mohammed Saud <msaud>
Component: Dev ConsoleAssignee: Mohammed Saud <msaud>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: medium Docs Contact:
Priority: low    
Version: 4.9CC: aos-bugs, cjerolim, mifiedle, nmukherj
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2000474 (view as bug list) Environment:
Last Closed: 2021-10-18 17:49:58 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:
Bug Depends On:    
Bug Blocks: 2000474    

Description Mohammed Saud 2021-08-30 15:48:11 UTC
Description of problem:

When the user imports from Git and selects "Serverless Deployment" as resource type, the generated BuildConfig is incomplete and shows a warning alert when on the BuildConfig detail page.

The warning blames a missing Secret "${service-name}-github-webhook-secret"

Everything else (build and service start) works fine.

Prerequisites (if any, like setup, operators/versions):
OpenShift Serverless operator

Steps to Reproduce
1. Open developer perspective, Add page, Import from Git
2. Enter a git URL
3. As resources select "Serverless Deployment"
4. Create
5. Open navigation entry "Builds" and the new created "BuildConfig" (app name)

Actual results:
The BuildConfig detail page shows a warning between the general infos and webhooks.

There is 1 warning alert.
Error: secrets "nodeinfo-serverless-github-webhook-secret" not found

The BuildConfig links two webhooks. The generic webhook is clickable, the GitHub webhook is not clickable.

The YAML tab lists two secrets for triggers. Only one of the both secrets is created.
    - type: Generic
          name: nodeinfo-serverless-generic-webhook-secret       # exists
    - type: GitHub
          name: nodeinfo-serverless-github-webhook-secret        # does not exist
    - type: ImageChange
        lastTriggeredImageID: >-

Expected results:
The BuildConfig should now show a warning that a secret is missing.

Both secrets should be created OR the second trigger should not be created.

Reproducibility (Always/Intermittent/Only Once):

Build Details:
4.9 master (tested with console commit c0ba821c0b385db10107f4413d67abe01f89f0c3)

Additional info:

Comment 4 Christoph Jerolimov 2021-09-02 19:45:24 UTC
Verified on 4.9.0-0.nightly-2021-09-01-193941

Comment 7 errata-xmlrpc 2021-10-18 17:49:58 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 (Moderate: OpenShift Container Platform 4.9.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.