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

Fix overriden base container name not used to fetch logs on KPO trigger_reentry #40835

Conversation

peloyeje
Copy link
Contributor

Ensures that self.pod_manager.fetch_container_logs use instance-level self.base_container_name instead of BASE_CONTAINER_NAME.
Fixes log fetching when base container name is provided
Also attempts at simplifying the assignment logic for self.container_logs in the init


^ 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.

@peloyeje
Copy link
Contributor Author

Will fix static checks asap

@peloyeje peloyeje force-pushed the fix/base-container-name-on-trigger-reentry branch from 2557556 to c45c093 Compare July 19, 2024 14:11
@peloyeje
Copy link
Contributor Author

Static checks fixed

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 added a small nit, otherwise LGTM.

self.container_logs = container_logs
if self.container_logs == KubernetesPodOperator.BASE_CONTAINER_NAME:
self.container_logs = base_container_name or self.BASE_CONTAINER_NAME
self.base_container_name = base_container_name or self.BASE_CONTAINER_NAME
Copy link
Member

Choose a reason for hiding this comment

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

You can change the default value of base_container_name to BASE_CONTAINER_NAME and remove this line

Copy link
Contributor

Choose a reason for hiding this comment

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

@peloyeje can you handle the above comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, sorry for the delay.
Thanks for the review @hussein-awala!

@peloyeje peloyeje force-pushed the fix/base-container-name-on-trigger-reentry branch from ff79374 to 815c205 Compare August 4, 2024 15:20
Copy link

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.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 19, 2024
@github-actions github-actions bot closed this Sep 24, 2024
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 stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants