Is your feature request related to a problem? Please describe.
There is no model-level concept of extraction state. Once a firmware image is uploaded, there is no way to track whether the metadata has been extracted, is in progress, failed or was filled in manually. Builds also have no aggregate status reflecting the state of their images, meaning there is no mechanism to block a build from mass upgrades until all its images have been confirmed.
There is also no notification system tied to the completion of the extraction. Operators uploading firmware images have no way to know when extraction finishes or what to do if it fails
Describe the solution you'd like
I would like to introduce the model layer, status tracking, and build-level completion notification that the async pipeline and admin UI depend on
- Add extraction state fields to
FirmwareImage:
extraction_status with states: unconfirmed, in_progress, confirmed, failed, manually_confirmed, invalid
failure_reason with choices: unsupported_format, out_of_memory, invalid_file
extraction_log for storing full technical detail from the extraction run
- Add
status field to AbstractBuild to represent the aggregate extraction state across all images in a build:
analyzing when any image is still unconfirmed or in_progress
invalid when any image is invalid
failed when any image is failed
manually_confirmed when all the images are confirmed but at least one was done manually
success when all images are confirmed
-
Implement _update_extraction_status() on AbstractBuild to recompute and persist the build status after each image extraction completes. Adding a new image to a build resets the build status back to analyzing via a post_save signal
-
Implement _notify_extraction_complete() on AbstractBuild to fire a generic_notification with a direct link to the build page when the build transitions out of analyzing. The notification is only sent once, on that transition.
Is your feature request related to a problem? Please describe.
There is no model-level concept of extraction state. Once a firmware image is uploaded, there is no way to track whether the metadata has been extracted, is in progress, failed or was filled in manually. Builds also have no aggregate status reflecting the state of their images, meaning there is no mechanism to block a build from mass upgrades until all its images have been confirmed.
There is also no notification system tied to the completion of the extraction. Operators uploading firmware images have no way to know when extraction finishes or what to do if it fails
Describe the solution you'd like
I would like to introduce the model layer, status tracking, and build-level completion notification that the async pipeline and admin UI depend on
FirmwareImage:extraction_statuswith states:unconfirmed,in_progress,confirmed,failed,manually_confirmed,invalidfailure_reasonwith choices:unsupported_format,out_of_memory,invalid_fileextraction_logfor storing full technical detail from the extraction runstatusfield toAbstractBuildto represent the aggregate extraction state across all images in a build:analyzingwhen any image is stillunconfirmedorin_progressinvalidwhen any image is invalidfailedwhen any image is failedmanually_confirmedwhen all the images are confirmed but at least one was done manuallysuccesswhen all images areconfirmedImplement
_update_extraction_status()onAbstractBuildto recompute and persist the build status after each image extraction completes. Adding a new image to a build resets the build status back toanalyzingvia apost_savesignalImplement
_notify_extraction_complete()onAbstractBuildto fire ageneric_notificationwith a direct link to the build page when the build transitions out ofanalyzing. The notification is only sent once, on that transition.