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

Allow setting the name for the base container and fix longstanding bug with running quick pods #28752

Closed
wants to merge 3 commits into from

Conversation

csm10495
Copy link
Contributor

@csm10495 csm10495 commented Jan 5, 2023

Some downstream machinery may require a specific name for the 'base' container.

This change should be backwards compatible since the default base container name is still base.. it can just now be changed to something besides base.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:providers labels Jan 5, 2023
@Taragolis
Copy link
Contributor

Would be nice to have unit tests which cover new functionality for avoid regression

@csm10495
Copy link
Contributor Author

csm10495 commented Jan 5, 2023

Would be nice to have unit tests which cover new functionality for avoid regression

Yep.. they're on the way :)

@csm10495 csm10495 force-pushed the allow_rename_of_base_container branch from 012b099 to 6e2a2ad Compare January 5, 2023 19:21
@csm10495 csm10495 changed the title Allow setting the name for the base container Allow setting the name for the base container and fix #26796 Jan 5, 2023
@csm10495 csm10495 changed the title Allow setting the name for the base container and fix #26796 Allow setting the name for the base container and fix longstanding bug with running quick pods Jan 5, 2023
@csm10495
Copy link
Contributor Author

csm10495 commented Jan 5, 2023

This will also now fix #26796... since i kept hitting it in my tests :) @jedcunningham can you take a look when you get a chance?

Some downstream machinary may require a specific name for the 'base' container
…running (when get_log=False

Also add tests for setting the base container name
@csm10495 csm10495 force-pushed the allow_rename_of_base_container branch from 3518624 to f1dbafc Compare January 5, 2023 23:41
Comment on lines 267 to 269
def await_container_completion(self, pod: V1Pod, container_name: str) -> None:
while not self.container_is_running(pod=pod, container_name=container_name):
while self.container_is_running(pod=pod, container_name=container_name):
time.sleep(1)
Copy link
Member

Choose a reason for hiding this comment

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

While this looks like a valid fix, it is logically unrelated to the base_container_name change. Could you split it into another PR?

Copy link
Contributor Author

@csm10495 csm10495 Jan 6, 2023

Choose a reason for hiding this comment

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

The problem is I can't get my new unit tests for base name with get_log=False to pass without fixing this too.

I guess I can split to do this fix first then that one after if you'd prefer.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah let’s do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack. will split em tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@uranusjr i've split this part into: #28771 ... after that merges, i'll recreate this pr.

@csm10495
Copy link
Contributor Author

csm10495 commented Jan 6, 2023

Closing in favor of #28771 and then redoing this after that.

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