-
Notifications
You must be signed in to change notification settings - Fork 1.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
Set redeploy
intent only when there are rebuilt artifacts
#5553
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5553 +/- ##
==========================================
- Coverage 71.08% 71.07% -0.01%
==========================================
Files 402 402
Lines 15145 15183 +38
==========================================
+ Hits 10766 10792 +26
- Misses 3586 3597 +11
- Partials 793 794 +1
Continue to review full report at Codecov.
|
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.
I'm going to defer to @nkubala.
My question is: don't we need to reset the intents at line 62?
if !needsSync && !needsBuild && !needsDeploy {
return nil
}
Co-authored-by: Brian de Alwis <[email protected]>
Is it possible to write some tests around this? |
IMO That depends on if we want to expire triggers if they aren't immediately actionable or queue them. I think @nkubala intended to have them queue up (like a single deploy request followed some time later by a single build request would run build and deploy both once). I kind of like this behavior; but agree that since it's only maintained as internal state it can cause some confusion. Maybe a better flow would be if However, I don't want to change that behavior in this PR. :) |
this is what i intended at the time, but now i'm not so sure it's what we want. it might be a more predictable UX to just reject the intents sent by a user if skaffold isn't ready to take the corresponding action yet (e.g. receives
if we decide to keep the current behavior, this is definitely something we should do. whatever route we take let's try and eliminate confusion. cc #4886, which i think may be fixed by this issue. |
I think queuing up changes would make sense if we had a general I could see a user wanting to use |
Fixes #5551 #4886
In an ongoing devloop the
redeploy
intent can be set in one of two ways: (1)there are rebuilt artifacts, or (2)the deploy dependency files have changed. In the current implementation, the redeploy intent is set as soon as there's a new request for an artifact rebuild. This doesn't work well in conjunction with the control APIs since the auto-rebuild can be off in which case the redeploy intent is processed immediately on the old image builds.This PR queues a redeploy request of type (1) only after the artifacts have been rebuilt. This fixes the issue of the no-op deploy described in #5551 and also ensures that any rebuilt images are deployed.