kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

Duplicate path in link when downloading context from AzureBlob

Open arxsab opened this issue 7 months ago • 2 comments

Actual behavior

Duplicate path in link when downloading context from AzureBlob

context - https://myaccount.blob.core.windows.net/container/path/to/context.tar.gz

The link from which Kaniko is trying to download the context - https://myaccount.blob.core.windows.net/container/path/to/context.tar.gz/container/path/to/context.tar.gz

last correct working version of Kaniko 1.19.2...

DEBU[0000] Getting source context from 
https://myaccount.blob.core.windows.net/container/path/to/context.tar.gz
DEBU[0000] BaseDir /kaniko/buildcontext for file /kaniko/buildcontext/context.tar.gz does not exist. Creating.
Error: error resolving source context: HEAD https://myaccount.blob.core.windows.net/container/path/to/context.tar.gz/container/path/to/context.tar.gz
--------------------------------------------------------------------------------
RESPONSE 404: 404 The specified blob does not exist.
ERROR CODE: BlobNotFound
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------

Expected behavior

Correct path in a download link

To Reproduce Steps to reproduce the behavior:

  1. Use cr.io/kaniko-project/executor:v1.20.0 and higher with context from AzureBlob

Additional Information

  • Dockerfile Please provide either the Dockerfile you're trying to build or one that can reproduce this error.

    FROM myacr.azurecr.io/app:dev
    COPY . /tmp/app
    ENV APPLICATION_SOURCE_BASE_PATH=/tmp/app
    
  • Build Context Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)

     COPY . /tmp/app - all files on my context.tar.gz
    
  • Kaniko Image (fully qualified with digest)

    Digest: sha256:9e69fd4330ec887829c780f5126dd80edc663df6def362cd22e79bcdf00ac53f
    gcr.io/kaniko-project/executor:v1.23.2
    
Description Yes/No
Please check if this a new feature you are proposing
  • - [no]
Please check if the build works in docker but not in kaniko
  • - [yes]
Please check if this error is seen when you use --cache flag
  • - [yes]
Please check if your dockerfile is a multistage dockerfile
  • - [no]

arxsab avatar May 13 '25 09:05 arxsab

I've the same issue with kaniko 1.23.2 and only work with version 1.19.2 On the 1.20.0 they have the changelogs related with azure blob chore(deps): replace github.com/Azure/azure-storage-blob-go => github.com/Azure/azure-sdk-for-go/sdk/storage/azblob #2945

buoi5roi8 avatar May 15 '25 08:05 buoi5roi8

Issue is persisting in version 1.24.0, this PR might fix it #3387

Asmember avatar Jun 03 '25 11:06 Asmember