tiup icon indicating copy to clipboard operation
tiup copied to clipboard

Be able to run commands without network access

Open nrc opened this issue 5 years ago • 7 comments

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 avatar Apr 08 '20 08:04 nrc

@nrc Can the local mirror (export TIUP_MIRRORS=/path/to/local) resolve this issue?

lonng avatar Apr 15 '20 08:04 lonng

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).

nrc avatar Apr 15 '20 18:04 nrc

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?

lonng avatar Apr 17 '20 07:04 lonng

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

nrc avatar Apr 17 '20 07:04 nrc

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

lucklove avatar Jun 30 '20 03:06 lucklove

Still need it.

Here is a crying face, an angry emoj, and a begging picture.

innerr avatar Jun 25 '21 01:06 innerr

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.

ottok avatar May 21 '25 18:05 ottok