PTU5KAS/docs
Felix Moessbauer f2560588bc auto create repo refs when setting KAS_REPO_REF_DIR
This patch reworks the logic when setting KAS_REPO_REF_DIR.
When this variable is set, a two-staged clone is used:
First, a bare-clone (or similar) is created in the ref-dir, according to
the naming scheme. This clone is executed in a way that is both
reentrant as well as race-free across multiple instances of KAS working
on the same dir. Internally we clone into a tmpdir below the refdir and
rename on success to guarantee the atomicity of the operation on POSIX
compliant filesystems.

Second, the clone in the KAS_WORK_DIR is executed against the local
copy. After that, the origin url is redirected to the upstream url.
By that, the KAS_REPO_REF_DIR directory can be cached across builds
which significantly speedsup clone times against large repos.
In case the requested refspec is already in the cache (very likely in CI
builds), no direct access to the upstream repo is required. This logic
is crucial for CI systems in China, where e.g. access to github is
blocked from time to time.

The clone-from-local logic is currently only implemented for the git plugin
as HG misses the caching logic. Repo implementations that do not support this
logic can simply opt-out for the first stage by returning 'true'.

The existing user-facing logic of KAS_REPO_REF_DIR is not affected.
However, internally we no longer clone via --reference as this still
requires access to the remote repo, even if the requested commit is
already in the local copy.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2023-01-05 18:11:06 +01:00
..
_static Fixed wrapping of cell content in readthedocs style 2017-06-28 15:12:15 +02:00
command-line.rst auto create repo refs when setting KAS_REPO_REF_DIR 2023-01-05 18:11:06 +01:00
conf.py scripts: Remove pylint 2018-12-07 09:55:26 +01:00
devguide.rst docs: Update devguide to handle new plugin structure 2020-11-13 07:41:01 +01:00
format-changelog.rst add conditional environment variables 2022-11-10 19:03:48 +01:00
index.rst docs: Move command line details to a separate page 2020-11-13 07:41:57 +01:00
intro.rst docs: Fix title of intro page 2020-11-13 07:42:24 +01:00
Makefile Added initial sphinx documentation 2017-06-28 15:12:15 +02:00
requirements.txt readthedocs: Add configuration file 2021-11-22 19:20:14 +01:00
userguide.rst add plugin to dump flattened config 2022-12-13 14:38:41 +01:00