Skip to content

Pipeline with artifact, an error occurs during upload, responseStatus=400 Bad Request

Summary

gitlab/gitlab is installed successfully by helm , but when I run pipeline with artifact, an error occurs.

Uploading artifacts...
dist/: found 380 matching files                    
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
WARNING: Retrying...                                error=invalid argument
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
WARNING: Retrying...                                error=invalid argument
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
FATAL: invalid argument                            
ERROR: Job failed: command terminated with exit code 1

Steps to reproduce

See configuration, which will render this when used with 2.4.0/2.4.1

Configuration used

values.yaml

global:
  hosts:
    domain: banajava.com
    hostSuffix: gitlab
    https: true
    gitlab:
      name: gitlab.banajava.com
      https: true
  ingress:
    class: 'nginx-prod'
  shell:
    port: 30022
certmanager-issuer:
  email: liuwenjiegod@163.com
prometheus:
  install: false
gitlab-runner:
  enalbe: true
  runners:
    privileged: true
  #install: false
nginx-ingress:
  enabled: false
postgresql:
  persistence:
    storageClass: alicloud-nas
    size: 8Gi
minio:
  persistence:
    storageClass: alicloud-nas
    size: 10Gi
  resources:
    requests:
      memory: 64Mi
      cpu: 10m
redis:
  replicas: 1
  persistence:
    storageClass: alicloud-nas
    size: 5Gi
  resources:
    requests:
      cpu: 10m
      memory: 64Mi
gitlab:
  gitaly:
    persistence:
      storageClass: alicloud-nas
      size: 50Gi
  unicorn:
    minReplicas: 1
    resources:
      limits:
       cpu: 500m
       memory: 1.5G
      requests:
        cpu: 100m
        memory: 500M
    workhorse:
      resources:
        limits:
          cpu: 500m
          memory: 100M
        requests:
          cpu: 10m
          memory: 10M
  sidekiq:
    minReplicas: 1
    resources:
      limits:
        memory: 1G
      requests:
        cpu: 50m
        memory: 625M
  gitlab-shell:
    minReplicas: 1
    #service:
      #type: NodePort
      #nodePort: 32022
      #internalPort: 32021
      #externalPort: 32022
  task-runner:
    enabled: false
registry:
  hpa:
    minReplicas: 1
certmanager:
  resources:
    requests:
      cpu: 10m
      memory: 32Mi

gitlab-ci.yaml

master-build:
  image: node:10-jessie
  stage: build
  only:
    - master
  script:
    - ls -a
    - pwd
    - npm config set registry=http://npm.banajava.com/repository/npm-group/
    - npm install
    - npm run build:prod
  artifacts:
    # untracked: true
    expire_in: 1h
    paths:
      - dist/
master-deploy:
  image: docker:latest
  services:
    - name: docker:18.09-dind
      command: ["--insecure-registry=registry.banajava.com:5000","--registry-mirrors=https://3dk6dre4.mirror.aliyuncs.com"]
  variables:
    DOCKER_HOST: tcp://localhost:2375
  stage: deploy
  dependencies:
    - master-build
  only:
    - master
  script:
    - ls -a
    - pwd
    - docker version
    - docker build -f Dockerfile -t registry.banajava.com:5000/wdt-template-admin:1.0.0 .
    - docker push registry.banajava.com:5000/wdt-template-admin:1.0.0

Current behavior

Uploading artifacts...
dist/: found 380 matching files                    
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
WARNING: Retrying...                                error=invalid argument
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
WARNING: Retrying...                                error=invalid argument
WARNING: Uploading artifacts to coordinator... failed  id=5 responseStatus=400 Bad Request status=400 Bad Request token=p95NzZA1
FATAL: invalid argument                            
ERROR: Job failed: command terminated with exit code 1

Expected behavior

Uploading artifacts success!!!

Versions

  • Chart: 2.4.1
  • Platform:
    • Cloud: (Aliyun ECS)
    • Self-hosted: ( ?)
  • Kubernetes: (kubectl version)
    • Client: Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
    • Server:Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
  • Helm: (helm version)
    • Client:&version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
    • Server:&version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

Relevant logs

logs in minio

==> /var/log/gitlab/api_json.log <==
{"time":"2019-10-24T10:33:45.801Z","severity":"INFO","duration":13.58,"db":6.42,"view":7.16,"status":400,"method":"POST","path":"/api/v4/jobs/13/artifacts","params":[{"key":"artifact_format","value":"zip"},{"key":"artifact_type","value":"archive"},{"key":"expire_in","value":"1h"},{"key":"file.sha512","value":"1dc38faf468f9187ac0977f44a1ff8a22d69b64672fb5465ddc6f9cccbdabcc34e8bbea96483799410d6a765bb027bf13d9208f8bfd24f990d59ce26ddb13201"},{"key":"file.name","value":"artifacts.zip"},{"key":"file.remote_url","value":"http://gitlab-bana-minio-svc:9000/gitlab-artifacts/tmp/uploads/1571913225-70-0002-9353-0bb9cf1cb41c65476be23323b8a7c54d?X-Amz-Expires=15300&X-Amz-Date=20191024T103345Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ZJWQq1f9V6ktZd9FxpNBG1L9mdhAxsGQJanVPY6pznpy1ywmgT4bYkoAhk5ipnfz%2F20191024%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9cee8cb7076434a1a5147d9609888225f34145c9301a6cf4d8ec392e72b498c3"},{"key":"file.remote_id","value":"1571913225-70-0002-9353-0bb9cf1cb41c65476be23323b8a7c54d"},{"key":"file.size","value":"4561988"},{"key":"file.md5","value":"81af38e9af9154a49472d7070bb19f36"},{"key":"file.sha1","value":"3486cd1b2e2423d75fa8f9621acc3877116dc3d4"},{"key":"file.sha256","value":"ac59af948bfecfa4649d81816f05d96d4e4d5c68f9610143622575b29062fe43"},{"key":"file.etag","value":"a4eabdb4ccdb46cf85e0b58507eabb7b-1"},{"key":"metadata.name","value":"metadata.gz"},{"key":"metadata.path","value":"/tmp/metadata.gz955303703"},{"key":"metadata.size","value":"7933"},{"key":"metadata.sha1","value":"79717dba28cbe6da833bfaf88ad26f199f20ff32"},{"key":"metadata.sha256","value":"6401d520d0b73d091bcc1acbc868a2716e90a2c3dc832ff33d80bb2f47040388"},{"key":"metadata.sha512","value":"53358e051af18f7a755926c612bffce30f1922044770ef0c4898bce744f0ae3db06e2e546c86d1c4123140f0b7a23d10faf63d7171d1664aaf19f0489415e6a4"},{"key":"metadata.md5","value":"a792eff68c743449a58fed080bc5289d"}],"host":"gitlab.banajava.com","remote_ip":"47.105.188.143, 47.105.188.143","ua":"gitlab-runner 12.4.0 (12-4-stable; go1.10.8; linux/amd64)","route":"/api/:version/jobs/:id/artifacts","queue_duration":9.31,"correlation_id":"Bl0XVdBb7Q7"}
Edited by Jason Plum