diff --git a/cognite/extractorutils/uploader/files.py b/cognite/extractorutils/uploader/files.py index 4befd41..42bda7e 100644 --- a/cognite/extractorutils/uploader/files.py +++ b/cognite/extractorutils/uploader/files.py @@ -273,7 +273,6 @@ def get_failure_logger(self) -> FileFailureManager | None: return self._file_failure_manager def add_entry_failure_logger(self, file_name: str, error: Exception) -> None: - print(f"is {self._file_failure_manager} is none?") # noqa if self._file_failure_manager is not None: error_reason = str(error) self._file_failure_manager.add(file_name=file_name, error_reason=error_reason) @@ -453,8 +452,6 @@ def wrapped_upload( self.logger.exception( f"Unexpected error while uploading file: {file_meta.external_id} {file_meta.name}" ) - # TODO: Remove after integration test passes - print("faced error while uploading error") # noqa self.add_entry_failure_logger(file_name=str(file_meta.name), error=e) self.errors.append(e) diff --git a/cognite/extractorutils/uploader/upload_failure_handler.py b/cognite/extractorutils/uploader/upload_failure_handler.py index a929b8a..4dfeec7 100644 --- a/cognite/extractorutils/uploader/upload_failure_handler.py +++ b/cognite/extractorutils/uploader/upload_failure_handler.py @@ -41,7 +41,6 @@ def clear(self) -> None: self._initialize_failure_logs() def add(self, file_name: str, error_reason: str) -> None: - print(f"file_name: {file_name}, error_reason: {error_reason}") # noqa error_file_object = FileErrorMapping(file_name=file_name, error_reason=error_reason) error_file_dict = dict(error_file_object) diff --git a/tests/tests_integration/test_file_integration.py b/tests/tests_integration/test_file_integration.py index d07ebc9..dd06cbc 100644 --- a/tests/tests_integration/test_file_integration.py +++ b/tests/tests_integration/test_file_integration.py @@ -95,7 +95,7 @@ def load_file_from_path() -> BinaryIO: queue.add_io_to_upload_queue( file_meta=FileMetadata( external_id=test_parameter.external_ids[0], - name=test_parameter.external_ids[0], + name=NO_PERMISSION_FILE, ), read_file=load_file_from_path, ) @@ -106,8 +106,6 @@ def load_file_from_path() -> BinaryIO: time.sleep(5) except Exception as e: failure_logger = queue.get_failure_logger() - print(f"Failure logs: {failure_logger.failure_logs}") - print(f"Check for file: {os.path.isfile(fully_qualified_failure_logging_path)}") with jsonlines.open(fully_qualified_failure_logging_path, "r") as reader: for failure_logger_run in reader: