devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Fatal error on deploy dependencies

Open clgiovannelli opened this issue 1 year ago • 2 comments

What happened?

Running devspace dev with version 6.3.4 (the same with 6.3.3) I get:

fatal deploy dependencies: resolve dependencies: chdir ~/.devspace/dependencies/my-project-devspace-git-master: no such file or directory

Here's the backtrace:

fatal chdir /Users/myuser/.devspace/dependencies/https-github-com-project-git-main: no such file or directory
resolve dependencies
[github.com/loft-sh/devspace/pkg/devspace/dependency.(*manager).handleDependencies](http://github.com/loft-sh/devspace/pkg/devspace/dependency.(*manager).handleDependencies)
	[github.com/loft-sh/devspace/pkg/devspace/dependency/manager.go:79](http://github.com/loft-sh/devspace/pkg/devspace/dependency/manager.go:79)
[github.com/loft-sh/devspace/pkg/devspace/dependency.(*manager).ResolveAll](http://github.com/loft-sh/devspace/pkg/devspace/dependency.(*manager).ResolveAll)
	[github.com/loft-sh/devspace/pkg/devspace/dependency/manager.go:47](http://github.com/loft-sh/devspace/pkg/devspace/dependency/manager.go:47)
[github.com/loft-sh/devspace/cmd.initialize](http://github.com/loft-sh/devspace/cmd.initialize)
	[github.com/loft-sh/devspace/cmd/run_pipeline.go:343](http://github.com/loft-sh/devspace/cmd/run_pipeline.go:343)
[github.com/loft-sh/devspace/cmd.(*RunPipelineCmd).Run](http://github.com/loft-sh/devspace/cmd.(*RunPipelineCmd).Run)
	[github.com/loft-sh/devspace/cmd/run_pipeline.go:253](http://github.com/loft-sh/devspace/cmd/run_pipeline.go:253)
[github.com/loft-sh/devspace/cmd.NewDevCmd.func1](http://github.com/loft-sh/devspace/cmd.NewDevCmd.func1)
	[github.com/loft-sh/devspace/cmd/dev.go:32](http://github.com/loft-sh/devspace/cmd/dev.go:32)
[github.com/spf13/cobra.(*Command).execute](http://github.com/spf13/cobra.(*Command).execute)
	[github.com/spf13/[email protected]/command.go:916](http://github.com/spf13/[email protected]/command.go:916)
[github.com/spf13/cobra.(*Command).ExecuteC](http://github.com/spf13/cobra.(*Command).ExecuteC)
	[github.com/spf13/[email protected]/command.go:1040](http://github.com/spf13/[email protected]/command.go:1040)
[github.com/spf13/cobra.(*Command).Execute](http://github.com/spf13/cobra.(*Command).Execute)
	[github.com/spf13/[email protected]/command.go:968](http://github.com/spf13/[email protected]/command.go:968)
[github.com/loft-sh/devspace/cmd.Execute](http://github.com/loft-sh/devspace/cmd.Execute)
	[github.com/loft-sh/devspace/cmd/root.go:151](http://github.com/loft-sh/devspace/cmd/root.go:151)
main.main
	[github.com/loft-sh/devspace/main.go:17](http://github.com/loft-sh/devspace/main.go:17)
runtime.main
	runtime/proc.go:267
runtime.goexit
	runtime/asm_arm64.s:1197
deploy dependencies
[github.com/loft-sh/devspace/cmd.initialize](http://github.com/loft-sh/devspace/cmd.initialize)
	[github.com/loft-sh/devspace/cmd/run_pipeline.go:345](http://github.com/loft-sh/devspace/cmd/run_pipeline.go:345)
[github.com/loft-sh/devspace/cmd.(*RunPipelineCmd).Run](http://github.com/loft-sh/devspace/cmd.(*RunPipelineCmd).Run)
	[github.com/loft-sh/devspace/cmd/run_pipeline.go:253](http://github.com/loft-sh/devspace/cmd/run_pipeline.go:253)
[github.com/loft-sh/devspace/cmd.NewDevCmd.func1](http://github.com/loft-sh/devspace/cmd.NewDevCmd.func1)
	[github.com/loft-sh/devspace/cmd/dev.go:32](http://github.com/loft-sh/devspace/cmd/dev.go:32)
[github.com/spf13/cobra.(*Command).execute](http://github.com/spf13/cobra.(*Command).execute)
	[github.com/spf13/[email protected]/command.go:916](http://github.com/spf13/[email protected]/command.go:916)
[github.com/spf13/cobra.(*Command).ExecuteC](http://github.com/spf13/cobra.(*Command).ExecuteC)
	[github.com/spf13/[email protected]/command.go:1040](http://github.com/spf13/[email protected]/command.go:1040)
[github.com/spf13/cobra.(*Command).Execute](http://github.com/spf13/cobra.(*Command).Execute)
	[github.com/spf13/[email protected]/command.go:968](http://github.com/spf13/[email protected]/command.go:968)
[github.com/loft-sh/devspace/cmd.Execute](http://github.com/loft-sh/devspace/cmd.Execute)
	[github.com/loft-sh/devspace/cmd/root.go:151](http://github.com/loft-sh/devspace/cmd/root.go:151)
main.main
	[github.com/loft-sh/devspace/main.go:17](http://github.com/loft-sh/devspace/main.go:17)
runtime.main
	runtime/proc.go:267
runtime.goexit
	runtime/asm_arm64.s:1197

What did you expect to happen instead?

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

It happend running devspace dev or devspace build, I tried running devspace reset dependencies, I can access and clone my repos.

My devspace.yaml:

version: v2beta1
name: test-api

pipelines:
  # This is the pipeline for the main command: `devspace dev` (or `devspace run-pipeline dev`)
  dev:
    run: |-
      run_dependencies --all
      create_deployments --all
      start_dev ${DEVSPACE_NAME}
  deploy:
    run: |-
      run_dependencies --all
      build_images --all -t $(git describe --always)
      create_deployments --all

images:
  test-api:
    image: ${IMAGE}
    docker:
      preferMinikube: true
      useBuildKit: true
    createPullSecret: false
    dockerfile: Dockerfile.development
    rebuildStrategy: ignoreContextChanges
    context: ./

vars:
  IMAGE: "test/test-api"

# This is a list of `deployments` that DevSpace can create for this project
deployments:
  test-api:
    # This deployment uses `helm` but you can also define `kubectl` deployments or kustomizations
    helm:
      # We are deploying this project with the Helm chart you provided
      chart:
        name: component-chart
        repo: https://charts.devspace.sh
      # Under `values` we can define the values for this Helm chart used during `helm install/upgrade`
      # You may also use `valuesFiles` to load values from files, e.g. valuesFiles: ["values.yaml"]
      values:
        containers:
          - image: ${IMAGE}
        service:
          ports:
            - port: ${PORT}
        ingress:
          tls: true
          rules:
            - host: "${DEVSPACE_NAME}.${NGROK_HOSTNAME}"
              path: /
              servicePort: ${PORT}
# This is a list of `dev` containers that are based on the containers created by your deployments
dev:
  test-api:
    # Search for the container that runs this image
    imageSelector: ${IMAGE}
    # Sync files between the local filesystem and the development container
    sync:
      - path: ./
        uploadExcludeFile: .dockerignore
        excludePaths:
          - terraform
    # Open a terminal and use the following command to start it
    terminal:
      command: ./devspace_start.sh
    # Inject a lightweight SSH server into the container (so your IDE can connect to the remote dev env)
    ssh:
      enabled: true
    # Make the following commands from my local machine available inside the dev container
    proxyCommands:
      - command: devspace
      - command: kubectl
      - command: helm
    # Forward the following ports to be able access your application via localhost
    ports:
      - port: "${PORT}"

# Use the `commands` section to define repeatable dev workflows for this project
commands:
  start:
    command: |
      devspace enter -- bash -c 'bundle exec rails server -p 3025 -b 0.0.0.0'

dependencies:
  postgres:
    git: https://github.com/commercelayer/devspace.git
    disablePull: true
    branch: master
    subPath: /postgres

Local Environment:

  • DevSpace Version:6.3.4
  • Operating System: mac
  • ARCH of the OS: ARM64
  • Kubernetes Cluster:
  • Cloud Provider: minikube
  • Kubernetes Version: Client Version: v1.28.3 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.26.3

clgiovannelli avatar Nov 09 '23 11:11 clgiovannelli

Hi @clgiovannelli I've tried but wasn't able to reproduce this

89luca89 avatar Nov 30 '23 12:11 89luca89

Hi @clgiovannelli I've tried but wasn't able to reproduce this

This still happens to me, even after running devspace reset dependencies.

If I clone my repo in my home folder ~/.devspace/dependencies like this:

git clone https://github.com/myorg/devspace.git https-github-com-myorg-devspace-git-master

It works.

clgiovannelli avatar Dec 12 '23 15:12 clgiovannelli