implement caching layer for digger config #1825
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
introduces caching for digger config so that it can be loaded from cache if needed.
The flag needed for this is "DIGGER_CONFIG_REPO_CACHE_ENABLED=1" as well as setting the value for "DIGGER_INTERNAL_SECRET={some secret}" in order to be able to call an internal url for re-caching.
The internal url is
/_internal/update_repo_cache
and it needs some arguments. Here is a curl request for it as an example"Where repo_full_name is just a path to the repo
branch is the branch you want to cache from (always this would be your default branch
installation_id is your github installation ID and can be fetched from your github app settings (the place where you installed the app from)
Also if you want to disable loading from cache in a specific PR you can add the label "digger:no-cache" to it and it will not load from cache anymore