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

[Self-hosted] Missing Base Commit error #601

Open
nikosatwork opened this issue Dec 9, 2024 · 6 comments
Open

[Self-hosted] Missing Base Commit error #601

nikosatwork opened this issue Dec 9, 2024 · 6 comments

Comments

@nikosatwork
Copy link

nikosatwork commented Dec 9, 2024

Describe the bug
On a bigger repository with an upload size of about 240mb, approximately 80% of the time we get a Missing Base Commit error. This prevents the carryforward flags to process too.

Note: This is a branch that only has 'Merge' GitHub commits, and the report is generated and uploaded to Codecov from these commits. No Pull Request information is captured. Only interested in changes on that main branch.

At the time of the upload, there could be a new tip on the branch, which hasn't got a report uploaded to Codecov

i.e.

  • Branch: main
  • SHA on tip: 7cf17ae7ef70fc6c8bc9c8a4337a26cfa631dda3
  • Reports uploaded to main:
    • codecov.exe upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github_enterprise --file report1.xml -t *** --branch main --sha 7cf17ae7ef70fc6c8bc9c8a4337a26cfa631dda3 --name "report1" --flag Report1
    • codecov.exe upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github_enterprise --file report2.xml -t *** --branch main --sha 7cf17ae7ef70fc6c8bc9c8a4337a26cfa631dda3 --name "report2" --flag Report2
  • New SHA on tip: e18014d72d1e341ec2310cd132622d323f977ed2
  • Reports uploaded to main:
    • codecov.exe upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github_enterprise --file report1.xml -t *** --branch main --sha e18014d72d1e341ec2310cd132622d323f977ed2 --name "report1" --flag Report1
    • codecov.exe upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github_enterprise --file report2.xml -t *** --branch main --sha e18014d72d1e341ec2310cd132622d323f977ed2 --name "report2" --flag Report2

Note: There are other SHAs in between those two, or even a new tip, but the uploads to Codecov only happen on specific intervals i.e. nightly. But chronologically, there will always be an older SHA in Codecov to compare against as the "base commit".

Environment (please complete the following information):

  • Browser: All
  • System: CI, GitHub
  • Codecov version: 24.10.1, 24.11.1, 24.12.2, 25.1.16
  • CLI version: 0.8.0, 9.1.0

To Reproduce
Steps to reproduce the behavior:

  1. Upload report
  2. Go to Commits page for the commit
  3. 'Coverage reports history' panel shows the report to have been uploaded successfuly
  4. It also shows 'Missing Base Commit' error
  5. No carryforward flags have been processed

Expected behavior
No 'Missing Base Commit' error shown and carryforward flags are processed as expected, since there is a Codecov entry for an older SHA to compare to

Screenshots
Image

Additional context

codecov.yml used:

codecov:
  branch: main
  max_report_age: false
  require_ci_to_pass: false
  notify:
    wait_for_ci: false
  # Workaround to try to fix "Missing Base Commit" issue
  allow_coverage_offsets: true

coverage:
  precision: 2
  round: down
  range: "50...70"
  status:
    project: false
    patch: false
    default_rules:
      flag_coverage_not_uploaded_behavior: exclude

comment: false

flag_management:
  default_rules:
    carryforward: true

The branch context is the main branch. Base is the main branch too.

@covecod covecod bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Dec 9, 2024
@nikosatwork
Copy link
Author

cc @drazisil-codecov 🙏

@nikosatwork
Copy link
Author

Sentry error that seems related perhaps:

Can't find default app ID in the YAML. Assuming installation is configured to prevent the app from breaking itself.

I've attached the json log below:

default_app_ID_error.json

@nikosatwork
Copy link
Author

nikosatwork commented Dec 13, 2024

Also note that commits in the branch are all 'Merge' commits

allow_coverage_offsets: true did not help

@nikosatwork nikosatwork changed the title [Self-hosted] Missing Base Commit error [Self-hosted] Missing Base Commit error - Squash and merge commits Dec 18, 2024
@nikosatwork nikosatwork changed the title [Self-hosted] Missing Base Commit error - Squash and merge commits [Self-hosted] Missing Base Commit error Dec 20, 2024
@nikosatwork
Copy link
Author

nikosatwork commented Dec 20, 2024

Note: There are other SHA in between those being uploaded to Codecov, but the uploads to Codecov only happen on specific intervals i.e. nightly. But chronologically, there will always be an older SHA in Codecov to compare against as the "base commit". However, there is no coverage reporting happening in the PR level.

At the time of the upload, there could be a new tip on the branch, which hasn't got a report uploaded to Codecov

@nikosatwork
Copy link
Author

nikosatwork commented Dec 20, 2024

Could passing the --parent-sha help?
Or doing an empty-upload on all the SHA in between?

Edit: tried doing a create-commit & empty-upload for a commit that doesn't have a report uploaded and I got a 'Missing Head Report' error, as I believe it needs information about the pull request (which is not the case as there is no PR, just the merge commits in the branch)

@nikosatwork
Copy link
Author

Hi @vlad-ko. Hope you are well!

Would this be something you could share some light on? Let me know if you need any more information. Thank you.

Appreciate it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

1 participant