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

added "name" and "hostname" to template_fields in KubernetesPodOperator #43601

Closed

Conversation

eilon246810
Copy link
Contributor

@eilon246810 eilon246810 commented Nov 2, 2024

Hi,

This PR closes: #43480.
It's a small change, which involves adding the name and hostname to the template_fields in the KubernetesPodOperator.

I decided to use a different approach from the one suggested by the issue creator.
This was to avoid changing the class API by renaming self.name to self.pod_name.

What do you think?


Comment on lines 262 to +264
"kubernetes_conn_id",
"name",
"hostname",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add tests that cover this change in test_pod.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added, thanks!

@eilon246810
Copy link
Contributor Author

I see I have some tests failing, setting PR to draft until I fix these.

@eilon246810 eilon246810 marked this pull request as draft November 12, 2024 19:23
@eilon246810
Copy link
Contributor Author

The tests seem to fail because some of them mock the name parameter, and then the validate_key function inside _set_name fails because it expects a string.

I need help here - what is the way to solve this in your opinion?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

github-actions bot commented Jan 4, 2025

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 Jan 4, 2025
@github-actions github-actions bot closed this Jan 10, 2025
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.

Add KubernetesPodOperator's name in templated fields
5 participants