Be able to run commands without network access
For CI and other automation, it is nice to be able to run commands and be able to guarantee they will not use the network. This implies nothing should be updated (local repositories are a grey area).
@nrc Can the local mirror (export TIUP_MIRRORS=/path/to/local) resolve this issue?
Can the local mirror (export TIUP_MIRRORS=/path/to/local) resolve this issue?
Maybe. It depends on the specific ways that we design TiUp, e.g., if there is a manifest in the local mirror which can reference an online resource, then this isn't enough (I'm not sure if or why we would want that).
This is why our manifest doesn't contain the URL of resources.
I'm not sure if or why we would want that
Do you mean why we need offline or other else?
Do you mean why we need offline or other else?
I meant why we'd want a reference to an online repo from a local repo
We can add a --offline flag for TiUP, once it's enabled, TiUP and it's components should never access the network. In this case, if something missing(tarball, manifest), just report an error
Still need it.
Here is a crying face, an angry emoj, and a begging picture.
While working on #2508 I too have been struggling with this. I have been playing around with disabling cmdCheckUpdate(), which currently is a mandatory check at every command invocation, and it needs network. In the context of #2508, the program tiup is already installed and having a mechanism that checks for the latest version and downloads updates on every command invocation is excessive.