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

Prevent segfault with empty kustomization #1020

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ongy
Copy link

@Ongy Ongy commented Jan 25, 2025

I'm not entirely sure when this happens, but the kustomize can be nil. Accessing Images then leads to a nil-deref.
With this approach, the updater defaults to empty images when it cannot get the real ones.

I'm not entirely sure when this happens, but the kustomize can be nil.
Accessing Images then leads to a nil-deref.
With this approach, the updater defaults to empty images when it cannot get the real ones.

Signed-off-by: Markus Ongyerth <[email protected]>
@Ongy Ongy force-pushed the dont-access-nil-kustomize branch from a019603 to 2fd1703 Compare January 25, 2025 11:43
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.27%. Comparing base (980eff5) to head (2fd1703).

Files with missing lines Patch % Lines
pkg/argocd/git.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1020      +/-   ##
==========================================
+ Coverage   63.26%   63.27%   +0.01%     
==========================================
  Files          15       15              
  Lines        2243     2252       +9     
==========================================
+ Hits         1419     1425       +6     
- Misses        733      735       +2     
- Partials       91       92       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chengfang
Copy link
Collaborator

@Ongy thanks for the fix. Can you please fix the DCO check failure by adding git sign-off?

@Ongy
Copy link
Author

Ongy commented Feb 4, 2025

I already added Signed-off-by: Markus Ongyerth <[email protected]> to the commit itself. Does it check the message here?

Though it might also be unhappy because that's not the same email as in the commit itself. I'll update that later today and see.

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.

3 participants