Skip to content

feat: wrapping check functions in defineCachedFunction for resolving changelog info - #3282

Draft
WilcoSp wants to merge 3 commits into
npmx-dev:mainfrom
WilcoSp:changelog/caching
Draft

WilcoSp wants to merge 3 commits into
npmx-dev:mainfrom
WilcoSp:changelog/caching

Conversation

@WilcoSp

@WilcoSp WilcoSp commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

relates to #3263

🧭 Context

For resolving changelog info I've now wrapped most of the check functions in defineCachedFunction to have the results cached and reduce fetching from the git providers.

Also added timeouts to the last fetch calls for changelogs that didn't have timeout configured.

📚 Description

Due to Gitlab making their rate limits stricter I've now wrapped most of the check functions in defineCachedFunction to have the result cached, reduce fetch calls & reduce chances of rate limits.
I've made the change for all git providers to also prevent issues with other git providers, except github with releases because ungh also caches the results and I don't want old results to be hanging around too long.

I've configured the caching for the check functions to be have maxAge at 1 hour & staleMaxAge at 30 minutes, this is to prevent having stale data being served while the endpoint cache is being renewed.

I didn't make changes for the other endpoints because they're already covered by defineCachedHandler.

I've also added timeout to the last fetch calls that changelog uses to prevent hanging when a git providers take a long time or is being overloaded.

@agentscanapp

agentscanapp Bot commented Sep 22, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! 🎉

We really appreciate you taking the time to contribute, @WilcoSp.

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description explains what changed and why
  • any related issues are linked
  • existing tests still pass

If anything needs adjusting we'll leave comments here. Thanks again!

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Sep 22, 2026 9:28pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Sep 22, 2026 9:28pm UTC
npmx-lunaria Ignored Ignored Sep 22, 2026 9:28pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 62 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/utils/changelog/detectChangelog.ts 0.00% 49 Missing and 13 partials ⚠️

📢 Thoughts on this report? Let us know!

This branch was successfully deployed

1 active deployment
Preview – npmx.dev c5d14da3 Deployed Sep 22, 2026 by vercel[bot]
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