Fix GCSObjectExistenceSensor xcom push#37949
Conversation
| ) | ||
| else: | ||
| if self._exists: | ||
| return "success" |
There was a problem hiding this comment.
If it always success, then how are we going to benefit from this? Can you elaborate the use case here?
There was a problem hiding this comment.
Thanks for taking a look, I've updated the PR description (didn't realize this would get look at while in draft). Today, if an object already exists when the DAG is first run, the xcom value is not set. "success" is what's returned today by the deferred mode trigger - https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/triggers/gcs.py#L111. The goal of this fix is essentially the same as what was done for GCSObjectsWithPrefixExistenceSensor in #37634.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Fix GCSObjectExistenceSensor to return the xcom value if the object already exists upon first run. At present, if the object already exists before the DAG runs, the xcom value is not populated.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.