-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix xcom_sidecar stuck problem #24993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| result = self.pod_manager.extract_xcom(pod) | ||
| self.log.info("xcom result: \n%s", result) | ||
| return json.loads(result) | ||
| if isinstance(result, str) and result.replace('\n', '') == 'False': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if isinstance(result, str) and result.replace('\n', '') == 'False': | |
| if isinstance(result, str) and result.rstrip() == 'False': |
It may also be worthwile to use a more obscure string (say __airflow_xcom_result_empty__?) to make the intent easier to identify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to using rstrip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @uranusjr "else echo False; fi" is a bad idea, because "False" is quite likely return value from a Pod. Please change it to some more "unique" sentinel.
This PR fixes the problem which is described here #22318
closes: #22318
Co-authored-by: Wojciech Januszek [email protected]
Co-authored-by: Lukasz Wyszomirski [email protected]
Co-authored-by: Maksim Yermakou [email protected]
^ 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.