Bug 1812137

Summary: Deprecation warnings are not being printed for Satellite
Product: Red Hat Satellite Reporter: Chris Roberts <chrobert>
Component: APIAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: tstrych
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: apatel, tstrych
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-1.24.1.17-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:38:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Roberts 2020-03-10 15:27:07 UTC
Description of problem:
API warning messages are not being printed for API calls that should be so the user knows to use a different API call.

Version-Release number of selected component (if applicable):

Katello 3.14
Katello 3.15
Satellite 6.6
Satellite 6.7

Additional info:

We are using the following warnings in the Katello controller code:

https://github.com/Katello/katello/blob/master/app/controllers/katello/api/v2/repositories_controller.rb#L222-L224

This commit looks like it silenced it:

https://github.com/theforeman/foreman/commit/0fd467c844fd200b5da72a0c670a5ac2bd4a61d6

This issue looks to log the warning to Rails for the API calls we care about and ignore the deprecated Rails calls we do not care about.

Comment 4 tstrych 2020-03-17 12:45:52 UTC
Verified with sat 6.7, Katello version 3.14

Production log shows the deprecation warnings. 

Verified. I ran hammer commands to create a custom repo(puppet, ostree and yum content type) and I watched the log when post request was sent from UI. 

Api deprecation message works for puppet and ostree repository types as expected. (look at code changes in Links) 


hammer command which I use for puppet:
hammer repository create --content-type puppet --name <repo_name> --product-id <product_id>  --verify-ssl-on-sync true --upstream-username <username> --upstream-password <password> --publish-via-http true

Comment 5 Bryan Kearney 2020-04-14 13:38:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454