Skip to content

Deduplicate remote fetches for generate inputs - #4686

Merged
emcfarlane merged 3 commits into
mainfrom
ed/dedupeFetch
Sep 24, 2026
Merged

emcfarlane merged 3 commits into
mainfrom
ed/dedupeFetch

Conversation

@emcfarlane

@emcfarlane emcfarlane commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

This adds caching to remote references so buf generate now fetches each remote input once. Multiple inputs in a buf.gen.yaml that resolve to the same archive, git repository, or image previously fetched once per input. The cache is opt-in and set per command required.

Closes #4657

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 24, 2026, 2:51 PM

@emcfarlane
emcfarlane requested a review from doriable September 16, 2026 15:46

@doriable doriable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this would be using an in-memory cache, we need to do some validation for the LSP on memory consumption and include that in some combination of the PR description or in a test.

@emcfarlane emcfarlane changed the title Deduplicate Ref fetches Deduplicate remote fetches for generate inputs Sep 16, 2026
@emcfarlane
emcfarlane requested a review from doriable September 16, 2026 16:15
@emcfarlane

Copy link
Copy Markdown
Contributor Author

@doriable thanks added option config for setting per command.

@doriable doriable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're gating this to only be used, this looks reasonable to me. Approving in advance of merge conflicts being resolved.

@emcfarlane
emcfarlane merged commit 1460bb5 into main Sep 24, 2026
10 checks passed
@emcfarlane
emcfarlane deleted the ed/dedupeFetch branch September 24, 2026 19:47
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.

Deduplicate identical remote fetches across inputs: entries in buf.gen.yaml

2 participants