Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Fix recursive calls in mock #3250

Merged
merged 1 commit into from
Apr 23, 2021
Merged

Fix recursive calls in mock #3250

merged 1 commit into from
Apr 23, 2021

Conversation

bvwells
Copy link
Contributor

@bvwells bvwells commented Aug 15, 2020

Fix recursive calls in mock

@kingdonb
Copy link
Member

kingdonb commented Mar 2, 2021

Thank you for your contribution. It's not clear to me what issue is addressed by this change.

As some time has passed since this was submitted and there has been no follow-up for a while, I think it's safe to close. Will happily reopen if this is something you're still looking to get merged in, (but I will need to understand it first.)

@kingdonb kingdonb closed this Mar 2, 2021
@bvwells
Copy link
Contributor Author

bvwells commented Mar 2, 2021

@kingdonb this fixes a big in the mock. The mock is called a function on itself instead of mock handler function. If this function was called it would just get in an infinite recursive loop. Hope this explains the issue.

@kingdonb kingdonb reopened this Mar 2, 2021
@kingdonb
Copy link
Member

kingdonb commented Mar 2, 2021

Thanks for your reply. So, did nobody notice because this mock was essentially unused?

I appreciate your taking a moment to explain the issue for my benefit. If the mock is unused, it seems like it should simply be removed, (but as I've only just begun to understand the issue myself, I will reserve judgment until I can take some more time to understand it.)

Safe to say then, it's not putting you out at all if it doesn't get included in the next release which is planned for later this week?

@kingdonb kingdonb self-assigned this Mar 2, 2021
@kingdonb
Copy link
Member

kingdonb commented Mar 2, 2021

(The DCO bot will not allow me to merge this unless you rebase/squash and add a DCO sign-off with git commit --amend --sign-off, or following the instructions provided by the DCO bot.)

@bvwells
Copy link
Contributor Author

bvwells commented Mar 2, 2021

No there is no rush with this.

I came across this by accident. The methods on the mock are definitely not used otherwise tests would end in an infinite recursive call. I had a recollection that other functions on the mock are being used and that it implemented a cluster interface. My memory is a little hazy on this though.

@bvwells
Copy link
Contributor Author

bvwells commented Mar 2, 2021

@kingdonb rebased to master and signed off the commit. Hope everything looks okay.

@kingdonb kingdonb added this to the 1.22.1 milestone Mar 11, 2021
@kingdonb kingdonb modified the milestones: 1.22.1, 1.22.2 Mar 31, 2021
@kingdonb kingdonb self-requested a review April 16, 2021 21:29
Signed-off-by: Ben Wells <b.v.wells@gmail.com>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Copy link
Member

@kingdonb kingdonb left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kingdonb kingdonb mentioned this pull request Apr 23, 2021
@kingdonb kingdonb merged commit 5777baa into fluxcd:master Apr 23, 2021
@kingdonb kingdonb mentioned this pull request Apr 23, 2021
@bvwells
Copy link
Contributor Author

bvwells commented Apr 23, 2021

Thanks for the review and merge @kingdonb!

@bvwells bvwells deleted the patch-1 branch April 23, 2021 19:19
@kingdonb kingdonb removed their assignment Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants