-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sd 766 telefonistka get nil pointer dereference when it tries to diff a new application #27
Conversation
If findArgocdAppByManifestPathAnnotation reaches the end of the function it returns The log message at the end of that function is the source of the observed The foundApp is used here which, at this point in the code execution, would have returned nil. I added an additional condition to check if the found app is nil which will result in retuning the error finding the argo app error. |
7f974f1
to
3ea2c25
Compare
3ea2c25
to
7188f6b
Compare
internal/pkg/argocd/argocd_test.go
Outdated
} | ||
|
||
mockApplicationClient.EXPECT().List(gomock.Any(), gomock.Any()).Return(expectedResponse, nil) | ||
app, err := findArgocdAppByManifestPathAnnotation(ctx, "right/path", "some-repo", mockApplicationClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the reason this doesn't return an app because right/
!= right/path
?
If so I would use a different string to make it extra clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like "Non existing app path"
or something like that
Description
Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to related issues, other PRs, or technical references.
Note that by not including a description, you are asking reviewers to do extra work to understand the context of this change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.
Type of Change
Checklist