-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Discrepancy between "current sync status" and "last sync status" #7629
Comments
I agree with most of what you've said and found this issue while trying to find documentation with details on the differences. Is it safe to say that "Current Sync Status" is showing the current known state of the repository being pulled ("Pull State")? And "Last Sync Result" is the sync/ |
Is this just waiting on a PR? I think this would greatly help non-daily users quickly understand the UI. |
my question is, if "current sync status" and "last sync status" are targetting on different commit id, what I need do? I have set Just waiting? |
Regarding the second request, a commit SHA in a repo does not necessarily involve changing the desired state for a particular application and in my view the "last sync result" field should always point to the last commit that actually made the application OutOfSync and synced it. Auto sync does this, but not the manual sync button (it updates the commit SHA regardless). If you have 9 commits not changing the desired state of a particular application it makes sense in my view that "last sync result" (or your proposal "live state") "lags behind" 9 commits from the "current sync status". |
@ozbillwang It depends if the commit sha in "current sync status" actually changed something for the particular application. "current sync status" is the latest commit that ArgoCD has looked at in the repo. So if your commit in "current sync status" did not change anything for a particular application (like updating README in the repo), the "last sync result" will not update to this new commit sha that did not change anything for your application object. This is the behaviour when auto sync is used. Try to click the "Sync" button and you will most likely see both commit SHA's becoming the same since that happens when doing it manually. Found some more doc on auto update semantics here: |
I think this is the opposite of what I thought these meant. It really seems like "sync" is referring to two different things being synced here, right? One is syncing to argocd (what does ArgoCD know about the manifest "source") and one is argocd syncing to the cluster. |
@djhoese Yea exactly as you say about two different things: Repo <--- (current sync / default 3 min reconcile)---| ArgoCD |--- (last sync status) ---> k8s If you want the same behaviour as auto sync in UI you can use "Refresh" which diffs manifest and only sync changes if it see any changes. Imo a bit confusing that manual sync button in UI and auto sync behaves differently. Refresh button and auto sync seems to be the ones behaving the same. |
Thanks for the decussion and explanation, @bestrand @djhoese In between of Can ArgoCD detect the difference and synd (I mean |
So my final question is, Can I ask to merge The |
@ozbillwang As described above, sync is not just sync. There are two things being synced here. Repo -> ArgoCD -> Cluster. I personally would like to have at least some way of knowing both statuses. The main problem is that the UI only makes a distinction between these two (I think? that's how confusing it is to me) by using "current" versus "last". |
Just adding to the voice of non expert users who are mighty confused. |
Regarding this comment
I am not really care of stage of |
I agree that this UI is super unintuitive. The introduction of the temporal term variation between the two just makes it super misleading--the natural interpretations of two "current" and "last" UI elements next to one another is that one shows the same state of version N and the other of version N-1. I'd be happy to submit a PR if it would be accepted, even though I'm not a front-end person :D |
This has the benefit of not using |
Whatever gets the change across the line I'd be happy with lol |
@nitinchavan01: you probably have things that need to be pruned or manually resolved (e.g. a statefulset where you changed an immutable field). On the left, there's an |
@jsoref we did tried the suggestion but all in vein. see below screens for reference. |
You're going to have to look at the diff for the HPA, it's possible that you are using non-canonical values... |
There's some descriptions about sync and refresh |
You should visit Slack. There are lots of possible reasons for outofsync...
|
@jsoref Thanks, Slack helped. Our volume mounts did not contain a |
Just found this issue because what was displayed in the UI baffled me and I expected both "sync status" values to be the same. After reading through the thread, I now understand the difference. I like the proposals made above (e.g. #7629 (comment) or #7629 (comment)). What is missing to implement this change? Would surely help lots of people new to ArgoCD (like me). |
@jsoref I really like the idea of having the sync button look different when there is a sync to be done. That's cool. |
Oh, I wasn't precisely planning on changing it dynamically. For now I just don't want it to be confused for the two rather unrelated other labels that currently also have the same text. It probably would make sense for the button to visibly change a bit when we know something isn't synced. But let's first try to decouple these text elements. |
Reading from left to right in terms of importance to see the status of the app, it seems like the sync statuses should be the other way round. Maybe something like:
|
Summary
An ArgoCD Application has a "current sync status" and a "last sync result" which display commit SHAs that can differ.
It is not obvious why there would be a difference between these two SHAs (see below).
@jannfis explained that "current sync status" shows the “current desired state” (i.e. the latest commit to the target revision) from the last reconciliation operation, while "last sync result" shows the last sync operation where manifests were changed and applied to the cluster.
Motivation
The term "sync" seems to be overloaded in the UI labels, which makes it harder to understand whether the live configuration is in sync with the desired configuration.
Additionally, after the desired and live manifests are reconciled the "last sync result" is not updated to match the "current sync status" when the reconciliation operation finds that no difference between the live and desired state.
Proposal
I would suggest that the text "last sync result" in the UI could be changed to "live state", and the "current sync status" could be changed to "desired state".
As a second request, could the "last sync result" SHA be updated to match the "current sync status" SHA after a reconciliation operation that finds no manifests need to be updated?
It might also be useful to document what a "sync" is (i.e. a git pull and reconciliation operation, or a
kubectl apply
after a reconciliation, or a combination of these operations), since the UI seems to overload this term.The text was updated successfully, but these errors were encountered: