Giter VIP home page Giter VIP logo

Comments (8)

dlorenc avatar dlorenc commented on June 12, 2024
  • Provide a scorecard network service that collects results for projects periodically.

This is the approach we've taken so far. There's a cron that runs every day on ~100 projects and publishes the results in GCS/BigQuery.

I'd be happy to add the envoy deps into that list, it's here: https://github.com/ossf/scorecard/blob/main/cron/projects.txt

from scorecard.

dlorenc avatar dlorenc commented on June 12, 2024

Adding the envoy deps here: #84

from scorecard.

naveensrinivasan avatar naveensrinivasan commented on June 12, 2024

GitHub API supports conditional requests https://docs.github.com/en/rest/overview/resources-in-the-rest-api#conditional-requests

Most responses return an ETag header. Many responses also return a Last-Modified header. You can use the values of these headers to make subsequent requests to those resources using the If-None-Match and If-Modified-Since headers, respectively. If the resource has not changed, the server will return a 304 Not Modified.
Making a conditional request and receiving a 304 response does not count against your Rate Limit, so we encourage you to use it whenever possible.

Making a conditional request and receiving a 304 response does not count against your Rate Limit, so we encourage you to use it whenever possible.

https://github.com/google/go-github supports Conditional requests https://github.com/google/go-github#conditional-requests

As we are scaling more and more projects this would add a lot of value.

https://github.com/gregjones/httpcache

cc @inferno-chromium

from scorecard.

naveensrinivasan avatar naveensrinivasan commented on June 12, 2024

A visual representation of the proposed solution.

image

  1. k8s cron job runs on a schedule.
  2. Initial run fetches information using httpcache as a middleware, which caches the HTTP response initially in a large disk (PVC), probably move to Redis later as a cache instead of disk.
  3. Subsequent cron runs will utilize the httpcache for checking content modification and load it from the cache if it isn't modified, which reduces the hitting the Rate Limit of the GitHub API.

from scorecard.

dlorenc avatar dlorenc commented on June 12, 2024

Awesome! What would the cache keys be? URLs?

from scorecard.

naveensrinivasan avatar naveensrinivasan commented on June 12, 2024

Awesome! What would the cache keys be? URLs?

Here it is.
https://github.com/gregjones/httpcache/blob/901d90724c7919163f472a9812253fb26761123d/httpcache.go#L42

from scorecard.

naveensrinivasan avatar naveensrinivasan commented on June 12, 2024

This should reduce the GitHub API usage #227

from scorecard.

azeemshaikh38 avatar azeemshaikh38 commented on June 12, 2024

Close this, since the solution is being tracked/implemented in #318

from scorecard.

Related Issues (20)

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.