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

Fallback handling in case the StepLib (spec / source) is not available #181

Open
viktorbenei opened this issue Apr 24, 2016 · 0 comments
Open
Milestone

Comments

@viktorbenei
Copy link
Contributor

viktorbenei commented Apr 24, 2016

Simply download the full spec (JSON) from s3 or from another Spec git repository, if the primary source can't be accessed (e.g. GitHub rate limiting)

Solution idea

  • Include the "alternatives" / "caches" / "mirrors" list in the StepLib's git repo spec, in the steplib.yml
  • The primary StepLib git repo still have to be downloaded at least once (e.g. from GitHub), but then the cache/mirror can be used in case the primary source (GitHub) is not available
  • Cache / mirror should be either an URL (ZIP, tar) or a git (clone) url; a list should be allowed with priority - similar to how download_locations work for steps
  • we should set up a mirror on GitLab for the main Bitrise StepLib - GitLab has an automatic GitHub mirroring feature
  • maybe also set up an S3 cache, just to be sure & to test
  • the ZIP/tar should not include the .git directory - to save space (.git is pretty much the largest dir, as it includes diffs and git history)

Notes

Only download the full spec.json, and do it only if there was a change. First send a HEAD request, to see when it was last modified, and store the modified date when downloading the spec.json, so that it can be used for comparison in subsequent checks.

@viktorbenei viktorbenei added this to the 1.0.0 milestone Apr 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant