#184 Skip non-RPM advisory by checking advisory content_types
Merged by cqi. Opened by cqi.
cqi/freshmaker skip-non-rpm-advisory  into  master

Download 184.patch

Originally, freshmaker skips non-RPM advisory by checking .tar.gz
extension in the builds. This way does not work in all cases. This
patch checks advisory content_types instead. String "rpm" will be
included in content_types if an erratum is a RPM advisory, otherwise
skip that advisory.

  • ErrataAdvisoryRPMsSignedHandler._find_images_to_rebuild is updated.
    It does not check if the advisory being handled currently is a RPM
    advisory. This patch ensures only RPM advisory is handled.
  • ErrataAdvisoryStateChangedHandler.can_handle is updated. Only handle
    RPM advisory by checking if "rpm" exists in advisory content_types.
  • ErrataAdvisoryStateChangedEvent has a new attribute content_types
    to hold value of advisory content_types.
  • Manual trigger endpoint is updated as well. Stop and return error in
    response if advisory of given errata ID is not a RPM advisory.
  • Tests are updated and added.

Signed-off-by: Chenxiong Qi cqi@redhat.com

rebased onto 0b5880d49790f532d9b5bc502f833d38e48ab6f3

Nothing changed. Rebase only.

Pull-Request has been merged by cqi

Metadata