codecov / codecov-action

GitHub Action that uploads coverage to Codecov :open_umbrella:
https://www.codecov.io
MIT License
1.5k stars 211 forks source link

v5 Error: Got unexpected extra argument #1659

Closed MetRonnie closed 1 week ago

MetRonnie commented 2 weeks ago

v5 of the action does not appear to quote the workflow name when calling ./codecov do-upload so fails if there are spaces in the workflow name: https://github.com/cylc/cylc-flow/actions/runs/11853961703/job/33053084597?pr=6479#step:4:182

MetRonnie commented 2 weeks ago

Tagging @codecov/report-upload as mentioned in https://github.com/codecov/codecov-action/issues/1645

thomasrockhu-codecov commented 2 weeks ago

On it @MetRonnie, thanks for the catch

hugovk commented 2 weeks ago

Similarly: https://github.com/hugovk/pepotron/actions/runs/11860034700/job/33054377932?pr=65#step:8:230

Error: Got unexpected extra arguments (Python 3.10)

Called like:

      - name: Upload coverage
        uses: codecov/codecov-action@v5
        with:
          flags: ${{ matrix.os }}
          name: ${{ matrix.os }} Python ${{ matrix.python-version }}
njzjz commented 2 weeks ago

For me, I got this error with my OIDC token (which is hidden by the GitHub):

 -> Token of length 1909 detected
==> Running create-commit
      ./codecov  create-commit -t <redacted> --git-service github --sha 7e5912295d0e5036241178cbc769db454d2df1b0
info - 2024-11-15 19:22:45,290 -- ci service found: github-actions
warning - 2024-11-15 19:22:45,299 -- No config file could be found. Ignoring config.
Usage: codecov create-commit [OPTIONS]
Try 'codecov create-commit -h' for help.

Error: Got unexpected extra argument (value:***
==> Failed to create-commit
iliapolo commented 2 weeks ago

We are seeing the same behavior as https://github.com/codecov/codecov-action/issues/1659#issuecomment-2479864718. The workflow name does not contain spaces.

See https://github.com/cdklabs/cdk-from-cfn/actions/runs/11908452810/job/33184203992?pr=747

thomasrockhu-codecov commented 2 weeks ago

@njzjz @iliapolo 5.0.3 has a fix for the OIDC issue

thomasrockhu-codecov commented 2 weeks ago

@MetRonnie @hugovk still working on this issue

thomasrockhu-codecov commented 2 weeks ago

@MetRonnie @hugovk would you be able to try the latest v5 5.0.4?

hugovk commented 1 week ago

Thanks, I no longer get the error: https://github.com/hugovk/pepotron/actions/runs/11860034700/job/33247555679?pr=65

info - 2024-11-20 08:08:40,088 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/hugovk/pepotron/commit/7ef0abf15fcb8600f034f21ba8cbe3a07b452baf
info - 2024-11-20 08:08:40,422 -- Process Upload complete
MetRonnie commented 1 week ago

Working for us now 👍

thomasrockhu-codecov commented 1 week ago

Awesome, going to close out