Open keithchong opened 3 years ago
We might want to accomplish this feature via SyncJob CRD: https://github.com/argoproj/argo-cd/issues/1283. since the sync record could be kept with the object itself.
Thanks @jessesuen
We might want to accomplish this feature via SyncJob CRD: #1283. since the sync record could be kept with the object itself.
Hm. Since #1283 covers only manual syncs, how would we record information from automatic syncs?
I was wondering, can we just emit events for those things?
We already emit events for certain things, so we might look whether we can emit events on failed syncs, recording the most basic information in them.
Someone interested in the history and states of sync could just retrieve the events and read required information from them.
Note that the history or events can't be transient, and need to be available 'on demand' at any time. The info probably needs to be stored somewhere.
One additional requirement for this enhancement is to provide the deployment history for the last 30 days, at a minimum. In theory, if you implement it for 30 days, and the client request is for 14 days of history, then it shouldn't be too much additional work to support that.
Summary
Although the current history and rollback page shows all the completed deployments so you can then rollback, it will also be beneficial if the history includes the "failed" attempts.
Definition of an unsuccessful deployment (which can be expanded upon or modified). This is what I have observed:
I'd like to see the above to be available in the history (after a sync is initiated), but they can be 'filtered out' for the rollback use case, for obvious reasons.
Perhaps each saved failed attempt does not have to require too much space. At minimum, we already have the start time, which is saved here as
deployStartedAt
: https://github.com/argoproj/argo-cd/blob/a1419c227656854f0e11280ec4a673e5e7f985d8/pkg/apis/application/v1alpha1/types.go#L934Motivation
It will be useful to track failures as well as successes for statistical purposes.
Proposal
TBD