Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed May 25, 2024
1 parent 5635189 commit 27272b1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dagster/dg_pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def run(
else:
payload_data: Mapping[str, Any] = event # type: ignore

# Todo: check for errors!
response = invoke_cloud_function(
url=function_url,
data=payload_data,
Expand All @@ -177,13 +176,10 @@ def run(
f"Failed to invoke cloud function {function_url} with status code {response.status_code}"
)

# Get GCP trace id
trace_id = response.headers.get("X-Cloud-Trace-Context") or "abcd1234/0"
trace_id = trace_id.split(";")[0]

context.log.info("Cloud function invoked successfully. Waiting for logs...")
if isinstance(self._message_reader, PipesCloudLoggerMessageReader):
trace_id = response.headers.get("X-Cloud-Trace-Context") or "local/0"
trace_id = trace_id.split(";")[0]
self._message_reader.consume_cloud_function_logs(trace_id)

# should probably have a way to return the lambda result payload
return PipesClientCompletedInvocation(session)

0 comments on commit 27272b1

Please sign in to comment.