Azure / Azure/acr-builder

Acr Tasks fails to download source tarball from Github

Open
#671 1 comment 0 reactions 1 assignee Claimed by @yuehaoliang View on GitHub
bug
Dominant language
Go
Stars
41
Forks
45
Avg merge
6h 52m
Merged PRs (30d)
5

Description

**Describe the bug**
ACR Tasks should support using a tarball from a remote webserver, but there is an edge case if the remote server is GitHub. The Tasks service interprets the context as a GitHub repository instead of a tarball.

**To Reproduce**
Steps to reproduce the behavior:
```
az acr task create -t nvidia/k8s-device-plugin:{{.Run.ID}} -n $MyTask -r $MyRegistry -g $MyResourceGroup -c https://github.com/NVIDIA/k8s-device-plugin/archive/refs/tags/v0.14.3.tar.gz -f deployments/container/Dockerfile.ubuntu --arg GOLANG_VERSION=1.20.5
```

**Expected behavior**
Successfully find, download, and extract the tarball.

**Additional context**
In the backend code, BaseBuildScheduler.BuildSourceLocationUrl() simply checks whether the URL authority contains `Github`. If it does, it appends `.git` to the URL, and ACB will handle the URL as a GitSourceControlURL. A potential fix could involve additionally checking whether the URL is a tarball.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.