-
Notifications
You must be signed in to change notification settings - Fork 313
fix: wait until sync completes to run services #4731
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
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4731 +/- ##
==========================================
+ Coverage 48.86% 48.88% +0.02%
==========================================
Files 354 355 +1
Lines 29718 29752 +34
==========================================
+ Hits 14521 14544 +23
- Misses 14040 14047 +7
- Partials 1157 1161 +4 🚀 New features to boost your workflow:
|
- Introduced TemplateObjectMeta method in MockApp for better test coverage. - Updated devDeployer to utilize servicesUpWait environment variable for controlling service deployment behavior. - Enhanced deployMainDev and deployDevServices methods to respect the servicesUpWait flag, improving deployment flow. Signed-off-by: Javier Lopez <javier@okteto.com>
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.
As we saw offline, it seems there is an issue when the environment variable is not set. Services under services
section in the manifest are not being put on development mode
cmd/up/devdeployer.go
Outdated
if !dd.servicesUpWait { | ||
return 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.
Could we add a comment here mentioning that if the flag is false, the deployMainDev
function would deploy them? It is not obvious seeing the variable name, and it is not everything self-contained in the same function. I mean, it is not obvious to remember that in a few months
- Updated the activate and createDevContainer methods to handle dev service deployment based on the servicesUpWait flag. - Simplified the deployMainDev method by removing redundant service deployment checks. - Added a new Kubernetes manifest for an additional test service to enhance integration testing. This change enhances the deployment flow and improves test coverage for service management. Signed-off-by: Javier Lopez <javier@okteto.com>
- Updated the comment in the activate function to clarify that when the servicesUpWait flag is set, dev services will be deployed as they won't be included with the main dev deployment. This change improves code clarity and understanding of the deployment logic. Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb Okteto up tests failed both in linux and windows, could you review if they are related with your changes? |
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez javier@okteto.com
Proposed changes
Fixes PROD-293
Problem:
We were not waiting for the sync to complete on the
dev[svcname].services
. When syncing large files or multiple files, this caused the service commands to execute before synchronization was finished, leading to failures and undesired behaviors.Solution:
This PR fixes the issue by splitting the deployment of the dev environments into two separate steps: mainDev and services. We deploy the mainDev, synchronise the files and then start the rest of the services. This ensures that synchronization completes before the service commands run.
How to validate
dd if=/dev/zero of=bigfile.txt bs=1024k count=1024
okteto up
CLI Quality Reminders 🔧
For both authors and reviewers: