alamashir opened a new pull request, #58698:
URL: https://github.com/apache/airflow/pull/58698
## Description
Fixes #50387 - Bug in Data Fusion hook where `start_pipeline` crashes with
`KeyError: 'runId'` when pipelines fail to start.
## Problem
The hook used the multi-program start endpoint which returns HTTP 200 even
on failures. The code accessed `response_json[0]["runId"]` without validation,
causing a KeyError when the field was missing.
## Solution
- Switch to single-program start endpoint: `POST
.../apps/{app}/{program-type}s/{program-id}/start`
- Validate `runId` exists in response before accessing
- Return clear error messages when pipelines fail to start
## Changes
Updated `start_pipeline` method to use correct CDAP endpoint and added
response validation.
## Breaking Changes
None - method signature and return type unchanged. Only the internal API
endpoint changed.
## Testing
```bash
pytest providers/google/tests/unit/google/cloud/hooks/test_datafusion.py -v
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]