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

Add option for mirror repositories #116

Open
rsdunlapiv opened this issue Apr 12, 2019 · 1 comment
Open

Add option for mirror repositories #116

rsdunlapiv opened this issue Apr 12, 2019 · 1 comment

Comments

@rsdunlapiv
Copy link

The request is to add an optional mirror parameter for an external which would point to one or more additional repositories that are mirrors. Mirrors are considered to be equivalent to each other, so the checkout should success as long as at least one mirror is accessible.

The use case for this comes from the CMEPS project where we have had to create multiple Externals.Machine.cfg files - one for each of several machines. The reason for this is because one of the external repositories is private and so we had to create separate clones of the external repository and put it in shared spaces on the machine file systems.

For example:

Externals.Stampede2.cfg

[fv3gfs]
branch = dev/nems-benchmark-2.0
protocol = git
local_path = FV3GFS
repo_url = /work/06242/tg855414/stampede2/GITLOCAL/FV3
required = True

Externals.Theia.cfg

[fv3gfs]
branch = dev/nems-benchmark-2.0
protocol = git
local_path = FV3GFS
repo_url = /scratch4/NCEPDEV/nems/noscrub/Rocky.Dunlap/GITLOCAL/FV3
required = True

If we had a mirror option, it might look like this:
Externals.cfg

[fv3gfs]
branch = dev/nems-benchmark-2.0
protocol = git
local_path = FV3GFS
repo_url = https://some.repo.on.the.internet/myrepo
repo_mirror = /scratch4/NCEPDEV/nems/noscrub/Rocky.Dunlap/GITLOCAL/FV3
repo_mirror = /work/06242/tg855414/stampede2/GITLOCAL/FV3
required = True

When mirrors are present, each repo is attempted in order and fails gracefully until all of the mirrors have been exhausted.

@billsacks
Copy link
Member

It seems like we could also use this feature to support listing both ssh and https URLs for a repository – so the ssh form would be tried first, but it could fall back to https if the user doesn't have ssh keys set up. This would be very handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants