Skip to content

Replace the GitHub proxy with git over CORS proxy #1467

@adamziel

Description

@adamziel

Let's provide a scalable way for Playground to interact with remote resources and GitHub repositories. The current one, github-proxy.com, might be challenging to scale in the longer term.

With JavaScript git clone sparse checkout support and a PHP CORS Proxy, the footprint would be as small as it gets.

  • Start a new site, e.g. playground-proxy.wordpress.net to separate this from the Playground server.
  • Deploy the PHP CORS Proxy there.
  • Stress-test it with 2000 clones per hour to verify it's a viable approach.
  • Set up rate limiting.
  • Perhaps restrict the CORS proxy to git URLs for now.
  • Map out a project of shutting down the plugin-proxy.php endpoint in favor of that CORS proxy.
  • For git operations, run git clone via JavaScript(), do a sparse checkout as needed.
  • Create a new git resource type for referencing git repositories.
  • Rewrite github-proxy.com and github.com references in Blueprints as the new git resource type.
  • Document the official and recommended way of interacting with git.

Optionally, we could migrate the PHP CORS proxy to Async\HttpClient to give that library more real-world testing.

GitHub rate-limiting shouldn't be a problem for those git clone operations.

Long term, we might run into issues with the actual throughput. If and when that happens, let’s explore edge-caching zip files, queuing and rate limiting requests, size limits for cloned repos and artifacts, maybe keeping hot clones of 10 most popular repos etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions