🔨 chore(desktop): bust stable release manifest cache#13157
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ONLY-yours @nekomeowww - This is a desktop release service fix (cache-busting for stable manifest requests). Please take a look. |
|
❤️ Great PR @Innei ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #13157 +/- ##
==========================================
- Coverage 74.57% 74.57% -0.01%
==========================================
Files 1517 1517
Lines 125037 125038 +1
Branches 13913 13914 +1
==========================================
- Hits 93249 93247 -2
- Misses 31677 31680 +3
Partials 111 111
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 081c24c72a
ℹ️ 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".
| const timestamp = Date.now(); | ||
|
|
||
| const [mac, win, linux] = await Promise.all([ | ||
| fetchUpdateServerManifest(baseUrl, 'stable-mac.yml').catch(() => null), | ||
| fetchUpdateServerManifest(baseUrl, 'stable.yml').catch(() => null), | ||
| fetchUpdateServerManifest(baseUrl, 'stable-linux.yml').catch(() => null), | ||
| fetchUpdateServerManifest(baseUrl, 'stable-mac.yml?t=' + timestamp).catch(() => null), |
There was a problem hiding this comment.
Keep manifest cache-busting stable within the revalidate window
Using Date.now() here changes the manifest URL on every invocation, so the next: { revalidate: 300, tags: [...] } cache inside fetchUpdateServerManifest can never hit. Any caller that resolves desktop downloads more than once in a 5-minute window will now trigger three origin fetches every time, adding latency and load even though the code still declares these requests cacheable. If the intent is only to bypass stale upstream/CDN manifests, the cache-buster needs to stay constant for the revalidate interval instead of changing per call.
Useful? React with 👍 / 👎.
💻 Change Type
🔗 Related Issue
None.
🔀 Description of Change
Add a cache-busting timestamp query to stable desktop manifest requests.
This avoids stale
stable*.ymlresponses from the update server or intermediate caches, so desktop release metadata stays in sync with the latest published artifacts.🧪 How to Test
bunx vitest run --silent='passed-only' 'src/server/services/desktopRelease/index.test.ts'📸 Screenshots / Videos
📝 Additional Information
This change only appends a shared timestamp query string when fetching
stable-mac.yml,stable.yml, andstable-linux.yml.