-
Notifications
You must be signed in to change notification settings - Fork 27
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
ENH: check for github early to avoid long timeouts, decrease usage of git clone #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a straight improvement to me. This is on the cusp of deserving its own repo / package, this file is quite long..
Whoops about the --path-override
option. Should have seen that as a reviewer 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The next time this needs a sizable scope increase, I think the first step is to create an |
I wondered if |
I'm intentionally avoiding |
The other problem with using |
Description
This should be the second-to-last PR from me about this script from the Jira epic.
Main goal: make
ioc-deploy
succeed and fail faster, avoiding slow commands and long timeouts.Main changes:
ping
github as a quick connectivity check.git ls-remote
one time instead of through multiplegit clone
commands.get_deploy_info
,finalize_name
, andfinalize_tag
to facilitate the above.Incidental changes:
DeployInfo
to only usestr
, notNone
because it simplified some implementation details--path-override
by itself during the deploy routines, which previously would error out. This fell out naturally from the rest of the refactor and I didn't realize it hadn't been supported previously.Motivation and Context
Full details at https://jira.slac.stanford.edu/browse/ECS-6096
If you
git clone
from a server likelas-console
orrix-control
, one of the following will happen:Both of these cases are avoided by this PR. I wanted to avoid setting timeouts on git clone because the command can take an arbitrarily long amount of time based on the network situation and file sizes. For the same reason, I wanted to avoid calling git clone multiple times if it could be avoided.
For example: cloning the gigECam ioc can often be slow, so I'd like this script to only do it once.
How Has This Been Tested?
Interactively, extensively
Where Has This Been Documented?
Only in this PR and release notes. The expected results of running
ioc-deploy
remains unchanged, it should just succeed and fail faster.