[BUG] Latency in downloaded Artifacts between Web interface and API
Hi,
I've got some troubleshoot when I'm downloading artifacts with API call.
I'm using a simple Angular 4 project.
Here's the process for reproducing :
I remove the H1 tag in the body of index.html
:
...
<body>
<h1>Test</h1>
<app-root></app-root>
...
In my .gitlab-ci.yml
in job build_dev
:
### DEV Section ###
build_dev: # BUILD Job (deb pkg, composer, php pkg)
<<: *cache_def
<<: *runner_shell
<<: *artifacts_deploy_def
stage: build
only:
- develop
script:
- echo "build dev"
- sh ${CI_PROJECT_DIR}/ci/develop/build.sh
In the ${CI_PROJECT_DIR}/ci/develop/build.sh
:
docker run --rm --user ${UID} -e UID=${UID} \
-e HOME=/app -v ${CI_PROJECT_DIR}/src:/app \
xxxx.xxxxxx.xxx/node-ng-cli \
npm install
docker run --rm --user ${UID} -e UID=${UID} \
-e HOME=/app -v ${CI_PROJECT_DIR}/src:/app \
xxxx.xxxxxx.xxx/node-ng-cli \
ng build
When the build is success I download the artifacts from the Jobs page :
In the Artifact zip just downloaded no problem :
...
<body>
<app-root></app-root>
...
In the Artifact zip download via API :
curl --header "PRIVATE-TOKEN: xxxxxxxxxxxxxxxxxxxx" "https://gitlab.xxxxxx.xxx/api/v4/projects/560/jobs/artifacts/develop/download?job=build_dev" > test.zip
The line is present :
...
<body>
<h1>test</h1>
<app-root></app-root>
...
I wait some minutes (between 2 and 5min) and recalling the api, all good :
curl --header "PRIVATE-TOKEN: xxxxxxxxxxxxxxxxxxxx" "https://gitlab.xxxxxx.xxx/api/v4/projects/560/jobs/artifacts/develop/download?job=build_dev" > test1.zip
...
<body>
<app-root></app-root>
...
Our gitlab is always up to date :
The official docker image is used :
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Mon Mar 27 17:14:09 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: c6d412e
Built: Mon Mar 27 17:14:09 2017
OS/Arch: linux/amd64
Experimental: false
REPOSITORY TAG IMAGE ID CREATED SIZE
gitlab/gitlab-ce latest d288120f70c0 8 days ago 1.39 GB
What do you think of this bug ?
Thanks.
DR
Edited by David