proto1: update to operate over stdin#36
Open
sam-berning wants to merge 2 commits intobottlerocket-os:developfrom
Open
proto1: update to operate over stdin#36sam-berning wants to merge 2 commits intobottlerocket-os:developfrom
sam-berning wants to merge 2 commits intobottlerocket-os:developfrom
Conversation
It's possible for proto1's command line interface to exceed the OS's maximum argument length (128 KiB) if the JSON values passed into the command are particularly large. So instead of getting arguments from the command line, we parse them as an equivalent JSON structure from a provided file. By default, this is from stdin, but this can be overridden with the --input-file flag. Signed-off-by: Sam Berning <bernings@amazon.com>
Signed-off-by: Sam Berning <bernings@amazon.com>
jmt-lab
approved these changes
Feb 15, 2024
| pub arg: Vec<serde_json::Value>, | ||
| } | ||
|
|
||
| pub mod input { |
Contributor
There was a problem hiding this comment.
I would maybe add a doc comment here just for sanity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#35
Description of changes:
Change
proto1to operate over stdin instead of over the command line.Adds a new flag to the
proto1command,--input-file, which allows users to specify an alternate input file instead of stdin.Also, removes the command line arguments from the subcommands of
proto1.Tested with a sample setting extension:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.