Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: increase maximum module files payload using proto streams#18268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Emyrk wants to merge22 commits intomain
base:main
Choose a base branch
Loading
fromstevenmasley/4mb

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJun 6, 2025
edited
Loading

What this does

Protobuf has a maximum message size, configured to4mb.

Dynamic parameters requires the remotely fetched module files located in~/.terraform/modules for evaluation. These can exceed the maximum message size. To allow for templates with larger modules, this PR adds a proto stream to stream over the file in chunks. The resulting file is inserted to the database, and then referenced by filehash.

Note every template version for a given template will have the same module_files (assuming no provider changes). So most module files are deduplicated per version. In the future, it might be even more advantageous to upload individual modules to reuse across various templates.

Implementation

Coderd <-> Provisionerd

If themodule_files are too large, it uses a new protobuf stream to send and upload the file before theCompleteJob fires:

// UploadFile streams files to be inserted into the database.
// The file upload_type should be used to determine how to handle the file.
rpcUploadFile(streamUploadFileRequest)returns (Empty);

TheCompleteJob references the file uploaded by itshash and its type.

Provisionerd <-> Provisioner

This communication all happens in memory today right? No actual networks?

Since astream is already used,DataUpload andChunkPiece are added to the existing stream.

@EmyrkEmyrk changed the titleStevenmasley/4mbfeat: increase maximum module files payload using proto streamsJun 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@spikecurtisspikecurtisAwaiting requested review from spikecurtisspikecurtis will be requested when the pull request is marked ready for reviewspikecurtis is a code owner

@johnstcnjohnstcnAwaiting requested review from johnstcnjohnstcn will be requested when the pull request is marked ready for reviewjohnstcn is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp