Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Report crawling success/failure using the new notification system #419

Open
aquibbaig opened this issue Aug 25, 2019 · 4 comments
Open

Report crawling success/failure using the new notification system #419

aquibbaig opened this issue Aug 25, 2019 · 4 comments
Assignees
Labels
gsoc Google Summer of Code

Comments

@aquibbaig
Copy link
Collaborator

Report the user whether his project was crawled successfully/there was some failure crawling for it.

@aquibbaig aquibbaig added the gsoc Google Summer of Code label Aug 25, 2019
@aquibbaig aquibbaig self-assigned this Aug 25, 2019
@aquibbaig
Copy link
Collaborator Author

Various methods on which actionable notifications can be provided to the user are:

Source: GitRepoCrawler.php

  • commitExists()
    • Notify user of RuntimeException when unable to fetch commits
  • updateCommits()
    • Notify when process times out
  • getDescriptionSafeHTML()
    • Notify user if Exception arises when unable to convert desc. file to HTML
  • getLicenseTextSafeHTML()
    • Notify user if Exception arises when unable to convert license file for license text
  • updateReleases()
    • Notify user if process times out
    • Notify user when unable to fetch releases
  • cloneRepo()
    • Notify user if process times out
  • parseCommits()
    • Notify user when exception is thrown while parsing commits

@aquibbaig
Copy link
Collaborator Author

@imphil @agathver Let me know what other information can be provided to the users

@imphil
Copy link
Contributor

imphil commented Sep 2, 2019

Please try to categorize these things by items where the user can actually do something, and where we have a bug in the code and need to do something. If an exception is thrown, we get notified through Sentry (at least we should), and can act accordingly.

More problematic are cases where we cannot do anything, and the user needs to act. That's the case when the repository is gone, or the GitHub API returns an error indicating that the user removed the OAuth permissions. (I think we currently try to crawl again using our GitHub API token, you might want to double-check there.)

@aquibbaig
Copy link
Collaborator Author

Various methods on which actionable notifications can be provided to the user are:

Source: GitRepoCrawler.php

  • commitExists()

    • Notify user of RuntimeException when unable to fetch commits
  • updateCommits()

    • Notify when process times out
  • getDescriptionSafeHTML()

    • Notify user if Exception arises when unable to convert desc. file to HTML
  • getLicenseTextSafeHTML()

    • Notify user if Exception arises when unable to convert license file for license text
  • updateReleases()

    • Notify user if process times out
    • Notify user when unable to fetch releases
  • cloneRepo()

    • Notify user if process times out
  • parseCommits()

    • Notify user when exception is thrown while parsing commits

This however is a shallow approach on what we will be doing. I'd like to propose a solution before actually starting out the implementation in a day/two. This is not such a small task but a rather extensive task that needs some thinking on what exceptions can arise and what the user can do to solve them

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gsoc Google Summer of Code
Projects
None yet
Development

No branches or pull requests

2 participants