-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Missing nil
check for placement field in Policy health check
#22060
Comments
Is it in Go code? I think len of nil is just 0. |
@andrii-korotkov-verkada I was able to consistently reproduce it in the attached PR, #22057, so I think it's something about Lua. I don't know a whole lot about Lua, but it seems when
|
Thanks! I initially didn't realize it's Lua code, so it makes sense. |
…oproj#22057) Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
…oproj#22057) Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com> Signed-off-by: kingbj0429 <kingbj0429@lunit.io>
Checklist:
argocd version
.Describe the bug
When a Policy (from
policy.open-cluster-management.io
) has a status that is empty and non-nil (i.e.{}
), the check for thestatus.placement
field is throwing an error because it's doing a length check on anil
field:To Reproduce
Deploy a policy unattached to any placement.
Expected behavior
Health check does not throw an error.
Screenshots
--
Version
(Version is the version tied to the PR where the code was updated in #21297 )
Logs
--
The text was updated successfully, but these errors were encountered: