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: invalid ParentObj in output #1068

Merged
merged 5 commits into from
Apr 26, 2024
Merged

Conversation

panpan0000
Copy link
Contributor

@panpan0000 panpan0000 commented Apr 17, 2024

The GetParent() always return false and the invoker never respect its return value.

So add the boolean return value (I believe it means "found" )

Closes #1067

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

Previous
image
Now
image

@panpan0000 panpan0000 requested review from a team as code owners April 17, 2024 10:48
@arbreezy
Copy link
Member

Nice catch @panpan0000

@panpan0000 panpan0000 changed the title Fix invalid ParentObj in output fix: invalid ParentObj in output Apr 17, 2024
pkg/util/util.go Show resolved Hide resolved
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
@arbreezy
Copy link
Member

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
@panpan0000
Copy link
Contributor Author

@panpan0000 we need to fix this test as well , https://github.com/k8sgpt-ai/k8sgpt/blob/main/pkg/util/util_test.go#L85

Thank you for reminder. @arbreezy , fixed as well.

@AlexsJones AlexsJones merged commit b2ab943 into k8sgpt-ai:main Apr 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: invalid parent object in output list
3 participants