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

Quota: Add Cache To Tag Delete (PROJQUAY-3828) #1345

Merged
merged 3 commits into from
May 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion endpoints/api/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime
from flask import request, abort

from app import storage, docker_v2_signing_key
from app import storage, docker_v2_signing_key, app
from auth.auth_context import get_authenticated_user
from data.registry_model import registry_model
from endpoints.api import (
Expand Down Expand Up @@ -229,6 +229,9 @@ def delete(self, namespace, repository, tag):

registry_model.delete_tag(repo_ref, tag)

if app.config.get("FEATURE_QUOTA_MANAGEMENT", False):
repository.force_cache_repo_size(repo_ref.id)
kwestpharedhat marked this conversation as resolved.
Show resolved Hide resolved

username = get_authenticated_user().username
log_action(
"delete_tag",
Expand Down