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 Target throws an NRE when querying port name on container with IP and no ports #230

Conversation

Arkatufus
Copy link
Contributor

Closes #223

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Need to harden the test case a bit

new V1Pod(
spec: new V1PodSpec(new List<V1Container>
{
new V1Container("akka-cluster-tooling-example", ports:new List<V1ContainerPort>
Copy link
Member

Choose a reason for hiding this comment

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

Add a second container to this list that doesn't have any ports exposed and that should do it

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.

new V1Pod(
spec: new V1PodSpec(new List<V1Container>
{
new V1Container("akka-cluster-tooling-example")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean this one?

Copy link
Member

Choose a reason for hiding this comment

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

A pod can have multiple containers - that's the edge case that triggered the error in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

…ub.com:Arkatufus/Akka.Management into #223_DISCOVERY_KubernetesApi_NRE_during_lookup
@Aaronontheweb
Copy link
Member

@Arkatufus looks like one of the tests in the suite is racy - binding on the same port concurrently with another test.

@Arkatufus
Copy link
Contributor Author

I'll give it another look

@Aaronontheweb Aaronontheweb merged commit 4445e59 into akkadotnet:dev Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka.Discovery.KubernetesApi: NullReferenceException
2 participants