feat: self-host remote images during build - #292
Conversation
Dokploy Preview Deployment
|
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThe PR adds build-time remote image self-hosting, cached WebP conversion, manifest-based runtime URL mapping, and integration across ad, sponsor, and speaker data. Nuxt configuration and deployment caching enable the image preparation workflow. ChangesRemote image self-hosting
Sequence Diagram(s)sequenceDiagram
participant NuxtBuild
participant SelfHostRemoteImages
participant GoogleSheets
participant PretalxAPI
participant RemoteImageCache
participant AdAndSpeakerAPIs
NuxtBuild->>SelfHostRemoteImages: run build:before
SelfHostRemoteImages->>GoogleSheets: fetch published image URLs
SelfHostRemoteImages->>PretalxAPI: fetch speaker avatar URLs
SelfHostRemoteImages->>RemoteImageCache: download WebP files and write manifest
AdAndSpeakerAPIs->>RemoteImageCache: resolve normalized image source
RemoteImageCache-->>AdAndSpeakerAPIs: return self-hosted path or original URL
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72c7590215
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy.yaml:
- Around line 35-40: Update the “Restore remote image cache” step to include a
unique run identifier such as github.run_id in its primary key, and add
restore-keys using the stable remote-images and runner.os prefix so the newest
existing cache is restored while each run can save newly downloaded images.
In `@modules/self-host-remote-images.ts`:
- Around line 22-34: Update driveThumbnailUrl and isPretalxAvatar to handle
invalid source strings without throwing: wrap each new URL(source) parse in
try/catch and return null from driveThumbnailUrl or false from isPretalxAvatar
when parsing fails, while preserving existing behavior for valid URLs.
- Around line 154-160: Update the cache-check logic around cachedName in the
remote image processing flow to detect the PRETALX_PLACEHOLDER value and return
early before resolving or statting it. Keep normal .webp cache validation and
copying unchanged for other cached names.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 403905ce-fde7-4987-a0ab-fc225058ff1e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
.github/workflows/deploy.yaml.gitignoremodules/self-host-remote-images.tsnuxt.config.tspackage.jsonserver/api/ad.get.tsserver/api/sponsor.get.tsserver/utils/opass/pretalxToOpass.tsserver/utils/pretalx/parser.tsserver/utils/remoteImages.tsshared/utils/remoteImages.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd7f48e102
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fd7f48e to
5fd51a4
Compare
5fd51a4 to
ccf880c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccf880c29c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
影像改下載後放在 GitHub Pages,不走 Pretalx 或 Google Drive 外部服務。
Fixed #285
Summary by CodeRabbit
New Features
Bug Fixes