-
Notifications
You must be signed in to change notification settings - Fork 162
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
chore: clear app status op state #3069
Conversation
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, Kargo (and even Argo CD API server) should not update Application status when creating the operation. In fact, if status subresources were enabled for the CRD, this would not even be possible.
I take the blame for this, having wrote the argo-cd code that does exactly this.
We'll have to live with ugly hack until Argo CD improves its behavior.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3069 +/- ##
=======================================
Coverage 51.22% 51.22%
=======================================
Files 283 283
Lines 25456 25459 +3
=======================================
+ Hits 13039 13042 +3
Misses 11720 11720
Partials 697 697 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com> (cherry picked from commit 0b548db)
Successfully created backport PR for |
Hello, i just tried the patch in v1.1.0, it is still not working for me, it syncs before it sees the outofsync ,so i need another manual sync... Edit: In argocd's PR they only set operation state to nil when new operation is getting started : argoproj/argo-cd@bb5db09#diff-f952d05ea83b61f771541425e28fa3931af2f2e7950261dd59cab93bdcfe2e9eR2344 |
@stephaneetje we are clearing it only when initiating an operation. I wonder if you aren't actually running into #3082 now. |
@krancour i don't think so as i do see the sync. The problem is exactly as before i used argocd's patch. It starts the sync Before we see the app OutOfSync.
I was thinking more of the time ordering than just the condition. I think it is cleared too early, it should be cleared "when sync is getting started" |
That is what we are doing. When we update app.Operation, we clear app.Status.OperationState. |
// | ||
// We can remove this hack once the issue is resolved and all Argo CD versions | ||
// without the fix have reached their EOL. | ||
app.Status.OperationState = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. Missed that, although it probably shouldn't be status, but just status.operationState. As previously discussed, we really don't want to be messing with status at all, so we need to be very surgical about what we patch here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a fix done for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look down 👇
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
cc @jessesuen