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

feat: cache updatecli policies #1867

Merged
merged 3 commits into from
Jan 14, 2024
Merged

feat: cache updatecli policies #1867

merged 3 commits into from
Jan 14, 2024

Conversation

olblak
Copy link
Member

@olblak olblak commented Jan 14, 2024

This pullrequest add some basic caching by checking a policy directory already exist before pulling it from the registry.
Because the policy path contains the policy checksum which correspond to a version such as:

/tmp/updatecli/store/41c2af6a10da1f4b4b91717ebaa4659332dd3d7107919c494c71f1f618aeaad8/updatecli.d

We shouldn't have collision between the same policy with different version.

Test

I tested this pullrequest manually on github/website by running
../updatecli/bin/updatecli compose diff -f update-compose.yaml --experimental --debug

Additional Information

Tradeoff

Potential improvement

We could also have some caching based on the time such pull the policy if the local directory is older than one day but considering that policy path contains a checksum, I don't think it's really necessary

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added the updatecli-policies All things related to Updatecli policies label Jan 14, 2024
@olblak olblak added this to the 0.71.0 milestone Jan 14, 2024
@olblak olblak enabled auto-merge (squash) January 14, 2024 15:29
@olblak olblak added the enhancement New feature or request label Jan 14, 2024
@olblak olblak merged commit 84508a7 into updatecli:main Jan 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request updatecli-policies All things related to Updatecli policies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant