Artifact upload is failing with error No files to upload

Summary

We are using gitlab-runner 15.7 with this shubhindia/gitlab-runner@ccc03056. Initially we were using 14.8 and everything was working as expected. When we upgraded to 15.7, we started seeing an intermittent issue where artifact-uploader is unable to find the mentioned files to upload. But, when the cleanup happens, those files are present and successfully removed.

Screenshot_2023-01-16_at_3.39.01_PM

Steps to reproduce

This is an intermittent failure, so don't have exact steps to reproduce.

.gitlab-ci.yml
.job_template: &prepare_ci_template
  variables:
    GIT_STRATEGY: fetch
    GIT_DEPTH: 100
    ROOT_TAR_NAME: xyz.tar
    _EXPORTED_SIZE_REPORT_NAME: EXPORTED_TAR_SIZE
  stage: prepare
  before_script:
    - . scripts/begin_stats_monitoring.sh
    - . scripts/fixme.sh
    - echo "FL_VERBOSE -> '${FL_VERBOSE}'"
    - bundle exec fastlane run_danger_pr_validations $FL_VERBOSE
  script:
    - bundle exec fastlane setup_for_ci should_export_source:true $FL_VERBOSE
  after_script:
    - . scripts/report_prepare_stage_stats.sh
  allow_failure: false
  artifacts:
    when: on_success
    paths:
      - ./sha_mapping.yml
      - ./Gemfile
      - ./Gemfile.lock
      - ./Brewfile
      - ./dotfiles
      - ./scripts
      - ./*.tar
      - scripts/*
      - log/*
      - STATS/*
    expire_in: 2 day
  tags:
    - ios-intel-and-m1-compatible

Actual behavior

Artifacts should be uploaded.

What actually happens

gitlab-runner is failing to find the files to upload

Expected behavior

Artifacts uploaded successfully

Environment description

config.toml contents
listen_address = "localhost:9252"
concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "blr-new-runner14.local"
  output_limit = 4096000
  url = "https://removed"
  token = ""
  executor = "shell"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]

Used GitLab Runner version

15.7.0~beta.931.gce05ac57

Possible fixes

Edited by Shubham Gopale