codecov / feedback

A place to discuss feedback about the pull request and web product experience.
36 stars 7 forks source link

"Not a valid tokenless upload" error not relevant #366

Open jsoref opened 6 months ago

jsoref commented 6 months ago

Describe the bug

Some "http server" is yielding HTTP Error 400 with a message of Repository not found. This isn't actionable. Nor is there any content on https://docs.codecov.com/docs/ for this message

debug - 2024-05-07 14:00:41,055 -- Starting create commit process --- {"commit_sha": "a07975eaa2b0aeb8af59538d8f62e91c35d72739", "parent_sha": null, "pr": null, "branch": "my-repo-is-not-a-fork", "slug": "check-spelling-sandbox/eslint-plugin-jest", "token": "e******************", "service": "github", "enterprise_url": null}
info - 2024-05-07 14:00:41,270 -- Process Commit creating complete
debug - 2024-05-07 14:00:41,271 -- Commit creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 400', params={}, description='[\"Repository not found\"]'), warnings=[], status_code=400, text='[\"Repository not found\"]')"}
error - 2024-05-07 14:00:41,271 -- Commit creating failed: ["Repository not found"]

Environment (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Create fork https://github.com/check-spelling-sandbox/eslint-plugin-jest/
  2. Add commits to https://github.com/check-spelling-sandbox/eslint-plugin-jest/tree/my-repo-is-not-a-fork up to https://github.com/check-spelling-sandbox/eslint-plugin-jest/commit/a07975eaa2b0aeb8af59538d8f62e91c35d72739
  3. Wait for the workflow to fail
  4. Visit a failed job, e.g. https://github.com/check-spelling-sandbox/eslint-plugin-jest/actions/runs/8986717338/job/24683540548
  5. See error

Expected behavior Clear error messages explaining what was done, what was seen, and why that results in a specific error.

Screenshots

log ```sh 2024-05-07T14:00:39.6055923Z ##[group]Run check-spelling-sandbox/codecov-action@my-repo-is-not-a-fork 2024-05-07T14:00:39.6056646Z with: 2024-05-07T14:00:39.6056984Z fail_ci_if_error: true 2024-05-07T14:00:39.6057555Z use_oidc: true 2024-05-07T14:00:39.6057915Z verbose: true 2024-05-07T14:00:39.6058259Z ##[endgroup] 2024-05-07T14:00:39.7598791Z ==> Got an OIDC token 2024-05-07T14:00:39.7730797Z ==> Got an OIDC token 2024-05-07T14:00:39.7987949Z ==> Got an OIDC token 2024-05-07T14:00:39.7990671Z ==> linux OS detected 2024-05-07T14:00:40.1397725Z https://cli.codecov.io/latest/linux/codecov.SHA256SUM 2024-05-07T14:00:40.2276064Z Received SHA256SUM e70beb7c9e3d894678e7d4d0fcb94e59133212dbda5ca7406b625a0167ce4ca8 codecov 2024-05-07T14:00:40.3069008Z Received SHA256SUM signature -----BEGIN PGP SIGNATURE----- 2024-05-07T14:00:40.3069621Z 2024-05-07T14:00:40.3070178Z iQIzBAABCgAdFiEEJwNOf9uFDgu8LGL/gGuyiu13mGkFAmYhSq4ACgkQgGuyiu13 2024-05-07T14:00:40.3071073Z mGkULA/8Dq6mYMCj4DxoHtfQeiQ3FZ/8HrgQmwUICQa5QHatbojQLmsYkruvvWWl 2024-05-07T14:00:40.3071851Z +Q7PywoiEWkFQ6nI1Wb4sTLWAMwdjjCKSECqTs9jlqXklKDKyb1Fv5O0ytwFEe/a 2024-05-07T14:00:40.3072598Z Wc4V4CKvH3LFHWB/ZsFMmjBBLQ3evQqz5rfk+Bih5uV/RtcNoLnWstaIqyeISyb4 2024-05-07T14:00:40.3073364Z NdgLWy9uapyeHfoPoZ6HEdrNhy4LvMrlCbgjwjFLZ445fE0Neq4n3QOlDKZ+RviO 2024-05-07T14:00:40.3074124Z FU/zYlZkWyHxrDavBEotbSWRCNB/ptyTc9uuQXEtemrJKoJYNRAIBx7N60uEEpCO 2024-05-07T14:00:40.3074889Z oDzALNV404Tw7WiULHyUhuxeN4EDiu2mCoa1KiMjFHjOayY6lREtsvt94ubGmAJ1 2024-05-07T14:00:40.3075656Z y29LiEvYIxEzd7nJcC8PzxbZk6AUv3IXA8o9m47KCVqKFMCFCTgc8fEWlrIfRtLN 2024-05-07T14:00:40.3076423Z HupcoOOuV7SWHXfg5vOf0vclnTpw3MVcrj+Z7dMA5OSpqcTlL8ACb9QPsKpAesUR 2024-05-07T14:00:40.3077235Z tth7zorPoU/RHfgEgKNPmKX9vvqB+AZ2n2oCPhlYOBP6/9NFjoIvIfWZPD9FSce7 2024-05-07T14:00:40.3077952Z K4FOEyaBEyypUMXtjPVj8MtoOaLk/X9g03ZKAlDxbnBIqqp0YLbqMW+nZkG8TTKI 2024-05-07T14:00:40.3078578Z e4d6XX447TyQ2750658NX+9Z/0c/oK+jsNCG2uocOkIL3kOHtAw= 2024-05-07T14:00:40.3078999Z =QUC9 2024-05-07T14:00:40.3079320Z -----END PGP SIGNATURE----- 2024-05-07T14:00:40.3079530Z 2024-05-07T14:00:40.3128345Z ==> Running version latest 2024-05-07T14:00:40.3410620Z gpg: directory '/home/runner/.gnupg' created 2024-05-07T14:00:40.3411621Z gpg: keybox '/home/runner/.gnupg/pubring.kbx' created 2024-05-07T14:00:40.3412554Z gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created 2024-05-07T14:00:40.3413993Z gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) " imported 2024-05-07T14:00:40.3414780Z gpg: Total number processed: 1 2024-05-07T14:00:40.3415146Z gpg: imported: 1 2024-05-07T14:00:40.3415362Z 2024-05-07T14:00:40.3473421Z gpg: Signature made Thu Apr 18 16:30:38 2024 UTC 2024-05-07T14:00:40.3474464Z gpg: using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869 2024-05-07T14:00:40.3476090Z gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) " [unknown] 2024-05-07T14:00:40.3477619Z gpg: WARNING: This key is not certified with a trusted signature! 2024-05-07T14:00:40.3478865Z gpg: There is no indication that the signature belongs to the owner. 2024-05-07T14:00:40.3480150Z Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869 2024-05-07T14:00:40.3480853Z 2024-05-07T14:00:40.3699709Z ==> Running version v0.5.2 2024-05-07T14:00:40.3703469Z ==> Running git config --global --add safe.directory /home/runner/work/eslint-plugin-jest/eslint-plugin-jest 2024-05-07T14:00:40.3748982Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/eslint-plugin-jest/eslint-plugin-jest 2024-05-07T14:00:40.3803541Z ==> Running command '/home/runner/work/_actions/check-spelling-sandbox/codecov-action/my-repo-is-not-a-fork/dist/codecov -v create-commit' 2024-05-07T14:00:40.3806100Z [command]/home/runner/work/_actions/check-spelling-sandbox/codecov-action/my-repo-is-not-a-fork/dist/codecov -v create-commit --git-service github -Z 2024-05-07T14:00:40.4164004Z ==> Uploader SHASUM verified (e70beb7c9e3d894678e7d4d0fcb94e59133212dbda5ca7406b625a0167ce4ca8 codecov) 2024-05-07T14:00:41.0462995Z info - 2024-05-07 14:00:41,045 -- ci service found: github-actions 2024-05-07T14:00:41.0490081Z debug - 2024-05-07 14:00:41,048 -- versioning system found: 2024-05-07T14:00:41.0516911Z debug - 2024-05-07 14:00:41,051 -- versioning system found: 2024-05-07T14:00:41.0544043Z debug - 2024-05-07 14:00:41,054 -- Loading config from /home/runner/work/eslint-plugin-jest/eslint-plugin-jest/.codecov.yml 2024-05-07T14:00:41.0560566Z debug - 2024-05-07 14:00:41,055 -- Starting create commit process --- {"commit_sha": "a07975eaa2b0aeb8af59538d8f62e91c35d72739", "parent_sha": null, "pr": null, "branch": "my-repo-is-not-a-fork", "slug": "check-spelling-sandbox/eslint-plugin-jest", "token": "e******************", "service": "github", "enterprise_url": null} 2024-05-07T14:00:41.2716073Z info - 2024-05-07 14:00:41,270 -- Process Commit creating complete 2024-05-07T14:00:41.2719015Z debug - 2024-05-07 14:00:41,271 -- Commit creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 400', params={}, description='[\"Repository not found\"]'), warnings=[], status_code=400, text='[\"Repository not found\"]')"} 2024-05-07T14:00:41.2721514Z error - 2024-05-07 14:00:41,271 -- Commit creating failed: ["Repository not found"] 2024-05-07T14:00:41.3383207Z ##[error]Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/check-spelling-sandbox/codecov-action/my-repo-is-not-a-fork/dist/codecov' failed with exit code 1 ```

Additional context

jsoref commented 6 months ago

Personally, I'm half guessing codecov made a call to https://api.github.com/ -- I'd really like to know what api call it made (and at least what identity it used -- I obviously don't want the credentials...)

As an end user, from my perspective, the repository is public

So, Repository not found is misleading/confusing -- what wasn't found?

drazisil-codecov commented 6 months ago

Hi @jsoref ,

We just merged a fix for the OIDC, can you please try again?

jsoref commented 6 months ago

@drazisil-codecov: to which repository? (Do I need to update my fork of the codecov-action repository?)

drazisil-codecov commented 6 months ago

Hi @jsoref

I believe it was to API so no updates should be needed on your side. I'm confirming with the engineer.

jsoref commented 6 months ago

@drazisil-codecov here's a new (failed) run from the same commit: https://github.com/check-spelling-sandbox/eslint-plugin-jest/actions/runs/8986717338/job/24776595047

drazisil-codecov commented 6 months ago

I have passed the details back to the engineer.

thomasrockhu-codecov commented 6 months ago

@jsoref it's me again, I think I have found the root cause here, thanks for being patient. We'll work on a fix.

jsoref commented 6 months ago

@thomasrockhu-codecov: I appreciate fixing the underlying error, but it'd really be nice if the error message itself were improved.

Anyway, @ me when you want me to try again. I'm usually fairly responsive 🙂 .

thomasrockhu-codecov commented 6 months ago

@jsoref yeah, I guess the problem is more that you should not have seen that error message to begin with. Definitely a bug on our side

jsoref commented 5 months ago

Fwiw, here's a round where the codecov-action is now configured to self-test using oidc: https://github.com/check-spelling-sandbox/codecov-action/actions/runs/9116103249/job/25063948144

on the bright side, it fails pretty fast.

thomasrockhu-codecov commented 4 months ago

@jsoref I believe we made a fix for this, are you still seeing Repository not found?

jsoref commented 4 months ago

I'm not seeing that error.

https://github.com/check-spelling-sandbox/eslint-plugin-jest/actions/runs/9715692458/job/26817680471 has Not valid tokenless upload -- that error message is grammatically poor, it should be Not a valid tokenless upload. I think the error is wrong as I think the workflow should be configured to use oidc...

thomasrockhu-codecov commented 3 months ago

@jsoref ok, I think we pushed a fix for that, do you mind re-running CI?

jsoref commented 3 months ago

I don't see a change? https://github.com/check-spelling-sandbox/eslint-plugin-jest/actions/runs/9715692458