olayiwola-gbenga commented on PR #71947: URL: https://github.com/apache/airflow/pull/71947#issuecomment-6054750841
Thanks for the feedback @kaxil, and apologies for the brief PR description, the details were in the commit message (`867394baba`) instead of the PR body. The PR title and description have been updated now. On why these four operators (`GetQuery`, `ListQueries`, `GetReport`, `ListReports`) are being added: currently `bid_manager.py` only has operators to create, run, delete, and download, while `get_query`, `list_queries`, `get_report`, and `list_reports` only exist on `GoogleBidManagerHook`. Adding these four operators completes the Bid Manager operator set so users can list and inspect existing queries and reports directly in their Dags (for example, checking existing query definitions or listing/inspecting reports generated by scheduled queries before downloading them). On the behavior changes, testing against the Bid Manager API surfaced three bugs: - `list_queries` and `list_reports` didn't handle pagination (`nextPageToken`), so they only returned the first page. Updating `list_reports` to page through `.list_next()` meant collecting the `"reports"` items across pages into a `list[dict]`, which also matches `list_queries`. - `GoogleBidManagerRunQuerySensor` was returning `True` when the report status was `FAILED`, causing the sensor task to succeed even when report generation failed. - `GoogleBidManagerDownloadReportOperator` only raised an error if the status was not in `["DONE", "FAILED"]`, so a `FAILED` report passed the check and then crashed with a `KeyError` on `resource["metadata"]["googleCloudStoragePath"]` (which is only present when the report status is `DONE`). Please let me know if keeping these fixes together is fine now that the PR description is updated, or if splitting the pagination and `FAILED` status fixes into a separate PR is preferred. -- 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]
