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 nil-dereference in controller #224

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

DavidKorczynski
Copy link
Contributor

Fixes a nil-deref when the following conditions are all true:

  • gitSpec.Checkout is nil
  • origin.Spec.Reference is nil
  • gitSpec.push is nil

Signed-off-by: David Korczynski david@adalogics.com

@DavidKorczynski
Copy link
Contributor Author

Discussed this with @squaremo internally

Signed-off-by: David Korczynski <david@adalogics.com>
@DavidKorczynski
Copy link
Contributor Author

This PR also fixes another issue which is it adds a return on the failWithError - this didn't occur in the specified place which cause the reconciler to continue execution after the call to failWithError

Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Well spotted on both counts, thank you @DavidKorczynski 🍎

@squaremo squaremo merged commit 7ec4e61 into fluxcd:main Sep 30, 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.

2 participants