diff --git a/CHANGELOG.md b/CHANGELOG.md index 270dff009c..963efc7992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.17.4 (2024-12-31) + + +### Bug Fixes + +- Adjusted log terminology +- Failed transformations counter now increments for all cases (None (null / missing), empty) + ## 0.17.3 (2024-12-31) diff --git a/port_ocean/core/handlers/entity_processor/jq_entity_processor.py b/port_ocean/core/handlers/entity_processor/jq_entity_processor.py index ac95d04b8a..bdf3b5e79b 100644 --- a/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +++ b/port_ocean/core/handlers/entity_processor/jq_entity_processor.py @@ -78,7 +78,7 @@ def _notify_mapping_issues( ) if missing_required_fields: logger.info( - f"{entity_mapping_fault_counter} transformations of batch failed due to empty values" + f"{entity_mapping_fault_counter} transformations of batch failed due to empty, null or missing values" ) async def _search(self, data: dict[str, Any], pattern: str) -> Any: @@ -286,15 +286,7 @@ async def _parse_items( failed_entities.append(parsed_entity) else: missing_required_fields = True - if (result.entity.get("identifier") == "") or ( - result.entity.get("blueprint") == "" - ): - entity_mapping_fault_counter += 1 - else: - logger.debug( - f"Mapping failed, values verification for identifier: {result.entity.get("identifier")}, \ - for blueprint: {result.entity.get("blueprint")}" - ) + entity_mapping_fault_counter += 1 self._notify_mapping_issues( entity_misconfigurations, diff --git a/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py b/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py index 2a0010931b..672c1ee4f0 100644 --- a/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py +++ b/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py @@ -340,9 +340,11 @@ async def test_parse_items_empty_required( logger.remove(sink_id) logs_captured = stream.getvalue() - assert "2 transformations of batch failed due to empty values" in logs_captured + assert ( + "2 transformations of batch failed due to empty, null or missing values" + in logs_captured + ) assert ( "{'blueprint': '.bar', 'identifier': '.foo'} (null, missing, or misconfigured)" in logs_captured ) - assert "1 transformations of batch failed due to empty values" in logs_captured diff --git a/pyproject.toml b/pyproject.toml index a3cb130b83..57634fc0cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.17.3" +version = "0.17.4" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"