Skip to content
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

Merged
merged 3 commits into from
Feb 28, 2020

Conversation

pchico83
Copy link
Contributor

Fixes #661

func UpdateOktetoRevision(ctx context.Context, d *appsv1.Deployment, client *kubernetes.Clientset) error {
tries := 0
ticker := time.NewTicker(200 * time.Millisecond)
for tries < maxRetriesUpdateRevision {
Copy link
Member

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?

Copy link
Contributor Author

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")
Copy link
Member

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.

cmd/up.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 28, 2020

Codecov Report

Merging #720 into master will decrease coverage by 0.28%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
pkg/k8s/deployments/translate.go 84.32% <ø> (ø) ⬆️
cmd/up.go 6% <0%> (-0.2%) ⬇️
pkg/k8s/deployments/crud.go 9.84% <0%> (-1.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ec9937...1303ce1. Read the comment docs.

@pchico83 pchico83 merged commit 0d98343 into master Feb 28, 2020
@pchico83 pchico83 deleted the k8s-changes branch February 28, 2020 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning if there are concurrent manifest changes while "okteto up" is running
2 participants