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

Add better warning message on failed profile uploads #1466

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/whylogs/api/writer/whylabs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime
import logging
import os
import pprint
import tempfile
from typing import IO, Any, Dict, List, Optional, Tuple, Union
from urllib.parse import urlparse
Expand Down Expand Up @@ -788,6 +789,11 @@ def _put_file(self, profile_file: IO[bytes], upload_url: str, dataset_timestamp:
f"Done uploading {self._org_id}/{self._dataset_id}/{dataset_timestamp} to "
f"{self.whylabs_api_endpoint} with API token ID: {self._key_refresher.key_id}"
)
else:
logger.warning(
f"response from file upload was not 200, instead got: {pprint.pformat(vars(response), indent=4)}"
)

return is_successful, response.reason

def _do_upload(
Expand Down