Skip to content
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

Handle missing container_statuses in pod_manager.get_container_status #47936

Merged
merged 2 commits into from
Mar 26, 2025

Conversation

ForeverWintr
Copy link
Contributor

I believe there is a small bug in the cncf/kubernetes provider. Previously get_container_status in pod_manager.py would handle cases where pod.status.container_statuses is None, but after #43853 it does not. This PR adds a test illustrating the issue, and fixes it.

Copy link

boring-cyborg bot commented Mar 18, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@ForeverWintr
Copy link
Contributor Author

@mrk-andreev you are the author of PR I linked, could you give my change a review?

@ForeverWintr ForeverWintr changed the title Fix get container status Handle missing container_statuses in pod_manager.get_container_status Mar 18, 2025
@mrk-andreev
Copy link
Contributor

@ForeverWintr, thank you for fixing it! Looks good from my side.

@ForeverWintr ForeverWintr force-pushed the fix-get-container-status branch 2 times, most recently from a72aa50 to 3ac4a42 Compare March 20, 2025 14:44
@ForeverWintr
Copy link
Contributor Author

@jedcunningham or @hussein-awala, could one of you take a look at this?

@eladkal eladkal force-pushed the fix-get-container-status branch from 3ac4a42 to cf5a408 Compare March 23, 2025 07:40
@eladkal eladkal requested a review from romsharon98 March 23, 2025 07:41
@ForeverWintr ForeverWintr force-pushed the fix-get-container-status branch 4 times, most recently from 9377ceb to d77227e Compare March 26, 2025 18:29
@ForeverWintr ForeverWintr force-pushed the fix-get-container-status branch from d77227e to b9773b1 Compare March 26, 2025 20:46
@jscheffl jscheffl merged commit 4c4de51 into apache:main Mar 26, 2025
70 checks passed
Copy link

boring-cyborg bot commented Mar 26, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@ForeverWintr ForeverWintr deleted the fix-get-container-status branch March 26, 2025 21:32
pankajkoti pushed a commit to astronomer/airflow that referenced this pull request Mar 28, 2025
…apache#47936)

* Add failing example test

* Handle cases where container_statuses is None
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 provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants