{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1316","repository_url":"https://api.github.com/repos/GoogleContainerTools/skaffold","labels_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1316/comments","events_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1316/events","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1316","id":383964479,"node_id":"MDU6SXNzdWUzODM5NjQ0Nzk=","number":1316,"title":"Skaffold updates, then rollbacks deployment","user":{"login":"aleksamagicka","id":10512545,"node_id":"MDQ6VXNlcjEwNTEyNTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10512545?v=4","gravatar_id":"","url":"https://api.github.com/users/aleksamagicka","html_url":"https://github.com/aleksamagicka","followers_url":"https://api.github.com/users/aleksamagicka/followers","following_url":"https://api.github.com/users/aleksamagicka/following{/other_user}","gists_url":"https://api.github.com/users/aleksamagicka/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksamagicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksamagicka/subscriptions","organizations_url":"https://api.github.com/users/aleksamagicka/orgs","repos_url":"https://api.github.com/users/aleksamagicka/repos","events_url":"https://api.github.com/users/aleksamagicka/events{/privacy}","received_events_url":"https://api.github.com/users/aleksamagicka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-24T06:41:58Z","updated_at":"2018-11-25T07:59:41Z","closed_at":"2018-11-25T07:58:51Z","author_association":"NONE","body":"### Expected behavior\r\n\r\nSkaffold should propagate changes to Kubernetes (see `leeroy-app` output below).\r\n\r\n### Actual behavior\r\n\r\nSkaffold propagates new changes in Kubernetes, and then reverses them via DeploymentRollback. Does not happen with `leeroy-app`.\r\n\r\n### Information\r\n\r\n- Skaffold version: v0.18.0 (Kubernetes v1.10.0)\r\n- Operating system: Windows 7 x64 Ultimate\r\n- Contents of skaffold.yaml:\r\n\r\n```yaml\r\napiVersion: skaffold/v1alpha5\r\nkind: Config\r\nbuild:\r\n  artifacts:\r\n  - image: skaffoldtest\r\n    context: ./SkaffoldTest\r\n    docker:\r\n      dockerfile: Dockerfile\r\n      cacheFrom:\r\n      - microsoft/dotnet:2.1-aspnetcore-runtime\r\n      - microsoft/dotnet:2.1-sdk\r\n  tagPolicy:\r\n    gitCommit: {}\r\n```\r\n\r\n### Steps to reproduce the behavior\r\n\r\n1. [Download](https://drive.google.com/open?id=1WHMPg3z-UnRHCRQWMx8RGHIWw_SpZFaq) the example test project I created for this purpose.\r\n2. Run `skaffold dev`.\r\n3. Go to the service in browser (`minikube service skaffoldtest-web`, if on minikube).\r\n4. Make a file change (for example, in _Layout.cshtml).\r\n5. Skaffold rebuilds, but the changes are not seen. (Run step 3 again after rebuild.)\r\n\r\nKubernetes reports the following (`kubectl describe deployments`):\r\n\r\n```\r\nName:                   skaffoldtest-web\r\nNamespace:              default\r\nCreationTimestamp:      Fri, 23 Nov 2018 16:55:07 +0100\r\nLabels:                 cleanup=true\r\n                        component=skaffoldtest-web\r\n                        deployed-with=skaffold\r\n                        docker-api-version=1.35\r\n                        name=skaffoldtest\r\n                        skaffold-builder=local\r\n                        skaffold-deployer=kubectl\r\n                        skaffold-tag-policy=git-commit\r\n                        tail=true\r\nAnnotations:            deployment.kubernetes.io/revision: 7\r\n                        kubectl.kubernetes.io/last-applied-configuration:\r\n                          {\"apiVersion\":\"extensions/v1beta1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"name\":\"skaffoldtest-web\",\"namespace\":\"default\"},\"spec...\r\nSelector:               component=skaffoldtest-web,name=skaffoldtest\r\nReplicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable\r\nStrategyType:           RollingUpdate\r\nMinReadySeconds:        0\r\nRollingUpdateStrategy:  0 max unavailable, 4 max surge\r\nPod Template:\r\n  Labels:  component=skaffoldtest-web\r\n           name=skaffoldtest\r\n  Containers:\r\n   skaffoldtest:\r\n    Image:        skaffoldtest:5d202bf-dirty-14315f0\r\n    Port:         80/TCP\r\n    Host Port:    0/TCP\r\n    Environment:  <none>\r\n    Mounts:       <none>\r\n  Volumes:        <none>\r\nConditions:\r\n  Type           Status  Reason\r\n  ----           ------  ------\r\n  Available      True    MinimumReplicasAvailable\r\n  Progressing    True    NewReplicaSetAvailable\r\nOldReplicaSets:  <none>\r\nNewReplicaSet:   skaffoldtest-web-598c78694c (3/3 replicas created)\r\nEvents:\r\n  Type     Reason                              Age                    From                   Message\r\n  ----     ------                              ----                   ----                   -------\r\n  Normal   ScalingReplicaSet                   2m18s                  deployment-controller  Scaled up replica set skaffoldtest-web-598c78694c to 3\r\n  Warning  DeploymentRollbackRevisionNotFound  2m18s (x2 over 2m18s)  deployment-controller  Unable to find last revision.\r\n  Normal   ScalingReplicaSet                   86s                    deployment-controller  Scaled up replica set skaffoldtest-web-59587d6f59 to 3\r\n  Normal   DeploymentRollback                  86s                    deployment-controller  Rolled back deployment \"skaffoldtest-web\" to revision 1\r\n  Normal   ScalingReplicaSet                   86s                    deployment-controller  Scaled down replica set skaffoldtest-web-59587d6f59 to 0\r\n  Normal   ScalingReplicaSet                   40s                    deployment-controller  Scaled up replica set skaffoldtest-web-978bcc484 to 3\r\n  Normal   DeploymentRollback                  40s                    deployment-controller  Rolled back deployment \"skaffoldtest-web\" to revision 3\r\n  Normal   ScalingReplicaSet                   39s                    deployment-controller  Scaled down replica set skaffoldtest-web-978bcc484 to 0\r\n  Normal   ScalingReplicaSet                   5s                     deployment-controller  Scaled up replica set skaffoldtest-web-57f8786d65 to 3\r\n  Normal   DeploymentRollback                  5s                     deployment-controller  Rolled back deployment \"skaffoldtest-web\" to revision 5\r\n  Normal   ScalingReplicaSet                   5s                     deployment-controller  Scaled down replica set skaffoldtest-web-57f8786d65 to 0\r\n```\r\n\r\nIt rollbacks the deployment after every scale. Each scale up -> rollback event happened on a file change.\r\n\r\nHere is output for `leeroy-app`:\r\n\r\n```\r\nName:                   leeroy-app\r\nNamespace:              default\r\nCreationTimestamp:      Sat, 24 Nov 2018 07:31:08 +0100\r\nLabels:                 app=leeroy-app\r\n                        cleanup=true\r\n                        deployed-with=skaffold\r\n                        docker-api-version=1.35\r\n                        skaffold-builder=local\r\n                        skaffold-deployer=kubectl\r\n                        skaffold-tag-policy=git-commit\r\n                        tail=true\r\nAnnotations:            deployment.kubernetes.io/revision: 2\r\n                        kubectl.kubernetes.io/last-applied-configuration:\r\n                          {\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"app\":\"leeroy-app\"},\"name\":\"leeroy-app\",\"namespace\":\"de...\r\nSelector:               app=leeroy-app\r\nReplicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable\r\nStrategyType:           RollingUpdate\r\nMinReadySeconds:        0\r\nRollingUpdateStrategy:  25% max unavailable, 25% max surge\r\nPod Template:\r\n  Labels:  app=leeroy-app\r\n  Containers:\r\n   leeroy-app:\r\n    Image:        gcr.io/k8s-skaffold/leeroy-app:f1b909ef-dirty-27bf114\r\n    Port:         50051/TCP\r\n    Host Port:    0/TCP\r\n    Environment:  <none>\r\n    Mounts:       <none>\r\n  Volumes:        <none>\r\nConditions:\r\n  Type           Status  Reason\r\n  ----           ------  ------\r\n  Available      True    MinimumReplicasAvailable\r\n  Progressing    True    NewReplicaSetAvailable\r\nOldReplicaSets:  <none>\r\nNewReplicaSet:   leeroy-app-7d6f9cf87c (1/1 replicas created)\r\nEvents:\r\n  Type    Reason             Age   From                   Message\r\n  ----    ------             ----  ----                   -------\r\n  Normal  ScalingReplicaSet  58s   deployment-controller  Scaled up replica set leeroy-app-7d68bbd5c7 to 1\r\n  Normal  ScalingReplicaSet  10s   deployment-controller  Scaled up replica set leeroy-app-7d6f9cf87c to 1\r\n  Normal  ScalingReplicaSet  9s    deployment-controller  Scaled down replica set leeroy-app-7d68bbd5c7 to 0\r\n```\r\n\r\nI changed it once, and it only scaled (no reverts, as it should be).\r\n\r\nThe new version appears after restart."},"comment":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/comments/441422494","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1316#issuecomment-441422494","issue_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1316","id":441422494,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTQyMjQ5NA==","user":{"login":"aleksamagicka","id":10512545,"node_id":"MDQ6VXNlcjEwNTEyNTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10512545?v=4","gravatar_id":"","url":"https://api.github.com/users/aleksamagicka","html_url":"https://github.com/aleksamagicka","followers_url":"https://api.github.com/users/aleksamagicka/followers","following_url":"https://api.github.com/users/aleksamagicka/following{/other_user}","gists_url":"https://api.github.com/users/aleksamagicka/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksamagicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksamagicka/subscriptions","organizations_url":"https://api.github.com/users/aleksamagicka/orgs","repos_url":"https://api.github.com/users/aleksamagicka/repos","events_url":"https://api.github.com/users/aleksamagicka/events{/privacy}","received_events_url":"https://api.github.com/users/aleksamagicka/received_events","type":"User","site_admin":false},"created_at":"2018-11-25T07:59:41Z","updated_at":"2018-11-25T07:59:41Z","author_association":"NONE","body":"Sorry. My bad :man_facepalming:\r\n\r\nI had\r\n```\r\n  rollbackTo:\r\n    revision: 0\r\n```\r\n\r\nin my k8s config.\r\n"}}
{"actor":{"display_login":"aleksamagicka"}}