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

Kas persistent #63

Merged
merged 2 commits into from
Nov 6, 2024
Merged

Conversation

ndechesne
Copy link
Contributor

The main change is the 2nd one, where we clone all kas repos in our persistent storage to avoid cloning each time from upstream. This variable needed to be global so that it's used in all jobs (kas-dump, check-layer and compile) since they all today clone all repos from upstream.

Since I was adding global env variables, I also added one for the persistent folder, since it was used in 2 different places already.

Use a global env variable for the persistent storage to avoid
duplication. This should really be a no-op change.

Signed-off-by: Nicolas Dechesne <[email protected]>
This variable can be used to specify where to clone all repos used by
kas. By setting up a persistent storage location, we can keep a copy
of all git trees locally, and only fetch new objects. So kas will
first clone/fetch objects in KAS_REPO_REF_DIR location, and then will
use them as a source when checking out the repo for the build.

The documentation says that:

  Multiple instances of kas can simultaneously work on the same
  directory, as long as the underlying filesystem is POSIX compatible.

So it is designed to be safe in CI environments such as ours.

New trees are cloned the first time they are encountered, and only new
objects are fetched otherwise.

Note: we cannot concatenate global env variables, hence a little bit
of duplication between KAS_REPO_REF_DIR and CACHE_DIR.

Signed-off-by: Nicolas Dechesne <[email protected]>
Copy link
Contributor

@quaresmajose quaresmajose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ricardosalveti ricardosalveti merged commit f916c17 into qualcomm-linux:main Nov 6, 2024
8 checks passed
@ndechesne ndechesne deleted the kas-persistent branch November 6, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants