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

Not valid tokenless upload #1548

Closed
greg0ire opened this issue Aug 17, 2024 · 12 comments
Closed

Not valid tokenless upload #1548

greg0ire opened this issue Aug 17, 2024 · 12 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

@greg0ire
Copy link

greg0ire commented Aug 17, 2024

As asked in #1487 (comment), I'm opening a new ticket.

The failure is still happening for tokenless uploads for doctrine/dbal. What's weird is that I've seen it work on one of my own PRs, made from my fork.

Error message

error - 2024-08-17 09:46:06,912 -- Report creating failed: {"detail":"Not valid tokenless upload"}

Job definition

  upload_coverage:
    name: "Upload coverage to Codecov"
    runs-on: "ubuntu-22.04"
    needs:
      - "phpunit-smoke-check"
      - "phpunit-oci8"
      - "phpunit-pdo-oci"
      - "phpunit-postgres"
      - "phpunit-mariadb"
      - "phpunit-mysql"
      - "phpunit-mssql"
      - "phpunit-ibm-db2"


    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
        with:
          fetch-depth: 2


      - name: "Download coverage files"
        uses: "actions/download-artifact@v4"
        with:
          path: "reports"


      - name: "Display structure of downloaded files"
        run: ls -R
        working-directory: reports


      - name: "Upload to Codecov"
        uses: "codecov/codecov-action@v4"
        with:
          directory: reports
          fail_ci_if_error: true
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Links

@Dreamsorcerer
Copy link

We're seeing this on forks too:

==> Running version v0.7.4
==> Running command '/home/runner/work/_actions/codecov/test-results-action/v1/dist/codecov do-upload'
/home/runner/work/_actions/codecov/test-results-action/v1/dist/codecov do-upload -Z -C 0021aac5623e5797aaa5d42668c6e1cd37005822 --report-type test_results
==> Uploader SHASUM verified (eb902009cb800fdefbce291c1357953f80e29382f43c7a98cce3b57d2b4d8cec codecov)
info - 2024-08-21 06:36:09,917 -- ci service found: github-actions
info - 2024-08-21 06:36:09,947 -- Found 1 test_results files to report
info - 2024-08-21 06:36:09,947 -- > /home/runner/work/aiohttp/aiohttp/junit.xml
info - 2024-08-21 06:36:10,010 -- Process Upload complete
error - 2024-08-21 06:36:10,010 -- Upload failed: {"detail":"Not valid tokenless upload"}
https://github.com/aio-libs/aiohttp/actions/runs/10484741376/job/29039606786?pr=8804

@greg0ire
Copy link
Author

Yeah, sometimes it works, some other times it doesn't. That's why I wrongly thought doctrine/dbal#6501 fixed the issue.

@greg0ire
Copy link
Author

cc @derrabus

@webknjaz
Copy link
Contributor

@Dreamsorcerer the workaround is to have the clear text token in the config.

@ofek
Copy link

ofek commented Sep 18, 2024

I'm getting this when using OIDC, is that expected?

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Nov 5, 2024
@thomasrockhu-codecov
Copy link
Contributor

@greg0ire @Dreamsorcerer @webknjaz @ofek sorry for the delay here. I'm hoping that this has been remedied in v5. Are you all still experiencing this issue?

@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 21, 2024
@greg0ire
Copy link
Author

I would say it is working most of the time now, but I've seen it failed once. That's an improvement though, because before, it was failing most of the time.

@greg0ire
Copy link
Author

greg0ire commented Dec 3, 2024

Seems to be working now 🤞

@greg0ire greg0ire closed this as completed Dec 3, 2024
@Dreamsorcerer
Copy link

Dreamsorcerer commented Dec 18, 2024

@greg0ire @Dreamsorcerer @webknjaz @ofek sorry for the delay here. I'm hoping that this has been remedied in v5. Are you all still experiencing this issue?

Not sure if it's an unrelated issue, but I have a PR from a fork which has used tokenless uploading.
CI says it succeeded and uploaded.
PR has not received codecov comment or pass state.
Codecov website says "Missing Head Commit. Unable to compare commits because the head commit was not found."

aio-libs/aiohttp-session#1047
https://app.codecov.io/gh/aio-libs/aiohttp-session/pull/1047/

@greg0ire
Copy link
Author

It seems really different, I'd file a separate issue.

@Dreamsorcerer
Copy link

Yeah, I got confused by the link which says that it might be caused by failing to upload reports.

Actually, I think the issue is that the previous commit it's trying to compare against on master is a Dependabot commit which didn't upload any reports. It should probably fallback to comparing the latest commit it does have uploads for...

@thomasrockhu-codecov
Copy link
Contributor

@Dreamsorcerer @greg0ire is correct, different issue. As for pulling uploads, I think you're looking for something like carryforward flags

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

5 participants