Skip to content

Conversation

@SamWheating
Copy link
Contributor

closes: #33697

Looking at the Kubernetes API Docs for containerStatus, it looks like lastState provides the state of the previous run of the container, whereas state should provide information on the most recent termination (which is the relevant one in this case)

I also added an integration test under kubernetes_tests to verify that this works as expected.

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Aug 24, 2023
@potiuk potiuk modified the milestone: Airflow 2.7.1 Aug 24, 2023
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.

Makes sense

assert self.expected_pod["spec"] == actual_pod["spec"]
assert self.expected_pod["metadata"]["labels"] == actual_pod["metadata"]["labels"]

def test_skip_on_specified_exit_code(self, mock_get_connection):
Copy link
Member

Choose a reason for hiding this comment

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

❤️ the integration test !

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.

skip_on_exit_code parameter in KPO does not take effect

3 participants