devspace icon indicating copy to clipboard operation
devspace copied to clipboard

devspace sync upload is not working on subfolders of symlink

Open pratikjagrut opened this issue 3 years ago • 0 comments

What happened? DevSpace sync does not sync changes to the container from the subfolders of a symlink.

What did you expect to happen instead? DevSpace sync should sync changes to the container from the subfolders of a symlink.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Create a directory structure like mkdir -p newDir/testDir
  2. Create a file in both dir echo "HELLO" > newDir/hi.txt; echo "HELLO" > newDir/testDir/hi.txt General dir structure:
newDir
├── hi.txt
└── testDir
    └── hi.txt

1 directory, 2 files
  1. Create a new dir mkdir project
  2. Create a symlink for newDir in the project dir ln -s ../newDir newDir
  3. Add below devspace.yaml to the project dir.
version: v2beta1
name: nginx

deployments:
  app:
    helm:
      chart:
        name: component-chart
        repo: https://charts.devspace.sh
      values:
        containers:
          - name: nginx
            image: nginx:latest
        labels:
          app: nginx

dev:
  app:
    labelSelector:
      app: nginx
    containers:
      nginx:
        container: nginx
        sync:
          - path: .:/app
            waitInitialSync: true
        terminal:
          command: bash
          workDir: /app

General project structure:

project
├── devspace.yaml
└── newDir -> ../newDir

1 directory, 1 file
  1. Run devspace dev
  2. Add a new file in echo "bye" > newDir/testDir/bye.txt
  3. Check if it is synced to the container

Anything else we need to know? As a workaround to this issue user can start devspace sync --path localPath:containerPath in another terminal tab while running devspace dev. It shall keep everything in sync even subfolders from symlink.

devspace sync --config=devspace.yaml also does not work here.

Local Environment:

  • DevSpace Version: 6.2.0
  • Operating System: mac
  • ARCH of the OS: ARM64

pratikjagrut avatar Nov 30 '22 11:11 pratikjagrut