Bug 13191

Summary: [Test Case 1439] Build Failure after when 'Image Name' missing in event for buildinfohelper
Product: [Build System, Metadata & Runtime] Toaster Reporter: pavan <rpawan.1205>
Component: toasterAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact: Toaster default assignee <toaster>
Severity: normal    
Priority: Medium CC: jessica.zhang, randy.macleod, sharmasudhir, stanciux.mihail
Version: 2.7   
Target Milestone: 4.3 M4   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Build is getting failed for custom image after adding or removing any package none

Description pavan 2019-02-21 06:38:12 UTC
Created attachment 4437 [details]
Build is getting failed for custom image after adding or removing any package

Description: When building an image after adding or removal of packages the image should build successfully and can check the packages were installed or not, but the build is getting failed.

Teseted on:
Environmental setup: 
Branch: Master
Build name: yocto-2.7_M2.rc2
poky commit: be52da152a4d9f9e798844f592ec9ae7e051c658

STEPS TO REPRODUCE:     1. Access a project page, either by creating a new project or accessing an existing project from the "All projects" table.
2. On the project page click on the "New custom image" link situated on the left-hand side, near Configuration, builds, import layer 
3. Choose an image recipe example:(core-image-sato) and click on the customise button on the far right (note if that layer is not added the button will say +Add layer, add it and then customise)
4. Build the new image if it has not been build, else start adding packages without dependencies example: attr-doc
5. Build the image again.


EXPECTED OUTCOME: 3.  A pop out should appear and you should get to give the new image a customized name. Then you will be redirected to a page of Add|Remove Packages. If this image has not been build it will not have packages.
4.  You should get a message in blue that says "You have added 1 package to $image-custom-name: $package-name"
5. Expected Result on step 5: the packages you have added should be installed in the image.

Actual Outcome:

Build is getting failed  after adding or removing layer for custom image.

Note: I have attached the screenshot of the build failure
Comment 1 Sudhir Sharma 2019-03-29 02:54:33 UTC
We have faced same issue for release 2.7 m3 rc1
Comment 2 Sudhir Sharma 2019-04-08 07:31:03 UTC
We have seen same issue for release 2.6.2 rc3.
Comment 3 Sudhir Sharma 2019-04-17 08:24:57 UTC
We have seen same issue in release 2.5.3 rc3.
Comment 4 David Reyna 2023-08-28 07:48:02 UTC
The root cause is a missing 'Image Name' field missing in event from bitbake for buildinfohelper. The above reproducer is one of many workflows that hit this error.

The fix is to (a) recognize when the field is missing, and (b) get the field from somewhere else in the event object.