argoproj / argo-rollouts

Progressive Delivery for Kubernetes
https://argo-rollouts.readthedocs.io/
Apache License 2.0
2.8k stars 876 forks source link

Argo Rollout RollbackWindow property is NOT optional as documented. #2568

Closed minsiyang closed 1 year ago

minsiyang commented 1 year ago

Checklist:

Describe the bug

The RollbackWindow property is not optional as described in the code. We tried to deploy the get-started guide in an EKS cluster, and we can see the error in the argo rollout pod.

time="2023-02-06T11:19:19Z" level=error msg="rollout syncHandler error: Rollout.argoproj.io \"argo-rollout\" is invalid: spec.rollbackWindow: Invalid value: \"null\": spec.rollbackWindow in body must be of type object: \"null\"" namespace=services rollout=argo-rollout
time="2023-02-06T11:19:19Z" level=info msg="rollout syncHandler queue retries: 53 : key \"services/argo-rollout\"" namespace=services rollout=argo-rollout

This is happening in the latest version https://github.com/argoproj/argo-rollouts/releases/tag/v1.4.0, and we tried the earlier version https://github.com/argoproj/argo-rollouts/releases/tag/v1.3.2 which doesn't have this problem.

We believe this is due to the typo in the code havingomtempty instead of omitempty, but we haven't verified it.

To Reproduce

Deploy the latest version of Argo Rollout to an EKS or AKS cluster.

Expected behavior

https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml should be deployed in the cluster successfully.

Screenshots

Version

1.4.0

Logs

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl get pod -n argo-rollouts
NAME                            READY   STATUS    RESTARTS   AGE
argo-rollouts-b69787f6f-8xmgq   1/1     Running   0          38s

# Logs for a specific rollout:
 kubectl get Rollout -n services
NAME           DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
argo-rollout   1                                            56s

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

zachaller commented 1 year ago

So I do not think this bug really affects anything from a k8s perspective all our tests still pass and I was unable to reproduce locally or in our currently running production environment. The only thing I could maybe think that would trip this up is with there being a some 3rd party validation that uses the golang type information to do some validation I could see that typo causing issues.