server icon indicating copy to clipboard operation
server copied to clipboard

Fail to fetch PR with `--repo-tag`

Open fgervais opened this issue 2 years ago • 3 comments

Description I'm trying to build with my pending core PR with:

./build.py \
	-v \
	--no-container-build \
	--repo-tag=core:pull/108/head

It fails with:

Cloning into 'repo-core-src'...
fatal: invalid reference: pull/108/head
CMake Error at repo-core-subbuild/repo-core-populate-prefix/tmp/repo-core-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'pull/108/head'

Triton Information

I'm on tag v2.24.0:

Building Triton Inference Server
platform linux
machine x86_64
version 2.24.0
build dir /build/citritonbuild
install dir /tritonserver
cmake dir /build
default repo-tag: r22.07
container version 22.07
upstream container version 22.07
endpoint "http"
endpoint "grpc"
backend "python" at tag/branch "r22.07"
component "common" at tag/branch "r22.07"
component "core" at tag/branch "pull/108/head"
component "backend" at tag/branch "r22.07"
component "thirdparty" at tag/branch "r22.07"

To Reproduce

git clone https://github.com/triton-inference-server/server.git
cd server
./build.py \
	-v \
	--no-container-build \
	--repo-tag=core:pull/108/head

Expected behavior

I expect the build process to fetch my PR as described in https://github.com/triton-inference-server/server/blob/1a34a639ed5b634ce54dab6bea1164ee797bd772/build.py#L349.

fgervais avatar Aug 02 '22 15:08 fgervais

The error is most likely coming from https://github.com/triton-inference-server/server/blob/main/CMakeLists.txt#L105-L109.

The server build uses cmake FetchContent to retrieve dependency repositories. Even though build.py will clone the pull/<pr>/head , when building server, Triton will run into this issue.

@fgervais Have you tried using commit_hash instead?

tanmayv25 avatar Aug 03 '22 00:08 tanmayv25

If I use the hash it also fails although a bit differently.

Building Triton Inference Server
platform linux
machine x86_64
version 2.24.0
build dir /build/citritonbuild
install dir /tritonserver
cmake dir /build
default repo-tag: r22.07
container version 22.07
upstream container version 22.07
endpoint "http"
endpoint "grpc"
backend "python" at tag/branch "r22.07"
component "common" at tag/branch "r22.07"
component "core" at tag/branch "aaee5d229b1a4d38e79313e0af11b80663499a97"
component "backend" at tag/branch "r22.07"
component "thirdparty" at tag/branch "r22.07"
Cloning into 'repo-core-src'...
fatal: reference is not a tree: aaee5d229b1a4d38e79313e0af11b80663499a97
CMake Error at repo-core-subbuild/repo-core-populate-prefix/tmp/repo-core-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'aaee5d229b1a4d38e79313e0af11b80663499a97'

fgervais avatar Aug 03 '22 15:08 fgervais

Interesting... I am marking this as a bug and creating a ticket with the team to investigate.

tanmayv25 avatar Aug 04 '22 22:08 tanmayv25