Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't log the insights-core egg in verbose mode #3348

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't log the insights-core egg in verbose mode (BZ 2045995)
Signed-off-by: Mark Huth <[email protected]>
  • Loading branch information
mhuth committed Mar 2, 2022
commit 7ecb85c895e9ea74041adf3065d66789cd3e6a40
4 changes: 2 additions & 2 deletions insights/client/__init__.py
Original file line number Diff line number Diff line change
@@ -202,10 +202,10 @@ def _fetch(self, path, etag_file, target_path, force):
if current_etag and not force:
logger.debug('Requesting new file with etag %s', current_etag)
etag_headers = {'If-None-Match': current_etag}
response = self.connection.get(url, headers=etag_headers)
response = self.connection.get(url, headers=etag_headers, log_response_text=False)
else:
logger.debug('Found no etag or forcing fetch')
response = self.connection.get(url)
response = self.connection.get(url, log_response_text=False)
except ConnectionError as e:
logger.error(e)
logger.error('The Insights API could not be reached.')
4 changes: 2 additions & 2 deletions insights/tests/client/init/test_fetch.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ def test_request_with_etag(insights_client):

url = "{0}{1}".format(insights_client.connection.base_url, source_path)
headers = {'If-None-Match': etag_value}
insights_client.connection.get.assert_called_once_with(url, headers=headers)
insights_client.connection.get.assert_called_once_with(url, headers=headers, log_response_text=False)


def test_request_forced(insights_client):
@@ -41,7 +41,7 @@ def test_request_forced(insights_client):
insights_client._fetch(source_path, "", "", force=False)

url = "{0}{1}".format(insights_client.connection.base_url, source_path)
insights_client.connection.get.assert_called_once_with(url)
insights_client.connection.get.assert_called_once_with(url, log_response_text=False)


@patch('insights.client.InsightsClient._fetch', Mock())