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

Can't sync files #9598

Closed
lifeBalance opened this issue Dec 5, 2024 · 7 comments · Fixed by #9599
Closed

Can't sync files #9598

lifeBalance opened this issue Dec 5, 2024 · 7 comments · Fixed by #9599

Comments

@lifeBalance
Copy link

Expected behavior

Changing a typescript file should sync it in the running container

Actual behavior

I get the error:

Syncing 1 files for ticket-app/auth:3d6686b1a49c42b910358112eca8d8d38b9c1cca5269f27d64c360bcc7b7db4b
INFO[1194] Copying files:map[auth/src/index2.ts:[/app/src/index2.ts]]toticket-app/auth:3d6686b1a49c42b910358112eca8d8d38b9c1cca5269f27d64c360bcc7b7db4b  subtask=-1 task=DevLoop
DEBU[1194] getting client config for kubeContext: docker-desktop  subtask=-1 task=DevLoop
WARN[1194] sync failed for artifact "ticket-app/auth:3d6686b1a49c42b910358112eca8d8d38b9c1cca5269f27d64c360bcc7b7db4b"  subtask=-1 task=DevLoop
WARN[1194] Skipping deploy due to sync error:copying files: didn't sync any files: sync failed for artifact "ticket-app/auth:3d6686b1a49c42b910358112eca8d8d38b9c1cca5269f27d64c360bcc7b7db4b"  subtask=-1 task=DevLoop
Watching for changes...

Information

  • Skaffold version: v2.13.2
  • Operating system: macos Sonoma
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta11
kind: Config
metadata:
  name: ticket-app
build:
  local:
    push: false
  artifacts:
    - image: ticket-app/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: "src/**/*.ts"
            dest: .
manifests:
  rawYaml:
    - https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.12.0-beta.0/deploy/static/provider/cloud/deploy.yaml
    - infra/k8s/*

Steps to reproduce the behavior

  1. a clonable repository with the sample skaffold project: https://github.com/lifeBalance/micro
  2. cd ticket-app && skaffold dev -v debug
  3. I save changes to some file, open a shell into the container, and the changes are not there.
@idsulik
Copy link
Contributor

idsulik commented Dec 6, 2024

@lifeBalance try to update the skaffold to the latest version

@lifeBalance
Copy link
Author

@idsulik isn't v2.13.2 the latest version?

@idsulik
Copy link
Contributor

idsulik commented Dec 6, 2024

sorry, you're right.

@idsulik
Copy link
Contributor

idsulik commented Dec 6, 2024

@lifeBalance could you please execute this command when skaffold starts copying?
kubectl get pods --output=custom-columns="NAME:.metadata.name,PHASE:.status.phase"

@lifeBalance
Copy link
Author

kubectl get pods --output=custom-columns="NAME:.metadata.name,PHASE:.status.phase"
NAME                        PHASE
auth-depl-ddccc7884-d2zz6   Running

@idsulik
Copy link
Contributor

idsulik commented Dec 7, 2024

@lifeBalance does the sync work now? Need to reproduce the error and check the pod's status.phase. According to the source code, it should return any specific error, OR it returns didn't sync any files if it found no pods in status.phase

@lifeBalance
Copy link
Author

@idsulik it didn't work after I run the command above. But I installed ingress-nginx using Helm, and everything seems to be working, syncing and all (not sure if that really was the fix though)

Just removed the URL and the globs from the manifests:

apiVersion: skaffold/v4beta11
kind: Config
metadata:
  name: ticket-app
build:
  local:
    push: false
  artifacts:
    - image: ticket-app/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .
manifests:
  rawYaml:
    - infra/k8s/auth-depl.yaml
    - infra/k8s/ingress-srv.yaml

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 a pull request may close this issue.

2 participants