Dotenv upload fails but succeeds on retry on identical files

Edit: after more trials it seem the following only happens when the job is triggered with variables added from the web UI.
See related issue here "when: manual" job retry and variables

Being having this issue with uploading dotenv files on this particular job
I have other in the same pipeline working everytime but this fails consistently the first time
I thought it was due to the vaules in the file but the same exact file fails and then is uploaded on retry without changes.
Any way to debug this?

Run #1:


  stage: promote
  image: alpine:latest
    - apk add hexdump
    - echo "PROMOTE=yes" > promote.env
    - echo "RELEASE_VERSION=2.0.0" >> promote.env
    - cat promote.env
    - hexdump promote.env
      dotenv: promote.env
  when: manual
    - master
    - web
  allow_failure: false