Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send payload to stdin #706

Merged
merged 4 commits into from
Mar 17, 2020
Merged

Send payload to stdin #706

merged 4 commits into from
Mar 17, 2020

Conversation

Szabadember
Copy link
Contributor

Send payload to stdin instead of providing it as an environmental variable to overcome the 20kB limit

@Szabadember Szabadember requested a review from a team March 13, 2020 14:06
@Szabadember Szabadember self-assigned this Mar 13, 2020
@ghost ghost requested review from lpusok and removed request for a team March 13, 2020 14:07
plugins/run.go Outdated
@@ -132,6 +132,12 @@ func runPlugin(plugin Plugin, args []string, pluginInput PluginInput) error {
return err
}

var payload []byte = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var payload []byte = nil
var payload []byte

Copy link
Contributor

@lpusok lpusok Mar 13, 2020

Choose a reason for hiding this comment

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

lpusok
lpusok previously approved these changes Mar 13, 2020
@lpusok lpusok requested a review from godrei March 13, 2020 16:24
plugins/run.go Outdated
@@ -132,6 +132,12 @@ func runPlugin(plugin Plugin, args []string, pluginInput PluginInput) error {
return err
}

var payload []byte
Copy link
Contributor

Choose a reason for hiding this comment

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

instead, I suggest to modify the runPlugin method -> func runPlugin(plugin Plugin, args []string, envs map[string]string, input []byte) error.

current pluginInput contains configuration for the plugin run -> env
input would be the data to be sent on the plugin command's stdin

it would make clear what input threated how, this change will need you to modify RunPluginByEvent as well, to distinguish plugin configs (envs) and the payload (input).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if we should differentiate between envs and stdin here. We should discuss this

@Szabadember Szabadember requested a review from godrei March 17, 2020 10:11
@godrei godrei merged commit 5c433e0 into master Mar 17, 2020
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.

3 participants