Skip to content

Commit

Permalink
Fix broken pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenchrist committed Apr 10, 2024
1 parent 758745b commit 4467349
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions datacontract/data_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ def test(self) -> Run:
try:
publish_datamesh_manager(run, self._publish_url)
except Exception:
logging.error("Failed to publish to datamesh manager")
run.log_error("Failed to publish to datamesh manager")
if self._publish_to_opentelemetry:
try:
publish_opentelemetry(run)
except Exception:
logging.error("Failed to publish to opentelemetry")
run.log_error("Failed to publish to opentelemetry")

return run

Expand Down Expand Up @@ -425,7 +425,7 @@ def export(self, export_format, model: str = "all", rdf_base: str = None, sql_se
print(f"Export format {export_format} not supported.")
return ""

def _determine_sql_server_type(data_contract, sql_server_type):
def _determine_sql_server_type(self, data_contract: DataContractSpecification, sql_server_type: str):
if sql_server_type == "auto":
if data_contract.servers is None or len(data_contract.servers) == 0:
raise RuntimeError("Export with server_type='auto' requires servers in the data contract.")
Expand Down
5 changes: 2 additions & 3 deletions datacontract/integration/publish_datamesh_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import os

import requests
Expand Down Expand Up @@ -29,6 +28,6 @@ def publish_datamesh_manager(run: Run, publish_url: str):
if response.status_code != 200:
run.log_error(f"Error publishing test results to Data Mesh Manager: {response.text}")
return
logging.info("Published test results to %s", url)
run.log_info(f"Published test results to {url}")
except Exception as e:
logging.error(f"Failed publishing test results. Error: {str(e)}")
run.log_error(f"Failed publishing test results. Error: {str(e)}")
1 change: 1 addition & 0 deletions tests/test_examples_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def remove_container():
request.addfinalizer(remove_container)


@pytest.mark.skipif(sys.platform == 'darwin', reason="Fails on ARM mac, https://github.com/testcontainers/testcontainers-python/issues/450")
def test_examples_kafka(kafka_container: KafkaContainer):
send_messages_to_topic("examples/kafka/data/messages.json", "inventory-events")
data_contract_str = _setup_datacontract()
Expand Down

0 comments on commit 4467349

Please sign in to comment.