Skip to content

Fix cloud native job logs not finalizing with Azure

Stan Hu requested to merge sh-fix-live-trace-for-fog-azure into master

Previously the cloud native job log (aka CI live trace) Fog implementation used the put_object and delete_object API calls. These are object-storage specific API calls, and they work for AWS and Google but not for Azure.

Fog has a more general API that works for all providers. We already use this API for backups, and CarrierWave uses this as well. To make job logs work with Azure, we use that general API.

The new implementation is introduced via a feature flag under ci_trace_new_fog_store to ensure a smooth rollout.

Relates to #272853 (closed)

Testing

I used this YAML:

image: alpine:latest

test:
  script:
    - date
    - echo "hello" > test.txt
    - apk add curl
    - curl -o guide.txt http://www.textfiles.com/programming/cguide_3.txt
    - cat guide.txt
  artifacts:
    paths:
      - test.txt

another:
  stage: deploy
  script:
    - echo hello

With consolidated object storage config, I verified that jobs advanced to the next stage immediately, and that Ci::Build.find(<build id).job_artifacts_trace.file.path was actually stored in object storage.

  1. Azure
  2. AWS
  3. Google
Edited by Stan Hu

Merge request reports