-
Notifications
You must be signed in to change notification settings - Fork 23
[kn-source-github] first version of the kn-source-github plugin #46
base: main
Are you sure you want to change the base?
Conversation
Includes: * create, update, delete, list commands * first version of unit tests * first version of integration tests Missing: * more integration tests. Especially verifying setup of eventing source * make IT independent of github user * resolve vendor as per new fashion
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maximilien 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
plugins/source-github/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
Show resolved
Hide resolved
plugins/source-github/vendor/github.com/russross/blackfriday/v2/README.md
Show resolved
Hide resolved
@@ -0,0 +1,42 @@ | |||
/* | |||
Copyright 2019 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect copyright year:
Copyright 2019 The Knative Authors | |
Copyright 2020 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
if err != nil { | ||
fmt.Fprintln(os.Stdout, err) | ||
os.Exit(1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format Go code:
} | |
} | |
} |
/hold |
@daisy-ycguo: The
Use In response to this:
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. |
/test all |
assert.NilError(t, err) | ||
|
||
t.Log("kn-source_github create 'source-name' with 'sink-name'") | ||
e2eTest.ghSourceCreate(t, r, "source-name", "sink-name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder where did you create the sink sink-name
. I run test locally, and it reported:
$ kn source_github create source-name --sink sink-name --namespace kne2etests0 --namespace kne2etests0
f.KnSourceParams(): &types.KnSourceParams{KnParams:commands.KnParams{Output:io.Writer(nil), KubeCfgPath:"", ClientConfig:(*clientcmd.DeferredLoadingClientConfig)(0xc0000ec640), NewServingClient:(func(string) (v1.KnServingClient, error))(0x1eb7e20), NewSourcesClient:(func(string) (v1alpha2.KnSourcesClient, error))(0x1eb7ea0), NewEventingClient:(func(string) (v1alpha1.KnEventingClient, error))(0x1eb7f20), NewDynamicClient:(func(string) (dynamic.KnDynamicClient, error))(0x1eb7fa0), LogHTTP:false, fixedCurrentNamespace:""}, SinkFlag:flags.SinkFlags{sink:"sink-name"}}
panic: runtime error: invalid memory address or nil pointer dereference
I think it is because that sink-name
is not created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there is a way to set required flags, because kn source_github create source-name --sink sink-name --namespace kne2etests0
shall report error because no GitHub source parameters is provided, logically speaking.
@maximilien Hello, dr.max. Currently, the integration test runs nothing, because you don't have an |
Thanks @daisy-ycguo will do. |
@maximilien: PR needs rebase. 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. |
@maximilien: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Includes:
Missing:
Fixes #10 and #34