Skip to content

Set cacheKeyFn for github dataloader - #2264

Merged
bluwy merged 2 commits into
mainfrom
data-cache-key
Aug 24, 2026
Merged

bluwy merged 2 commits into
mainfrom
data-cache-key

Conversation

@bluwy

@bluwy bluwy commented Aug 24, 2026

Copy link
Copy Markdown
Member

ref: #1925 (comment)

closes #1925

original pr description:

Fixed DataLoader cache deduplication (@changesets/get-github-info)

  • Adds a cacheKeyFn to the DataLoader so its result cache actually works
  • Previously, cache keys were compared by object reference (JavaScript Map semantics), so identical requests for the same commit/PR were never deduplicated
  • This was causing a 6-7x inflation in the number of GitHub API lookups (e.g. 654 changesets → 4261 requests)

@netlify

netlify Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for changesets ready!

Name Link
🔨 Latest commit dd664b8
🔍 Latest deploy log https://app.netlify.com/projects/changesets/deploys/6a8bbd7c02dd130008ae8293
😎 Deploy Preview https://deploy-preview-2264--changesets.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dd664b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@changesets/get-github-info Patch
@changesets/changelog-github Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.56%. Comparing base (8eff462) to head (dd664b8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2264      +/-   ##
==========================================
+ Coverage   84.53%   84.56%   +0.02%     
==========================================
  Files          80       80              
  Lines        3168     3174       +6     
  Branches      890      895       +5     
==========================================
+ Hits         2678     2684       +6     
  Misses        433      433              
  Partials       57       57              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bluwy
bluwy added this pull request to the merge queue Aug 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 24, 2026
@bluwy
bluwy added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit 4d7b4fb Aug 24, 2026
18 checks passed
@bluwy
bluwy deleted the data-cache-key branch August 24, 2026 11:23
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.

2 participants