devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Kaniko build displaying the same output log

Open alexissellier opened this issue 1 year ago • 2 comments

What happened?
When using kaniko to build two different images, the build never seems to end and the output logs are the same for both (displaying the log of the first image)

What did you expect to happen instead?
Build finishes successfully and I have access to the correct log

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

Run devspace build with the following devpsace.yaml file

My devspace.yaml:

version: v2beta1
name: devenv
images:
  web:
    image: distribution.domain/test/web:${DEVSPACE_GIT_COMMIT}
    dockerfile: dev.Dockerfile
    target: web-dev
    buildArgs:
       PHP_IMAGE_BASE: stable
    kaniko:
      pullSecret: github-registry
 assets:
    image: distribution.domain/test/assets:${DEVSPACE_GIT_COMMIT}
    dockerfile: dev.Dockerfile
    target: assets-dev
    kaniko:
      pullSecret: github-registry

Local Environment:

  • DevSpace Version: 6.0.0-beta.8
  • Operating System: Linux
  • ARCH of the OS: amd64 Kubernetes Cluster:
  • Cloud Provider: google
  • Kubernetes Version: 1.24.1

Anything else we need to know?

/kind bug

alexissellier avatar Aug 08 '22 09:08 alexissellier

@alexissellier thanks for reporting this issue! We'll investigate this and fix this ASAP if we have found the problem!

FabianKramm avatar Aug 08 '22 22:08 FabianKramm

@alexissellier Please attach logs from the window where you fire devspace build command. When you fire devspace build, pods are created, could you please share the status of the pods and if you could also describe them, it would be easier for us to debug.

I tried with above yaml with some obvious changes like docker-file name, image prefix. I also created dummy github-registry secret but that didnt lead me anywhere.

tukobadnyanoba avatar Aug 09 '22 12:08 tukobadnyanoba

In fact I have the same problem output problem without kaniko. Here is the head of the logs

info Using namespace 'devspace'
info Using kube context '*******'
build:assets Ensuring image pull secret for registry: distribution...
build:assets Rebuild image distribution/test/assets because image config has changed
build:assets Building image 'distribution/test/assets:7bebe725' with engine 'docker'
build:assets Authenticating (distribution)...
build:web Ensuring image pull secret for registry: distribution...
build:assets Authentication successful (distribution)
build:web Building image 'distribution/test/web:7bebe725' with engine 'docker'
build:web Authenticating (distribution)...
build:web Authentication successful (distribution)
Sending build context to Docker daemon  132.3MBemon  557.1kB
build:assets Step 1/34 : ARG PHP_IMAGE_BASE=stable
build:assets Step 2/34 : FROM ghcr.io/company/docker-images/php8-dev:${PHP_IMAGE_BASE} as web-dev
build:assets  ---> c1e196df76df
build:assets Step 3/34 : WORKDIR /var/www
build:assets  ---> Using cache
build:assets  ---> e84e720015fe
build:assets Step 4/34 : COPY . /var/www
Sending build context to Docker daemon  132.3MBn  557.1kB
build:web Step 1/6 : ARG PHP_IMAGE_BASE=stable
build:web Step 2/6 : FROM ghcr.io/company/docker-images/php8-dev:${PHP_IMAGE_BASE} as web-dev
build:web  ---> c1e196df76df
build:web Step 3/6 : WORKDIR /var/www
build:web  ---> Using cache
build:web  ---> e84e720015fe
build:web Step 4/6 : COPY . /var/www
build:assets  ---> Using cache
build:assets  ---> 9646893a686b
build:assets Step 5/34 : RUN composer install
build:assets  ---> Using cache
build:assets  ---> 28461afd3a9a
build:assets Step 6/34 : RUN chown -R www-data:www-data storage
build:assets  ---> Using cache
build:assets  ---> d3655c84c5a0
build:assets Step 7/34 : FROM ghcr.io/company/docker-images/php8-dev:${PHP_IMAGE_BASE} as bo-dev
build:assets  ---> c1e196df76df
build:assets Step 8/34 : WORKDIR /var/www
build:assets  ---> Using cache
build:assets  ---> e84e720015fe
build:assets Step 9/34 : COPY . /var/www

alexissellier avatar Aug 10 '22 16:08 alexissellier

@alexissellier I tried reproducing the issue, it didn't get reproduced. kaniko and docker worked as well. Could you please fire devspace purge if possible?

mahendrabagul avatar Sep 07 '22 09:09 mahendrabagul

Closing issue

alexissellier avatar Sep 14 '22 17:09 alexissellier