Giter Club home page Giter Club logo

gddoexp's Introduction

Hi there ๐Ÿ‘‹

Thanks for checking out my profile! Hope you find the repository you're looking for. If you have an open-source project and need help to get it done, give me a shout.

Rafael's GitHub stats

gddoexp's People

Contributors

rafaeljusto avatar

Watchers

 avatar  avatar

Forkers

shantuo

gddoexp's Issues

Avoid reaching Github API rate limit

As we are today using token bucket strategy to limit the number of requests and the Github API uses requests per hour strategy, we can fall into rate limit when running the scanner. To solve this we could:

  • Change the token bucket parameters and sleep the go routines (until X-Ratelimit-Reset) in case that we reach the rate limit (status 403 Forbidden). The problem here is how to stop filling tokens in the bucket while in rate limit.
  • Rethink our rate limit strategy to query Github API, maybe something controlled by Github HTTP response headers (X-Ratelimit-Limit, X-Ratelimit-Remaining, X-Ratelimit-Reset).

Check status code 404 from GitHub API

When we request for a repository in Github API and receives a 404 Not Found we should also consider to archive this package, as the repository and/or the user account were removed.

Probably a change in github.go :: doGithub function would solve this. But to avoid changing the low level function interfaces, we could create a error code for this related issue (ErrorCodeRemovedPackage?), that would be analyzed in gddoexp.go :: ShouldArchivePackage and gddoexp.go :: IsFastForkPackage.

On the last scan we got 837 of 132277 packages that received an unknown status from Github (!= 200 OK). So this change could archive a significant number of packages (0.63%).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.