Okteto up --build fails

I am building a rasa chatbot which is connected to mongodb and everything has been working perfect. Including sending messages to the chatbot and receiving responses.

However, making changes to the rasa core files like nlu.yaml, domain.yml e.t.c necessitates running okteto up --build command so that the data can be re-trained and a new model generated.

The initial error prompted me to edit the okteto.yaml file by changing autocreate property from true to false which i did and the okteto up --build started working but it broke down mid-way with the error message

exit signal received due to error: couldn't activate your development container Invalid Value........field is immutable....... `

I have development and production pods (at least that is what i assume because i am new to the okteto framework and infrastructure) and from my understanding i have a production environment and a development environment.

I can send the log file the above excerpt from the log file is not sufficient

Below is the log excerpt

time="2022-12-19T09:53:46+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXXXXXXXXXX'" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:46+03:00" level=info msg="activating development container retry=false" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:46+03:00" level=info msg="starting shutdown sequence" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:47+03:00" level=info msg="sent cancellation signal" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:47+03:00" level=info msg="stopping forwarders" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:47+03:00" level=info msg="completed shutdown sequence" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:47+03:00" level=info msg="activate failed with: app 'grace' already exist" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T09:53:47+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=a8cb4c0b-06a5-4d26-9d99-8f2a91e8a15f version=2.3.3
time="2022-12-19T10:05:20+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXX'" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:20+03:00" level=info msg="activating development container retry=false" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="starting shutdown sequence" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="sent cancellation signal" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="stopping forwarders" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="completed shutdown sequence" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="activate failed with: app 'grace' already exist" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:05:21+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=b5aba2e9-9530-4272-b61f-90efa155bf58 version=2.3.3
time="2022-12-19T10:12:11+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="activating development container retry=false" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="starting shutdown sequence" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="sent cancellation signal" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="stopping forwarders" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="completed shutdown sequence" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="activate failed with: app 'grace' already exist" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:12+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=4a975863-0d2b-4b72-9349-64b1145e5807 version=2.3.3
time="2022-12-19T10:12:52+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx'" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:52+03:00" level=info msg="activating development container retry=false" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="starting shutdown sequence" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="sent cancellation signal" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="stopping forwarders" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="completed shutdown sequence" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="activate failed with: app 'grace' already exist" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:12:53+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=2d9e7248-c5fd-4f14-bd10-423a6edb3232 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="activating development container retry=false" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="starting shutdown sequence" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="sent cancellation signal" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="stopping forwarders" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="completed shutdown sequence" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="activate failed with: app 'grace' already exist" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:13:18+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=b41b4b37-0982-4b69-b362-0a1eb8745ea2 version=2.3.3
time="2022-12-19T10:47:07+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:07+03:00" level=info msg="activating development container retry=false" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:07+03:00" level=info msg="starting shutdown sequence" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:08+03:00" level=info msg="sent cancellation signal" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:08+03:00" level=info msg="stopping forwarders" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:08+03:00" level=info msg="completed shutdown sequence" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:08+03:00" level=info msg="activate failed with: app 'grace' already exist" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:47:08+03:00" level=info msg="exit signal received due to error: app 'grace' already exist" action=8e2d4aba-f10f-4973-a8ce-8c3480317019 version=2.3.3
time="2022-12-19T10:50:21+03:00" level=info msg="'.stignore' exists in folder 'XXXXXXXXXXXXXXXX'" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:22+03:00" level=info msg="activating development container retry=false" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:22+03:00" level=debug msg="calling registry registry.cloud.okteto.net" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:23+03:00" level=debug msg="image with digest: registry.cloud.okteto.net/a4ayub/rasa-server-okteto@sha256:d3f1e63f94e14cfbfa329d5bafc779d5cd52ca3191cfc9c1f65b1e2cf6316bf5" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:23+03:00" level=info msg="building dev image tag okteto.dev/grace-grace:okteto" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:23+03:00" level=info msg="building your image on tcp://buildkit.cloud.okteto.net:443" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:30+03:00" level=debug msg="calling registry registry.cloud.okteto.net" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:31+03:00" level=debug msg="image with digest: registry.cloud.okteto.net/a4ayub/grace-grace@sha256:d3f1e63f94e14cfbfa329d5bafc779d5cd52ca3191cfc9c1f65b1e2cf6316bf5" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:31+03:00" level=info msg="local syncthing initialized: gui -> 4397, sync -> 4398" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:31+03:00" level=info msg="remote syncthing initialized: gui -> 4396, sync -> 4395" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:31+03:00" level=info msg="updating volume claim 'grace-okteto'" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:32+03:00" level=info msg="create deployment secrets" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:33+03:00" level=info msg="updated okteto secret 'okteto-grace'" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:33+03:00" level=info msg="starting shutdown sequence" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="sent cancellation signal" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="stopping syncthing" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="stopping forwarders" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="completed shutdown sequence" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="activate failed with: couldn't activate your development container\n    Deployment.apps \"grace-okteto\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"stack.okteto.com/name\":\"grace\", \"stack.okteto.com/service\":\"grace\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3
time="2022-12-19T10:50:34+03:00" level=info msg="exit signal received due to error: couldn't activate your development container\n    Deployment.apps \"grace-okteto\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"stack.okteto.com/name\":\"grace\", \"stack.okteto.com/service\":\"grace\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable" action=d88043b3-7b04-4539-9d82-af551c82ac99 version=2.3.3

This error is because you changed from autocreate=false to true. Destroy the environment before you change that flag to avoid any potential issues with this.

If you are using a docker-compose.yaml to define your application, you don’t need this value. If you can share a public repo with your docker-compose manifest and okteto.yaml we can give you tips on how to proceed.