-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
quay-v3.12.0, quay-v3.10.6, quay-v3.11.3
-
False
-
None
-
False
-
-
-
Important
Bridge operator prompts error "invalid memory address or nil pointer dereference
" when empty output section in openshift build
- Install bridge operator and quayintegrations CR in openshift
- Create a project and buildconfig with empty output section
- start build and check bridge operator pod log
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: django-psql-example
namespace: bctest
spec:
nodeSelector: null
output: {}
resources: {}
successfulBuildsHistoryLimit: 5
failedBuildsHistoryLimit: 5
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: 'python:3.9-ubi8'
env:
- name: PIP_INDEX_URL
postCommit:
script: ./manage.py test
source:
type: Git
git:
uri: 'https://github.com/sclorg/django-ex.git'
triggers:
- type: ImageChange
imageChange: {}
- type: ConfigChange
- type: GitHub
github:
secret: WxGF5gMvrWRD6FdMuM2PcKUSIWhdVj27mmeXFmJA
runPolicy: Serial
cannot start build, bridge operator prompts error in pod log
2024-08-01T09:59:09Z DEBUG controller-runtime.webhook.webhooks received request {"webhook": "/admissionwebhook", "UID": "edc48d8d-a629-404b-947c-a2a07f585e63", "kind": "build.openshift.io/v1, Kind=Build", "resource": {"group":"build.openshift.io","version":"v1","resource":"builds"}} 2024-08-01T09:59:09Z DEBUG controller-runtime.webhook.webhooks wrote response {"webhook": "/admissionwebhook", "code": 200, "reason": "", "UID": "edc48d8d-a629-404b-947c-a2a07f585e63", "allowed": true} 2024-08-01T09:59:32Z DEBUG controller-runtime.webhook.webhooks received request {"webhook": "/admissionwebhook", "UID": "52edae88-a8f2-45a2-9d15-e07468fd86b3", "kind": "build.openshift.io/v1, Kind=Build", "resource": {"group":"build.openshift.io","version":"v1","resource":"builds"}} 2024/08/01 09:59:32 http: panic serving 10.129.0.73:51592: runtime error: invalid memory address or nil pointer dereference goroutine 4288 [running]: net/http.(*conn).serve.func1() /usr/lib/golang/src/net/http/server.go:1854 +0xbf panic({0x17c2520, 0x29de980}) /usr/lib/golang/src/runtime/panic.go:890 +0x263 github.com/quay/quay-bridge-operator/pkg/webhook.getAdmissionResponseForBuild(0xc000375500, 0xc001b74970) /remote-source/app/pkg/webhook/webhook.go:141 +0x8d github.com/quay/quay-bridge-operator/pkg/webhook.(*QuayIntegrationMutator).Handle(_, {_, _}, {{{0xc00199ab70, 0x24}, {{0xc0012112a8, 0x12}, {0xc0000000c0, 0x2}, {0xc0000000c2, ...}}, ...}}) /remote-source/app/pkg/webhook/webhook.go:82 +0x479 sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).Handle(_, {_, _}, {{{0xc00199ab70, 0x24}, {{0xc0012112a8, 0x12}, {0xc0000000c0, 0x2}, {0xc0000000c2, ...}}, ...}}) /remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/webhook.go:169 +0xfd sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).ServeHTTP(0xc00078d9c0, {0x7fb6e833d0b8?, 0xc000fb5540}, 0xc001074500) /remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/http.go:98 +0xed2 github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerInFlight.func1({0x7fb6e833d0b8, 0xc000fb5540}, 0x1c34b00?) /remote-source/app/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go:60 +0xd4 net/http.HandlerFunc.ServeHTTP(0x1c34bd0?, {0x7fb6e833d0b8?, 0xc000fb5540?}, 0xc001b75828?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1({0x1c34bd0?, 0xc001692e00?}, 0xc001074500) /remote-source/app/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go:147 +0xc5 net/http.HandlerFunc.ServeHTTP(0x7394a5?, {0x1c34bd0?, 0xc001692e00?}, 0x4133aa?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2({0x1c34bd0, 0xc001692e00}, 0xc001074500) /remote-source/app/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go:109 +0xc7 net/http.HandlerFunc.ServeHTTP(0xc001692e00?, {0x1c34bd0?, 0xc001692e00?}, 0x19b9abc?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f net/http.(*ServeMux).ServeHTTP(0xc00199ab27?, {0x1c34bd0, 0xc001692e00}, 0xc001074500) /usr/lib/golang/src/net/http/server.go:2500 +0x149 net/http.serverHandler.ServeHTTP({0x1c264f0?}, {0x1c34bd0, 0xc001692e00}, 0xc001074500) /usr/lib/golang/src/net/http/server.go:2936 +0x316 net/http.(*conn).serve(0xc001866630, {0x1c357f0, 0xc00067e7b0}) /usr/lib/golang/src/net/http/server.go:1995 +0x612 created by net/http.(*Server).Serve /usr/lib/golang/src/net/http/server.go:3089 +0x5ed