-
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
fix: modify error handling of SyncerMux#Sync #6934
Conversation
I have signed the CLA, please Re-run workflow.
|
@nyuta01 Thanks for your fix. IIUC, your change will resume the devloop for other services, is that right? |
Codecov Report
@@ Coverage Diff @@
## main #6934 +/- ##
==========================================
- Coverage 70.48% 69.12% -1.36%
==========================================
Files 515 547 +32
Lines 23150 25072 +1922
==========================================
+ Hits 16317 17332 +1015
- Misses 5776 6580 +804
- Partials 1057 1160 +103
Continue to review full report at Codecov.
|
Thanks for the reply. Yes, this PR has been changed to not stop Devloop if any one of the multiple syncer is successfully updated. I see, I didn't have a correct understanding of skaffold's strategy. [1] https://github.com/nyuta01/skaffold-devloop-demo |
I see. From your example, looks like you are using skaffold modules. The question is what should skaffold do if one module sync fails. Does it make sense to sync other modules? Sync is a light weight operation and I feel it should be fine. |
Sorry, I didn't explain it well enough. Yes. The problem is how to handle the other modules when the sync in one module fails.
Yes. it makes sense. Let me explain why using my sample project as an example. First of all, there are two modules in this project, demo1 and demo2, and for the sake of development, we want to run both modules at the same time. To accomplish this requirement, I ran the following command.
Next, I wanted to make some changes to demo2.
Now I have a problem.
Why did this problem occur? This explains why it is important to sync other modules. [1] https://skaffold.dev/docs/design/config/#multiple-configuration-support |
Fixes: #4246
Description
Fixed an issue where DevLoop would stop working if multiple services were running at the same time.
In the case of multiple deployers using DeployerMux[1], even though the update target may not exist depending on the called syncer[2], the behavior at this time is regarded as an error and the update is stopped[3].
[1] https://github.com/GoogleContainerTools/skaffold/blob/v1.35.0/pkg/skaffold/runner/deployer.go#L126
[2] https://github.com/GoogleContainerTools/skaffold/blob/v1.35.0/pkg/skaffold/sync/syncer_mux.go#L26
[3] https://github.com/GoogleContainerTools/skaffold/blob/v1.35.0/pkg/skaffold/runner/v1/dev.go#L95
User facing changes (remove if N/A)
skaffold v1.35.0.
https://github.com/GoogleContainerTools/skaffold/tree/v1.35.0
skaffold PR version.
Follow-up Work (remove if N/A)
demo
https://github.com/nyuta01/skaffold-devloop-demo