Skip to content

Image CDN #294

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Image CDN #294

wants to merge 1 commit into from

Conversation

ndepaola
Copy link
Collaborator

Description

  • This is the thumbnail caching system for the MPC Autofill frontend
    • Has been running in production for a bit over a year - I just hadn't PR'd it into the repo
  • Motivated by google drive dramatically reducing their rate limit for serving thumbnails - see this thread: https://issuetracker.google.com/issues/319531488?pli=1
  • This is still in a bit of a rough state - following items on the todo list:
    • Code tidy up, docstrings, clean up TODOs throughout code
    • Docs for how to set up the system
    • Automate Cloudflare Worker deployment with github actions
      • Configure repo with necessary secrets to do this

Checklist

  • I have installed pre-commit and installed the hooks with pre-commit install before creating any commits.
  • I have updated any related tests for code I modified or added new tests where appropriate.
  • I have manually tested my changes as follows:
    • Has been running in production for over a year
  • I have updated any relevant documentation or created new documentation where appropriate.

todo:
* google drive only lets you watch resources for a week :(

some progress! after four months of putting this off. love to see it.

will check if this has worked around 10am tomorrow

no idea how long it will take to run

a few things on the todo list to rattle off at 12am:
* need to flesh out the env var docstrings a lot.
  i had to go into the YuukioFuyu repo to check their instructions
* need a  more robust way of generating google client ID / secret /
  refresh token
* need to plug this into github actions to redeploy on master
  (or maybe on a branch called `image-cdn-release` in keeping with
  how the frontend deploys)?
* docstrings for functions
* a couple of dumb names here which we'll need to clean upu

update wrangler

npm audit fix

add logging

https://medium.com/@amanpal2072004/how-to-generate-refresh-token-and-use-them-to-access-google-api-f7565413c548
authorising with drive.readonly

delete image IDs which 404 from system
@ndepaola ndepaola self-assigned this May 18, 2025
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.

1 participant