-
Notifications
You must be signed in to change notification settings - Fork 635
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
Ozone cdn invalidation #2087
Ozone cdn invalidation #2087
Conversation
const paths = (this.cdnPaths ?? []).map((path) => | ||
path.replace('%s', subject.did), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not noticing a place where the cid
is also inserted into the path. Pretty sure the invalidators themselves don't do this, so I think we'd want it around here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yup you're totally right i thought the img invalidator took care of that tbh 😅
const { | ||
BunnyInvalidator, | ||
CloudfrontInvalidator, | ||
MultiImageInvalidator, | ||
} = require('@atproto/aws') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to adjust the service's package.json and dockerfile to include @atproto/aws
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easiest thing to check/catch this is to make a build and run it, even if it's unconfigured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup good point 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid, just a couple small things to peek at.
await Promise.allSettled( | ||
(subject.blobCids ?? []).map((cid) => { | ||
const paths = (this.cdnPaths ?? []).map((path) => | ||
path.replace('%s', subject.did).replace('%s', cid), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issue here, but node's util.format()
does this exact printf-style replacement! Would look something like util.format(path, subject.did, cid)
.
Move CDN invalidation to Ozone. Invalidation is pushed out after the takedown event is pushed to appview.