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

Empower all commands to handle input to stdin #2598

Merged
merged 2 commits into from Oct 7, 2021
Merged

Empower all commands to handle input to stdin #2598

merged 2 commits into from Oct 7, 2021

Conversation

nakabonne
Copy link
Member

What this PR does / why we need it:
This PR makes it possible to pass the input to stdin to all commands.
Due to this, it renamed cli.Telemetry to cli.Input. If you think about it, originally logger isn't in the telemetry context so not odd to change. This brought flexibility to us for a variety of other inputs to be propagated to each command.

The initial reason why I looked to make this change is so that we can pass the plaintext file to pipectl encrypt command via stdin.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.83%. This pull request increases coverage by 0.00%.

File Function Base Head Diff
pkg/cli/cmd.go Input.PrometheusMetricsHandler -- 0.00% +0.00%
pkg/cli/cmd.go Input.PrometheusMetricsHandlerFor -- 0.00% +0.00%
pkg/cli/cmd.go Input.CustomMetricsHandlerFor -- 0.00% +0.00%
pkg/cli/cmd.go Telemetry.PrometheusMetricsHandler 0.00% -- +-0.00%
pkg/cli/cmd.go Telemetry.PrometheusMetricsHandlerFor 0.00% -- +-0.00%
pkg/cli/cmd.go Telemetry.CustomMetricsHandlerFor 0.00% -- +-0.00%

@nghialv
Copy link
Member

nghialv commented Oct 7, 2021

Nice extension.
/lgtm

@pipecd-bot pipecd-bot added the lgtm label Oct 7, 2021
@khanhtc1202
Copy link
Member

/approve

@nakabonne
Copy link
Member Author

Just fixed a conflict. Let me self-approve.
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.77%. This pull request increases coverage by 0.00%.

File Function Base Head Diff
pkg/cli/cmd.go Input.PrometheusMetricsHandler -- 0.00% +0.00%
pkg/cli/cmd.go Input.PrometheusMetricsHandlerFor -- 0.00% +0.00%
pkg/cli/cmd.go Input.CustomMetricsHandlerFor -- 0.00% +0.00%
pkg/app/launcher/cmd/launcher/launcher.go NewCommand 0.00% 0.00% +0.00%
pkg/app/launcher/cmd/launcher/launcher.go makePipedArgs 0.00% 0.00% +0.00%
pkg/cli/cmd.go Telemetry.PrometheusMetricsHandler 0.00% -- +-0.00%
pkg/cli/cmd.go Telemetry.PrometheusMetricsHandlerFor 0.00% -- +-0.00%
pkg/cli/cmd.go Telemetry.CustomMetricsHandlerFor 0.00% -- +-0.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants