Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38836

hammer insights inventory generate-report --no-upload flag produces empty output in API response

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.18.0
    • RH Cloud
    • False
    • Proton Refinement Backlog
    • sat-proton
    • None
    • None
    • None
    • None
    • Yes

      Description of problem:

      When running

      hammer insights inventory generate-report --organization-id=X --no-upload

      , the output that should be returned at the endpoint `https://satellite.redhat.com/foreman_inventory_upload/$ID/uploads/last`

      is now empty ({"output":""} )

      instead of containing the expected message about upload cancellation

      ({"output":"Upload canceled because connection to Insights is not enabled or the --no-upload option was passed."})

      How reproducible:

      100% of the time

      Is this issue a regression from an earlier version:

      Yes, this is a regression. The issue started occurring in Stream 130, while Stream 129 worked correctly. This appears to be related to foreman_rh_cloud version 13.0.3 (used in Stream 130) vs 13.0.2 (used in Stream 129).

      Steps to Reproduce:

      1. Run hammer insights inventory generate-report --organization-id=$ID --no-upload
      2.  Check the output at the API endpoint using `target_sat.api.Organization(id=org.id).rh_cloud_fetch_last_upload_log()` or looking at https://satellite.redhat.com/foreman_inventory_upload/$ID/uploads/last
      3.  Observe the output

      Actual behavior:

      The API endpoint returns  {"output":""}  when the --no-upload flag is used.

      Expected behavior:

      The API endpoint should return 

      {"output":"Upload canceled because connection to Insights is not enabled or the --no-upload option was passed."}

      when the --no-upload flag is used.

      Business Impact / Additional info:

      This regression is causing test failures in the robottelo test suite, specifically in test_rhcloud_inventory.py:test_positive_generate_reports_job_cli_disconnected where the test expects the cancellation message to be present in the output.

       

      Found in stream 131

       
      satellite-6.19.0-0.1.stream.el9sat.noarch
      foreman-3.17.0-0.1.develop.20250915192830gitd2051bb.el9sat.noarch
      katello-4.19.0-0.1.master.el9sat.noarch
      rubygem-hammer_cli_foreman_rh_cloud-1.0.5-1.el9sat.noarch
      rubygem-foreman_rh_cloud-13.0.2-1.el9sat.noarch
      rubygem-foreman_theme_satellite-15.3.2-1.el9sat.noarch
      Red Hat Enterprise Linux release 9.6 (Plow)

              Unassigned Unassigned
              rhn-engineering-lvasina Ladislav Vasina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: