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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: invoke verbose metadata #944

Merged

Conversation

lkingland
Copy link
Member

Changes

  • 馃巵 invoke -v prints metadata

HTTP headers or CloudEvent fields are printed on invoke with verbose enabled.

$ func invoke --verbose
"Content-Type":text/plain; charset=utf-8
"Date":Tue, 05 Apr 2022 14:02:10 GMT
"Content-Length":3

OK

/kind enhancement

Fixes #922

@knative-prow knative-prow bot added kind/enhancement size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 5, 2022
@knative-prow
Copy link

knative-prow bot commented Apr 5, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 5, 2022
@lkingland lkingland force-pushed the lkingland/invoke-verbose-print-headers branch from 32b42d6 to d467dd2 Compare April 5, 2022 16:29
@lkingland lkingland marked this pull request as draft April 5, 2022 16:33
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 5, 2022
@lkingland lkingland force-pushed the lkingland/invoke-verbose-print-headers branch from d467dd2 to d4f18c6 Compare April 5, 2022 16:44
@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #944 (420ed98) into main (739cded) will increase coverage by 1.98%.
The diff coverage is 37.50%.

@@            Coverage Diff             @@
##             main     #944      +/-   ##
==========================================
+ Coverage   43.85%   45.83%   +1.98%     
==========================================
  Files          55       57       +2     
  Lines        5163     7442    +2279     
==========================================
+ Hits         2264     3411    +1147     
- Misses       2576     3703    +1127     
- Partials      323      328       +5     
Impacted Files Coverage 螖
cmd/invoke.go 34.81% <0.00%> (-0.97%) 猬囷笍
invoke.go 52.99% <61.53%> (+2.99%) 猬嗭笍
client.go 61.94% <100.00%> (+2.01%) 猬嗭笍
cmd/list.go 56.25% <0.00%> (-3.40%) 猬囷笍
cmd/info.go 24.77% <0.00%> (-2.38%) 猬囷笍
function_buildtype.go 92.30% <0.00%> (-2.14%) 猬囷笍
cmd/run.go 71.42% <0.00%> (-1.30%) 猬囷笍
k8s/secrets.go 13.54% <0.00%> (-0.75%) 猬囷笍
templates.go 79.41% <0.00%> (-0.59%) 猬囷笍
instances.go 29.50% <0.00%> (-0.50%) 猬囷笍
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 6e5a2ae...420ed98. Read the comment docs.

@lkingland lkingland marked this pull request as ready for review April 5, 2022 17:13
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 5, 2022
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

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

Overall looks great, but I recommend some changes to the output for event invocation, and I've made a small suggestion for the output formatting.

invoke.go Outdated Show resolved Hide resolved
cmd/invoke.go Outdated Show resolved Hide resolved
@lkingland lkingland force-pushed the lkingland/invoke-verbose-print-headers branch 2 times, most recently from 275a73e to 5a5804b Compare April 6, 2022 12:09
@lkingland lkingland force-pushed the lkingland/invoke-verbose-print-headers branch from 5a5804b to 420ed98 Compare April 6, 2022 12:10
@lance
Copy link
Member

lance commented Apr 6, 2022

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 6, 2022
@knative-prow knative-prow bot merged commit c3c1456 into knative:main Apr 6, 2022
@lkingland lkingland deleted the lkingland/invoke-verbose-print-headers branch September 20, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to display headers with func invoke
2 participants