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

Investigate identifying first commit in a repository #38

Closed
katia-sentry opened this issue Jun 8, 2023 · 3 comments
Closed

Investigate identifying first commit in a repository #38

katia-sentry opened this issue Jun 8, 2023 · 3 comments
Assignees
Milestone

Comments

@katia-sentry
Copy link
Contributor

We need to investigate and come up with a solution for identifying the first commit in a repository. Users often encounter a ‘missing head' message on their first commit when setting up a repo, which is confusing leading to poor user experience. Our goal with this ticket is to explore potential strategies for identifying the first commit. A successful solution will give us the ability to provide more informative guidance during initial setup.

Some potential solutions and their issues are:

  1. Counting the commits for a repo: This may become super expensive as the repo grows

  2. Flagging the first commit in the database: It's unclear when and how we would set this flag. Would it be set once they merge to the default branch? What if they never merge to their default branch?

Acceptance Criteria:

  • Research and identify potential strategies for accurately identifying the first commit in a repository
  • Document findings and recommendations
@katia-sentry katia-sentry added this to the 1st time experience PR comment and UI user awareness milestone Jun 8, 2023
@giovanni-guidini
Copy link

Users often encounter a ‘missing head' message on their first commit when setting up a repo, which is confusing leading to poor user experience

That is absolutely true.
In particular the Pulls view is terrible because you only get a message saying missing base commit with a link to learn more about it. No clues on why you're missing the head, barely any explanation to what it is, and no suggestion of what to do.

I understand that the idea behind this ticket is to flag the 1st commit and display a different message if that's the case. I don't think we should single out this one case though, but rather provide a more comprehensive message, that doesn't look like an error.

Let's also consider the fact that we might be missing a base for different reasons:

  • We don't have a report for the base
  • The report for the base is still processing
  • You haven't used codecov in a while and are just starting to again, so some commits are missing
  • The base failed processing

Regardless of the reason we don't have a base (or head) I think that we need to improve the message on https://app.codecov.io/gh/<owner>/<repo>/pull/<pull_id> to list different scenarios and possible solutions, or steps that the user can take. In essence, a guide so the user can self-support.

Having the knowledge that this is the first commit or not doesn't seem relevant for that change in particular

@giovanni-guidini
Copy link

Now on to counting commits.
My suggestion would be counting based, but not count all commits in the repo, rather all commits per branch.

For this I think introducing a Branch class (new DB table branches) would give us interesting possibilities, perhaps. The idea is to save branch name, number of commits we have registered to it, and what the latest is (we don't need the latest commit, but I think it's interesting to have that)

We can easily update this info when assigning the branch from the git provider to the commit, even removing commits from a branch count if we have to switch the commit branch.

Then, if we have 0 branches for a repo, or if we have 0 commits for the default branch, we know it's a first commit.

@giovanni-guidini
Copy link

The ticket simply asks for a suggestion, that is mine. Open for feedback, for sure, but losing this for now.

@trent-codecov trent-codecov modified the milestones: 1st time experience PR comment and UI user awareness, Q2'23 Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants