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

Gradle build concurrency can result in deadlocks #9485

Open
sergeykad opened this issue Aug 1, 2024 · 0 comments
Open

Gradle build concurrency can result in deadlocks #9485

sergeykad opened this issue Aug 1, 2024 · 0 comments

Comments

@sergeykad
Copy link

sergeykad commented Aug 1, 2024

Expected behavior

Running Skaffold with Gradle + Jib build with concurrency enabled (or maybe always?) will offload all the concurrency implementation to Gradle. In other words, building multiple images in a Gradle multimodule project will execute Gradle once with multiple tasks. For example ./gradlew module1:jib module2:jib

Actual behavior

It appears that Skaffolds executes multiple Gradle instances if build.local.concurrency: 0 is set leading to occasional deadlocks.

Information

  • Skaffold version: 2.12.0
  • Operating system: Ubuntu 22.04.4
  • Installed via: curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \ sudo install skaffold /usr/local/bin/
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta11
kind: Config

metadata:
  name: core-services

build:
  local:
    concurrency: 0
  tagPolicy:
    sha256: { }
  artifacts:
    - image: service1
      jib:
        project: service1 
      sync:
        auto: true
    - image: service2
      jib:
        project: service2
      sync:
        auto: true
    - image: service3
      jib:
        project: service3
      sync:
        auto: true
    
deploy:
  helm:
    releases:
      - name: services
        namespace: my-namespace
        repo: http://helm.server.com/repository/helm-hosted/
        chartPath: simple-service-template
        version: 3.2.x
        setValueTemplates:
          services.service1.image.tag: "{{.IMAGE_TAG_service1}}@{{.IMAGE_DIGEST_service1}}"
          services.service2.image.tag: "{{.IMAGE_TAG_service2}}@{{.IMAGE_DIGEST_service2}}"
          services.service3.image.tag: "{{.IMAGE_TAG_service3}}@{{.IMAGE_DIGEST_service3}}"
       

        valuesFiles:
          - helm/services-values.yaml
        skipBuildDependencies: true 
  kubeContext: minikube

Steps to reproduce the behavior

  1. Change each of the services to trigger rebuild
  2. Execute scaffold run
  3. Repeat the steps above until skaffold run hangs
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

No branches or pull requests

1 participant