-
Notifications
You must be signed in to change notification settings - Fork 311
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
Fail if deployment is modified when development environment is active #720
Conversation
func UpdateOktetoRevision(ctx context.Context, d *appsv1.Deployment, client *kubernetes.Clientset) error { | ||
tries := 0 | ||
ticker := time.NewTicker(200 * time.Millisecond) | ||
for tries < maxRetriesUpdateRevision { |
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.
what is the loop for?
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.
we need to get the revision number that k8s generates on each deployment update, but it usually takes a few ms to generate it
@@ -226,6 +227,20 @@ func (up *UpContext) Activate(autoDeploy, resetSyncthing bool) { | |||
return | |||
} | |||
|
|||
if up.retry && !deployments.IsDevModeOn(d) { | |||
log.Information("Development environment has been deactivated") |
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.
we should mention that it was deactivated somewhere else.
Co-Authored-By: Ramiro Berrelleza <ramiro@okteto.com>
3e9cc2b
to
1303ce1
Compare
Codecov Report
@@ Coverage Diff @@
## master #720 +/- ##
==========================================
- Coverage 32.26% 31.98% -0.29%
==========================================
Files 58 58
Lines 4509 4549 +40
==========================================
Hits 1455 1455
- Misses 2959 2999 +40
Partials 95 95
Continue to review full report at Codecov.
|
Fixes #661