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

Create a cleanup handler for the varnish cache to provide 'ban' functionality #5

Merged
merged 14 commits into from
Aug 11, 2023

Conversation

JackLewis-digirati
Copy link
Contributor

@JackLewis-digirati JackLewis-digirati commented Aug 10, 2023

Resolves #3

This pull request adds a python script that listens to an SQS queue for deletions and then actions a ban request on a varnish cache using tags. This script can be run separately, in it's own docker container, or within the varnish container itself

@JackLewis-digirati JackLewis-digirati changed the title Feature/cleanup handler Create a cleanup handler for the varnish cache to provide 'ban' functionality Aug 10, 2023
Copy link
Member

@donaldgray donaldgray left a comment

Choose a reason for hiding this comment

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

LGTM; couple of comments but mostly around unused vars + gh action versions.

One thought - it might be good to allow this to work if INCOMING_QUEUE is missing. E.g. if we scale out for 4hours to cope with a known load we might want additional varnish instances running without worrying about bans. (maybe create a ticket for this new behaviour rather than add to this PR)

varnish-cleanup/cleanup_handler.py Outdated Show resolved Hide resolved
varnish-cleanup/cleanup_handler.py Outdated Show resolved Hide resolved
varnish-cleanup/app/settings.py Outdated Show resolved Hide resolved
varnish-cleanup/app/aws_factory.py Outdated Show resolved Hide resolved
.github/actions/docker-build-and-push/action.yml Outdated Show resolved Hide resolved
.github/actions/docker-build-and-push/action.yml Outdated Show resolved Hide resolved
.github/actions/docker-build-and-push/action.yml Outdated Show resolved Hide resolved
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this is required any longer, I'll take a note to test removing from Protagonist. It was related to a ghcr/buildkit issue from a few months ago (docker/build-push-action#761 (comment))

@JackLewis-digirati JackLewis-digirati merged commit afcb20a into master Aug 11, 2023
2 checks passed
@JackLewis-digirati JackLewis-digirati deleted the feature/cleanup-handler branch August 11, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear varnish cache for an asset
2 participants