devpod icon indicating copy to clipboard operation
devpod copied to clipboard

code directory not updating

Open awesomescot opened this issue 1 year ago • 2 comments

What happened?
Using the folder workspace, when I update the Dockerfile it is not reflected in DevPod. "Rebuild" and "Reset" don't seem to get the new code. I have to completely delete the workspace and recreate it in order to get the new code.

What did you expect to happen instead?
I would expect the code to get updated continuously. A rebuild or reset I would especially expect it to rebuild from the code in the local directory and not pull from cache.

How can we reproduce the bug? (as minimally and precisely as possible)
Create a workspace with kubernetes backend(although I think this might happen with others also). Build your image, which failed due to an error in Dockerfile. Change some code in your Dockerfile to fix error. Try to rebuild or reset. From the logs you can tell it's not getting the new Dockerfile code and continues to fail.

My devcontainer.json:

{
//	name of the dev container
  "name": "dev-repo-container",
//	Or use a Dockerfile here, more info: https://containers.dev/guide/dockerfile
  "build": {
    "dockerfile": "Dockerfile",
    "context": ".."
  },
  "initializeCommand": "mkdir -p /tmp/devcontainers/pypoetry",
  "postCreateCommand": "cd python && make install-dev",
  "mounts": [
    "source=${env:HOME}${env:USERPROFILE}/.aws,target=/root/.aws,type=bind",
    "source=${env:HOME}${env:USERPROFILE}/.ssh,target=/root/.ssh,type=bind",
    "source=/tmp/devcontainers/pypoetry,target=/root/.cache/pypoetry,type=bind",
  ]
}

Local Environment:

  • DevPod Version: 0.5.7
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Cloud Provider: aws
  • Kubernetes Provider:
Client Version: v1.29.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.26.15-eks-adc7111
  • Local/remote provider: ssh

Anything else we need to know?

awesomescot avatar May 21 '24 22:05 awesomescot

related https://github.com/loft-sh/devpod/issues/947

scottwn avatar May 31 '24 18:05 scottwn

Hi @awesomescot, this issue has slipped my attention. Are you starting your workspace from a local folder or a git repository URL?

pascalbreuninger avatar Sep 02 '24 07:09 pascalbreuninger

@awesomescot does this still happen for you with the latest devpod? I tried using the k8s operator and it worked

bkneis avatar Oct 15 '24 13:10 bkneis

Running into the same issue. I'm on the latest version on windows. The docker provider will pickup the changes on a rebuild, but the kubernetes provider will not. It's not seeing changes to the devcontainer.json.

Benjamin-Etheredge avatar Oct 18 '24 23:10 Benjamin-Etheredge

Further testing is showing that the underlying file changes are there, but it will not pickup any changes to devcontainer.json. It only uses the version of that file that was there at first creation.

Benjamin-Etheredge avatar Oct 18 '24 23:10 Benjamin-Etheredge

Thanks @Benjamin-Etheredge, I'll take another look and see if I can find why :+1:

bkneis avatar Oct 21 '24 07:10 bkneis

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Feb 18 '25 01:02 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Mar 20 '25 02:03 github-actions[bot]