-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Application health assessment failed with "ComparisonError: json: cannot unmarshal array into Go value of type" #5423
Comments
Hi @ymmt2005, the error message suggests that there might have been a C&P or other error (such as indentation) when you integrated the Lua script into your ConfigMap. I have looked into the repository you mentioned, but could not find a change that has the health check actually integrated, so this is a wild guess. However, I'm running several 1.8 instances with a C&P of the health check mentioned in the upgrade guide, and they all run fine :) Do you happen to have a full Thanks. |
Hi @jannfis , thank you for the information. I find the failed CI log and We gave up adding this and switched to unordered Application initialization then. |
@ymmt2005, try this argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Healthy"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end
return hs |
@ionutleca will try it, thank you! |
@ionutleca |
We needed to change the initial argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end
return hs |
I had my doubts with starting with |
Closing since #6281 is merged. |
Describe the bug
When I added a Lua script to restore Application health assessment behavior in v1.7 for v1.8.3 server
according to the this,
argocd-application-controller
stop syncing Applications.An Application had a status like this:
argocd-application-controller
outputted logs like this:To Reproduce
We cannot create a minimal case.
Our app-of-apps repository is github.com/cybozu-go/neco-apps
When we added the Lua script in https://argoproj.github.io/argo-cd/operator-manual/upgrading/1.7-1.8/#health-assessement-of-argoprojioapplication-crd-has-been-removed to
argocd-cm
, it stops Application synchronization.Expected behavior
The Lua script should work without errors.
Version
The text was updated successfully, but these errors were encountered: