-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Reset API intents on every dev cycle to avoid queueing #5636
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5636 +/- ##
==========================================
- Coverage 70.83% 70.68% -0.16%
==========================================
Files 404 408 +4
Lines 15243 15588 +345
==========================================
+ Hits 10798 11019 +221
- Misses 3647 3758 +111
- Partials 798 811 +13
Continue to review full report at Codecov.
|
pkg/skaffold/runner/intent.go
Outdated
@@ -39,6 +39,14 @@ func newIntents(autoBuild, autoSync, autoDeploy bool) *intents { | |||
return i | |||
} | |||
|
|||
func (i *intents) Reset() { |
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.
how about reset
since all the other methods are also unexported and the only use is in the current package.
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.
👍
if r.changeSet.needsReload { | ||
return ErrorConfigurationChanged | ||
} | ||
|
||
buildIntent, syncIntent, deployIntent := r.intents.GetIntents() | ||
logrus.Tracef("dev intents: build %t, sync %t, deploy %t\n", buildIntent, syncIntent, deployIntent) |
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.
should we notify the user either in the API response (but that'd require making it synchronous) or a string output that we're skipping this request since nothing has changed?
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.
this would require a bit more plumbing, since in the runner we're just asking whether the intent's gate is open, not whether the user requested to open it. i think this would be a good improvement, but it should probably happen outside the scope of this PR.
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.
lgtm!
Related: #5551
Merge after: #5553
Description
Before this change, sending an execution intent to the Control API would queue up that intent, meaning that the next time Skaffold was able to execute on it it would, even if that ability came well after the intent was issued by the user. Now, we will stop queueing these intents and only process them ephemerally, meaning that they either trigger the associated action if it's eligible in the dev loop, or they are discarded.
Before:
After: