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

Adding encoding flag and support for base64 data #1388

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

vyasgun
Copy link
Contributor

@vyasgun vyasgun commented Jul 15, 2021

Description

Adding encoding option to specify base64 or text values. Adding support for base64 data through CLI

Changes

  • Adding encoding option to specify the type of encoding of data.
  • Adding code to identify automatically (without any encoding option specified) if given data is base64 encoded or not and setting the relevant field in PingSourceSpec.
  • Adding a test case to cover these scenarios.

Reference

Fixes #1204

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@vyasgun: 1 warning.

In response to this:

Description

Adding encoding option to specify base64 or text values. Adding support for base64 data through CLI

Changes

  • Adding encoding option to specify the type of encoding of data.
  • Adding code to identify automatically (without any encoding option specified) if given data is base64 encoded or not and setting the relevant field in PingSourceSpec.
  • Adding a test case to cover these scenarios.

Reference

Fixes #

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -175,6 +175,11 @@ func (b *PingSourceBuilder) Data(data string) *PingSourceBuilder {
return b
}

func (b *PingSourceBuilder) DataBase64(data string) *PingSourceBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: exported method PingSourceBuilder.DataBase64 should have comment or be unexported. More info.

@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 15, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 15, 2021
@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #1388 (02cfb7c) into main (3860312) will increase coverage by 0.02%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1388      +/-   ##
==========================================
+ Coverage   76.48%   76.51%   +0.02%     
==========================================
  Files         160      160              
  Lines        8215     8234      +19     
==========================================
+ Hits         6283     6300      +17     
- Misses       1227     1229       +2     
  Partials      705      705              
Impacted Files Coverage Δ
pkg/sources/v1beta2/ping_client.go 80.00% <0.00%> (-2.54%) ⬇️
pkg/kn/commands/source/ping/create.go 85.96% <100.00%> (+5.47%) ⬆️
pkg/kn/commands/source/ping/flags.go 60.56% <100.00%> (+0.56%) ⬆️

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 3860312...02cfb7c. Read the comment docs.

@vyasgun
Copy link
Contributor Author

vyasgun commented Jul 15, 2021

Looking into the failed integration tests.

@vyasgun
Copy link
Contributor Author

vyasgun commented Jul 15, 2021

/retest

@dsimansk dsimansk closed this Jul 15, 2021
@dsimansk dsimansk reopened this Jul 15, 2021
@vyasgun
Copy link
Contributor Author

vyasgun commented Jul 16, 2021

/retest

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/source/ping/create.go 87.1% 90.2% 3.1
pkg/kn/commands/source/ping/flags.go 56.9% 57.7% 0.8
pkg/sources/v1beta2/ping_client.go 90.0% 87.1% -2.9

Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

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

Thanks @vyasgun! There're some nits to polish, otherwise it looks really good.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, vyasgun

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 19, 2021
@knative-prow-robot knative-prow-robot merged commit e26d5f2 into knative:main Jul 19, 2021
@dsimansk
Copy link
Contributor

@vyasgun ups I missclicked on approved review instread of require changes. :)
Can you please follow up on my review comments in the next PR.

@vyasgun
Copy link
Contributor Author

vyasgun commented Jul 20, 2021

@dsimansk Thanks for the review! I will open another PR for update command with these comments addressed.

@vyasgun
Copy link
Contributor Author

vyasgun commented Jul 20, 2021

@dsimansk I have addressed the comments in #1392

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. cla: yes Indicates the PR's author has signed the CLA. 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.

Add dataBase64 flag for Ping Source
4 participants