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

Add cache manager extension #251

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add cache manager extension #251

wants to merge 2 commits into from

Conversation

8R0WNI3
Copy link
Member

@8R0WNI3 8R0WNI3 commented Nov 19, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:


@8R0WNI3 8R0WNI3 requested a review from a team as a code owner November 19, 2024 15:10
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 19, 2024
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 20, 2024
Dockerfile.extensions.cache-manager Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
Dockerfile.extensions.cache-manager Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
config.py Outdated Show resolved Hide resolved
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2024
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2024
Dockerfile.extensions.cache-manager Outdated Show resolved Hide resolved
Dockerfile.extensions.cache-manager Outdated Show resolved Hide resolved
cache_manager.py Show resolved Hide resolved
cache_manager.py Outdated Show resolved Hide resolved
return

logger.info(f'Current cache size: {bytes_to_str(size)}')
logger.info(f'Max cache size: {bytes_to_str(cfg.max_cache_size_bytes)}')
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe for future pullrequest: should we expose cache-metrics (e.g. for prometheus)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that could also be something we could add to the delivery-service, i.e. adding information on cache hits/misses to prometheus.

config.py Outdated Show resolved Hide resolved
@8R0WNI3 8R0WNI3 requested a review from ccwienk November 22, 2024 14:41
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2024
@ocm-ci-robot-0 ocm-ci-robot-0 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
@ocm-ci-robot-0 ocm-ci-robot-0 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
The cache manager's purpose in this first iteration is to cleanup the
persistent db cache according to the supplied configuration via the scan
configuration CR. If the configured `max_cache_size_bytes` is exceeded, cache
entries are removed according to the configured weights in the `cleanup_strategy`
cache strategy property until the cache size reaches `max_buffer_bytes` again.
@ocm-ci-robot-0 ocm-ci-robot-0 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants