Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token required - not valid tokenless upload when token is provided #1671

Closed
Cardds opened this issue Nov 19, 2024 · 15 comments
Closed

Token required - not valid tokenless upload when token is provided #1671

Cardds opened this issue Nov 19, 2024 · 15 comments
Assignees
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@Cardds
Copy link

Cardds commented Nov 19, 2024

Upon upgrade to codecov/codecov-action@v5 from codecov/codecov-action@v4, the action begins to fail, citing Token required - not valid tokenless upload.

This appears to occur as a result of the branch that results in message Fork detected, tokenless uploading used.

Relevant workflow snippet:

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v5
        with:
          files: ${{ env.COVERAGE_FILE_NAME }}
          flags: ${{ matrix.test_directory }}
          fail_ci_if_error: true
          token: ${{ secrets.CODECOV_TOKEN }}

GH action logs:

Run codecov/codecov-action@v5
  with:
    files: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    flags: unit
    fail_ci_if_error: true
    token: ***
  
    disable_file_fixes: false
    disable_search: false
    disable_safe_directory: false
    dry_run: false
    git_service: github
    gcov_executable: gcov
    handle_no_reports_found: false
    skip_validation: false
    use_legacy_upload_endpoint: false
    use_oidc: false
    verbose: false
    version: latest
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
Run git config --global --add safe.directory /home/runner/work/emrapi/emrapi
  git config --global --add safe.directory /home/runner/work/emrapi/emrapi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
Run if [ false == 'true' ];
  if [ false == 'true' ];
  then
    # {"count":1984,"value":"***"}
    CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\' -f6)
    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
  else
    if [ -n ***
   ];
    then
      CC_TOKEN=***
  
      echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
    fi
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
/home/runner/work/_temp/1707b567-cb5d-4c55-a48c-bded8ca40a72.sh: line 7: [: missing `]'
/home/runner/work/_temp/1707b567-cb5d-4c55-a48c-bded8ca40a72.sh: line 8: ]: command not found
Run if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
  if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
  then
    echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used"
    TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
    CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
    echo "TOKENLESS=$TOKENLESS" >> "$GITHUB_ENV"
  fi
  
  echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    CC_BRANCH: 
    GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: 
    GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: 
    GITHUB_REPOSITORY: VillageMD/emrapi
==> Fork detected, tokenless uploading used
Run if [ -z "$CC_SHA" ];
  if [ -z "$CC_SHA" ];
  then
    CC_SHA="$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA"
  fi
  if [ -z "$CC_PR" ] && [ "${GITHUB_EVENT_NAME}" == "pull_request_target" ];
  then
    CC_PR="$GITHUB_EVENT_NUMBER"
  fi
  
  echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV"
  echo "CC_PR=$CC_PR" >> "$GITHUB_ENV"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    TOKENLESS: 
    CC_BRANCH: 
    CC_PR: 
    CC_SHA: 
    GITHUB_EVENT_NAME: push
    GITHUB_EVENT_NUMBER: 
    GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: 
Run ${GITHUB_ACTION_PATH}/dist/codecov.sh
  ${GITHUB_ACTION_PATH}/dist/codecov.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    TOKENLESS: 
    CC_BRANCH: 
    CC_SHA: 
    CC_PR: 
    CC_BINARY: 
    CC_BUILD: 
    CC_BUILD_URL: 
    CC_CODE: 
    CC_DIR: 
    CC_DISABLE_FILE_FIXES: false
    CC_DISABLE_SEARCH: false
    CC_DRY_RUN: false
    CC_ENTERPRISE_URL: 
    CC_ENV: 
    CC_EXCLUDES: 
    CC_FAIL_ON_ERROR: true
    CC_FILES: coverage-unit-e4561b105e68283540953b58188f445a168a8585.xml
    CC_FLAGS: unit
    CC_GCOV_ARGS: 
    CC_GCOV_EXECUTABLE: gcov
    CC_GCOV_IGNORE: 
    CC_GCOV_INCLUDE: 
    CC_GIT_SERVICE: github
    CC_HANDLE_NO_REPORTS_FOUND: false
    CC_JOB_CODE: 
    CC_LEGACY: false
    CC_NAME: 
    CC_NETWORK_FILTER: 
    CC_NETWORK_PREFIX: 
    CC_NETWORK_ROOT_FOLDER: 
    CC_OS: 
    CC_PARENT_SHA: 
    CC_PLUGINS: 
    CC_REPORT_TYPE: 
    CC_SKIP_VALIDATION: false
    CC_SLUG: 
    CC_SWIFT_PROJECT: 
    CC_VERBOSE: false
    CC_VERSION: latest
    CC_YML_PATH: 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.0.24
                                  
==> Detected linux
 -> Downloading https://cli.codecov.io/latest/linux/codecov
==> Finishing downloading linux:latest
      Version: v9.0.4
 
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
==> Verifying GPG signature integrity
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
 
gpg: Signature made Fri Nov 15 18:59:14 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
codecov: OK
==> CLI integrity verified

 -> Token of length 0 detected
==> Running create-commit
      ./codecov  create-commit --fail-on-error --git-service github
info - 2024-11-19 13:52:41,549 -- ci service found: github-actions
info - 2024-11-19 13:52:41,769 -- Process Commit creating complete
error - 2024-11-19 13:52:41,770 -- Commit creating failed: {"message":"Token required - not valid tokenless upload"}
==> Failed to create-commit
    Exiting...
Error: Process completed with exit code 1.

This issue also appears to be described in #1645 (comment)

@thomasrockhu-codecov
Copy link
Contributor

@Cardds I pushed out 5.0.3, would you be able to see if that works for you?

@MarcHagen

This comment has been minimized.

@Cardds
Copy link
Author

Cardds commented Nov 19, 2024

@thomasrockhu-codecov No dice, but different error (see below for log output). May need quotes around ${{ inputs.token }} on https://github.com/codecov/codecov-action/blob/v5.0.3/action.yml#L172 .

Run codecov/[email protected]
  with:
    files: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    flags: unit
    fail_ci_if_error: true
    token: ***
  
    disable_file_fixes: false
    disable_search: false
    disable_safe_directory: false
    dry_run: false
    git_service: github
    gcov_executable: gcov
    handle_no_reports_found: false
    skip_validation: false
    use_legacy_upload_endpoint: false
    use_oidc: false
    verbose: false
    version: latest
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
Run git config --global --add safe.directory /home/runner/work/emrapi/emrapi
  git config --global --add safe.directory /home/runner/work/emrapi/emrapi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
Run if [ "false" == 'true' ];
  if [ "false" == 'true' ];
  then
    # {"count":1984,"value":"***"}
    CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io/" | cut -d\" -f6)
    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
  else
    if [ -n ***
   ];
    then
      CC_TOKEN=***
  
      echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
    fi
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
/home/runner/work/_temp/39200f11-324e-4f9e-b99d-a06f5874825b.sh: line 7: [: missing `]'
/home/runner/work/_temp/39200f11-324e-4f9e-b99d-a06f5874825b.sh: line 8: ]: command not found
Run if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ -n "$GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME"] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
  if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ -n "$GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME"] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
  then
    echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used"
    TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
    CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
    echo "TOKENLESS=$TOKENLESS" >> "$GITHUB_ENV"
  fi
  
  echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    CC_BRANCH: 
    GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: 
    GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: 
    GITHUB_REPOSITORY: VillageMD/emrapi
==> Fork detected, tokenless uploading used
Run if [ -z "$CC_SHA" ];
  if [ -z "$CC_SHA" ];
  then
    CC_SHA="$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA"
  fi
  if [ -z "$CC_PR" ] && [ "${GITHUB_EVENT_NAME}" == "pull_request_target" ];
  then
    CC_PR="$GITHUB_EVENT_NUMBER"
  fi
  
  echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV"
  echo "CC_PR=$CC_PR" >> "$GITHUB_ENV"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    TOKENLESS: 
    CC_BRANCH: 
    CC_PR: 
    CC_SHA: 
    GITHUB_EVENT_NAME: push
    GITHUB_EVENT_NUMBER: 
    GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: 
Run ${GITHUB_ACTION_PATH}/dist/codecov.sh
  ${GITHUB_ACTION_PATH}/dist/codecov.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ENV: test
    COVERAGE_FILE_NAME: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    pythonLocation: /opt/hostedtoolcache/Python/3.9.20/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.20/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.20/x64/lib
    TOKENLESS: 
    CC_BRANCH: 
    CC_SHA: 
    CC_PR: 
    CC_BINARY: 
    CC_BUILD: 
    CC_BUILD_URL: 
    CC_CODE: 
    CC_DIR: 
    CC_DISABLE_FILE_FIXES: false
    CC_DISABLE_SEARCH: false
    CC_DRY_RUN: false
    CC_ENTERPRISE_URL: 
    CC_ENV: 
    CC_EXCLUDES: 
    CC_FAIL_ON_ERROR: true
    CC_FILES: coverage-unit-f198527b1d67f1af785ea1984bef06a6061b9e72.xml
    CC_FLAGS: unit
    CC_GCOV_ARGS: 
    CC_GCOV_EXECUTABLE: gcov
    CC_GCOV_IGNORE: 
    CC_GCOV_INCLUDE: 
    CC_GIT_SERVICE: github
    CC_HANDLE_NO_REPORTS_FOUND: false
    CC_JOB_CODE: 
    CC_LEGACY: false
    CC_NAME: 
    CC_NETWORK_FILTER: 
    CC_NETWORK_PREFIX: 
    CC_NETWORK_ROOT_FOLDER: 
    CC_OS: 
    CC_PARENT_SHA: 
    CC_PLUGINS: 
    CC_REPORT_TYPE: 
    CC_SKIP_VALIDATION: false
    CC_SLUG: 
    CC_SWIFT_PROJECT: 
    CC_VERBOSE: false
    CC_VERSION: latest
    CC_YML_PATH: 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.0.24
                                  
==> Detected linux
 -> Downloading https://cli.codecov.io/latest/linux/codecov
==> Finishing downloading linux:latest
      Version: v9.0.4
 
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
==> Verifying GPG signature integrity
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
 
gpg: Signature made Fri Nov 15 18:59:14 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
codecov: OK
==> CLI integrity verified

 -> Token of length 0 detected
==> Running create-commit
      ./codecov  create-commit --fail-on-error --git-service github
info - 2024-11-19 22:12:09,108 -- ci service found: github-actions
info - 2024-11-19 22:12:09,338 -- Process Commit creating complete
error - 2024-11-19 22:12:09,339 -- Commit creating failed: {"message":"Token required - not valid tokenless upload"}
==> Failed to create-commit
    Exiting...
Error: Process completed with exit code 1.

@MarcHagen
Copy link

Mmm spoke to soon, PRs still not passing the CI run with 5.0.3.

Action run in debug
Run codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: (success() && (inputs.disable_safe_directory != 'true'))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'disable_safe_directory'
##[debug]....=> 'false'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (true && ('false' != 'true'))
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Evaluating: format('git config --global --add safe.directory {0}
##[debug]', github.workspace)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'git config --global --add safe.directory {0}
##[debug]'
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'workspace'
##[debug]..=> '/home/runner/_work/something-repo/something-repo'
##[debug]=> 'git config --global --add safe.directory /home/runner/_work/something-repo/something-repo
##[debug]'
##[debug]Result: 'git config --global --add safe.directory /home/runner/_work/something-repo/something-repo
##[debug]'
##[debug]Loading env
Run git config --global --add safe.directory /home/runner/_work/something-repo/something-repo
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/_work/_temp/5b21316b-9295-4c1e-945a-d3dae601b639.sh
##[debug]Finished: run
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Evaluating: format('if [ "{0}" == ''true'' ];
##[debug]then
##[debug]  # {{"count":1984,"value":"***"}}
##[debug]  CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io/" | cut -d\" -f6)
##[debug]  echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]else
##[debug]  if [ -n {1} ];
##[debug]  then
##[debug]    CC_TOKEN={2}
##[debug]    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]  fi
##[debug]fi
##[debug]', inputs.use_oidc, inputs.token, inputs.token)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'if [ "{0}" == ''true'' ];
##[debug]then
##[debug]  # {{"count":1984,"value":"***"}}
##[debug]  CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io/" | cut -d\" -f6)
##[debug]  echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]else
##[debug]  if [ -n {1} ];
##[debug]  then
##[debug]    CC_TOKEN={2}
##[debug]    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]  fi
##[debug]fi
##[debug]'
##[debug]..Evaluating Index:
##[debug]....Evaluating inputs:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'use_oidc'
##[debug]..=> 'false'
##[debug]..Evaluating Index:
##[debug]....Evaluating inputs:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'token'
##[debug]..=> ''
##[debug]..Evaluating Index:
##[debug]....Evaluating inputs:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'token'
##[debug]..=> ''
##[debug]=> 'if [ "false" == ''true'' ];
##[debug]then
##[debug]  # {"count":1984,"value":"***"}
##[debug]  CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io/" | cut -d\" -f6)
##[debug]  echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]else
##[debug]  if [ -n  ];
##[debug]  then
##[debug]    CC_TOKEN=
##[debug]    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]  fi
##[debug]fi
##[debug]'
##[debug]Result: 'if [ "false" == ''true'' ];
##[debug]then
##[debug]  # {"count":1984,"value":"***"}
##[debug]  CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io/" | cut -d\" -f6)
##[debug]  echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]else
##[debug]  if [ -n  ];
##[debug]  then
##[debug]    CC_TOKEN=
##[debug]    echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
##[debug]  fi
##[debug]fi
##[debug]'
##[debug]Loading env
Run if [ "false" == 'true' ];
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/_work/_temp/eea94922-e7a8-4ce8-abcf-6aecbfb2ce6c.sh
##[debug]CC_TOKEN=''
##[debug]Finished: run
##[debug]Evaluating: inputs.override_branch
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'override_branch'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: github.event.pull_request.head.label
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'pull_request'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'head'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'label'
##[debug]=> 'something-org:something-pr-branch'
##[debug]Result: 'something-org:something-pr-branch'
##[debug]Evaluating: github.event.pull_request.repo.full_name
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'pull_request'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'repo'
##[debug]..=> null
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: github.repository
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> 'something-org/something-repo'
##[debug]Result: 'something-org/something-repo'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ -n "$GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME"] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/_work/_temp/0e501b27-4380-46dc-aecc-1624aef8d30f.sh
==> Fork detected, tokenless uploading used
##[debug]TOKENLESS='something-org:something-pr-branch'
##[debug]CC_BRANCH='something-org:something-pr-branch'
##[debug]Finished: run
##[debug]Evaluating: inputs.override_pr
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'override_pr'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.override_commit
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'override_commit'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: github.event_name
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'event_name'
##[debug]=> 'pull_request'
##[debug]Result: 'pull_request'
##[debug]Evaluating: github.event.number
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'event'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'number'
##[debug]=> 636
##[debug]Result: 636
##[debug]Evaluating: github.event.pull_request.head.sha
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'pull_request'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'head'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'sha'
##[debug]=> '18f61dbd54376ef8195d2efb8f2c61f6bb804956'
##[debug]Result: '18f61dbd54376ef8195d2efb8f2c61f6bb804956'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run if [ -z "$CC_SHA" ];
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/_work/_temp/e2adb097-6157-49d3-ac5e-9bba37057e1d.sh
##[debug]CC_SHA='18f61dbd54376ef8195d2efb8f2c61f6bb804956'
##[debug]CC_PR=''
##[debug]Finished: run
##[debug]Evaluating: inputs.binary
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'binary'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.override_build
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'override_build'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.override_build_url
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'override_build_url'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.report_code
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'report_code'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.directory
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'directory'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.disable_file_fixes
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'disable_file_fixes'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.disable_search
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'disable_search'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.dry_run
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'dry_run'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.url
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'url'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.env_vars
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'env_vars'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.exclude
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'exclude'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.fail_ci_if_error
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'fail_ci_if_error'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: inputs.files
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'files'
##[debug]=> 'clover.xml'
##[debug]Result: 'clover.xml'
##[debug]Evaluating: inputs.flags
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'flags'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.gcov_args
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'gcov_args'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.gcov_executable
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'gcov_executable'
##[debug]=> 'gcov'
##[debug]Result: 'gcov'
##[debug]Evaluating: inputs.gcov_ignore
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'gcov_ignore'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.gcov_include
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'gcov_include'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.git_service
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'git_service'
##[debug]=> 'github'
##[debug]Result: 'github'
##[debug]Evaluating: inputs.handle_no_reports_found
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'handle_no_reports_found'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.job_code
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'job_code'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.use_legacy_upload_endpoint
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'use_legacy_upload_endpoint'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.name
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'name'
##[debug]=> 'codecov-8.3'
##[debug]Result: 'codecov-8.3'
##[debug]Evaluating: inputs.network_filter
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'network_filter'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.network_prefix
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'network_prefix'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.root_dir
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'root_dir'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.os
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'os'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.commit_parent
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'commit_parent'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.plugins
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'plugins'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.report_type
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'report_type'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.skip_validation
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'skip_validation'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.slug
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'slug'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.swift_project
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'swift_project'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.verbose
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'verbose'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.version
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'version'
##[debug]=> 'latest'
##[debug]Result: 'latest'
##[debug]Evaluating: inputs.codecov_yml_path
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'codecov_yml_path'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Evaluating: inputs.working-directory
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'working-directory'
##[debug]=> ''
##[debug]Result: ''
##[debug]Loading env
Run ${GITHUB_ACTION_PATH}/dist/codecov.sh
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/_work/_temp/db17e47f-15fa-47c2-8926-b9cf42a64d01.sh
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
                            Wrapper-0.0.24
                                  
==> Detected linux
 -> Downloading https://cli.codecov.io/latest/linux/codecov
==> Finishing downloading linux:latest
      Version: v9.0.4
 
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
==> Verifying GPG signature integrity
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM
 -> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
 
gpg: Signature made Fri Nov 15 18:59:14 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
codecov: OK
==> CLI integrity verified
 -> Token of length 0 detected
==> Running create-commit
      ./codecov  create-commit --fail-on-error --git-service github --sha commit sha
info - 2024-11-19 22:20:09,598 -- ci service found: github-actions
info - 2024-11-19 22:20:09,618 -- The PR is happening in a forked repo. Using tokenless upload.
info - 2024-11-19 22:20:09,921 -- Process Commit creating complete
error - 2024-11-19 22:20:09,922 -- Commit creating failed: {"message":"Token required - not valid tokenless upload"}
==> Failed to create-commit
    Exiting...
Error: Process completed with exit code 1.

@thomasrockhu-codecov
Copy link
Contributor

@Cardds I believe you might have a newline character at the end of your CODECOV_TOKEN, can you double-check that?

@thomasrockhu-codecov
Copy link
Contributor

@MarcHagen are you able to link that CI run by chance?

@thomasrockhu-codecov thomasrockhu-codecov added bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months Area: Report Upload Issues with pre-ingest report uploading labels Nov 19, 2024
@MarcHagen
Copy link

MarcHagen commented Nov 19, 2024

@MarcHagen are you able to link that CI run by chance?

No sorry, private repo in (non-public) organization.

@thomasrockhu-codecov
Copy link
Contributor

@MarcHagen ahhh, tokens are required for all PRs into private repositories.

@MarcHagen
Copy link

MarcHagen commented Nov 19, 2024

@MarcHagen ahhh, tokens are required for all PRs into private repositories.

I know that is why the token is provided with in the action (also for PRs). And it worked perfectly fine until 5.x
referring to my original comment: #1645 (comment)
We also have required upload tokens enabled in the codecov org/team.

OR are you referring to the input token field?
Why is the env var CODECOV_TOKEN not used?

@thomasrockhu-codecov
Copy link
Contributor

@MarcHagen got it! ok, let me check with the product team

@Cardds
Copy link
Author

Cardds commented Nov 20, 2024

@Cardds I believe you might have a newline character at the end of your CODECOV_TOKEN, can you double-check that?

Retested with a newly added secret with the codecov token, and that job proceeded without issue, so that analysis seems spot-on. 👍

I will note that this existing token value that broke with v5 was confirmed to work with both v3 and v4 of the codecov-action. Perhaps this should be called out as a breaking change in the action?

@thomasrockhu-codecov
Copy link
Contributor

thomasrockhu-codecov commented Nov 20, 2024

@Cardds 5.0.4 when it releases (tomorrow) should have a fix that strips out trailing \n chars!

@thomasrockhu-codecov
Copy link
Contributor

@MarcHagen can you try the latest and see if it's working for you?

@Cardds fyi the fix that strips out the newline is in the Action now

@MarcHagen
Copy link

@thomasrockhu-codecov 5.0.6 seems to indeed fix that. No 'fork detected' and uploaded fine. Commit and PR 👍🏻.

@thomasrockhu-codecov
Copy link
Contributor

@MarcHagen phew! ok, closing thie one out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
None yet
Development

No branches or pull requests

3 participants