Commit 97d9201
committed
chore(STONEINTG-1189): annotate build PLR when component is missing
or not found. This fixes a silent failure scenario where the Build
PipelineRun would stall if the appstudio.openshift.io/component
label was incorrect, no found or missing entirely.
Changes:
* Added logic to catch "Component Not Found" errors during the
loader phase.
* Added logic to catch cases where the component label is nil.
* In both cases, the PipelineRun is now annotated with
test.appstudio.openshift.io/create-snapshot-status="failed".
* Ensured the Finalizer is still correctly removed if the
component is not found, allowing the resource to be deleted.
Testing:
* Added unit tests in buildpipeline_controller_test.go covering
both the not found scenario and the missing label scenario.
Generated by: Cursor
Signed-off-by: jcullina <[email protected]>1 parent f8356bd commit 97d9201
File tree
1 file changed
+1
-0
lines changed- internal/controller/buildpipeline
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments