Skip to content

Conversation

@dolfinus
Copy link
Contributor

@dolfinus dolfinus commented Dec 21, 2023

  • KubernetesPodOperator.skip_on_exit_code is always a container (like list[int]), it cannot be None.
  • If pod exited with matching exit code, AirflowSkipException should contain exact exit code instead of container value.
  • Allow to pass KubernetesPodOperator(skip_no_exit_code=0) to skip successfully finished pods. Previously it was the same as KubernetesPodOperator(skip_no_exit_code=[])

^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Dec 21, 2023
@dolfinus dolfinus changed the title Don't get pod status in KubernetesPodOperator if skip_on_exit_code is… Don't get pod status in KubernetesPodOperator if skip_on_exit_code not set Dec 21, 2023
@dolfinus dolfinus changed the title Don't get pod status in KubernetesPodOperator if skip_on_exit_code not set Fix AirflowSkipException message raised by KubernetesPodOperator Dec 21, 2023
@dolfinus dolfinus force-pushed the k8s-exit-code branch 3 times, most recently from c732169 to c53891d Compare December 21, 2023 19:57
@dolfinus dolfinus marked this pull request as ready for review December 21, 2023 20:33
Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the recent changes, and they look good. Waiting for a second approval before merging.

@romsharon98
Copy link
Contributor

Looks good!

@potiuk potiuk merged commit 3f60482 into apache:main Dec 24, 2023
@dolfinus dolfinus deleted the k8s-exit-code branch December 24, 2023 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants