-
Notifications
You must be signed in to change notification settings - Fork 253
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
Making taskrun logs interactive. #491
Making taskrun logs interactive. #491
Conversation
Related issue is tektoncd#263
Hi @16yuki0702. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package list |
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 wanted to define it pkg/helper/taskrun/taskrun.go
at first,
but pkg/helper/taskrun/taskrun.go
already imported github.com/tektoncd/cli/pkg/cmd/taskrun
to using taskrun's logreader, logwriter.
so this is a workaround to avoid cycle importing.
(I think it would be better extracting logreader
, logwriter
to common utility packages later!)
/ok-to-test |
The following is the coverage report on pkg/.
|
/retest |
1 similar comment
/retest |
@16yuki0702 Issues with integration tests are unrelated to your changes. We're digging into it now. |
/test pull-tekton-cli-integration-tests |
pkg/helper/options/logs_test.go
Outdated
@@ -143,6 +172,9 @@ func TestLogOptions_Ask(t *testing.T) { | |||
if opts.PipelineRunName != tp.want.PipelineRunName { | |||
t.Errorf("unexpected PipelineRunName") | |||
} | |||
if opts.TaskrunName != tp.want.TaskrunName { | |||
t.Errorf("unexpected TaskRunName") |
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.
t.Errorf("unexpected TaskRunName") | |
t.Errorf("Unexpected TaskRun name") |
pkg/helper/taskrun/list/list_test.go
Outdated
t.Run(tp.name, func(t *testing.T) { | ||
got, err := GetAllTaskRuns(tp.params, metav1.ListOptions{}, 5) | ||
if err != nil { | ||
t.Errorf("unexpected Error") |
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.
t.Errorf("unexpected Error") | |
t.Errorf("Unexpected error") |
} | ||
} else { | ||
if err != nil { | ||
t.Errorf("unexpected Error") |
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.
t.Errorf("unexpected Error") | |
t.Errorf("Unexpected error") |
pkg/helper/options/logs_test.go
Outdated
prompt: htest.PromptTest{ | ||
CmdArgs: []string{}, | ||
Procedure: func(c *goexpect.Console) error { | ||
if _, err := c.ExpectString("Select taskrun :"); err != nil { |
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.
if _, err := c.ExpectString("Select taskrun :"); err != nil { | |
if _, err := c.ExpectString("Select taskrun:"); err != nil { |
Can you remove the space before :
and also in the associated code in Ask
? There may also be other tests that are affected.
Thank you for addressing it and reviews! |
The following is the coverage report on pkg/.
|
/retest |
/test pull-tekton-cli-unit-tests |
Umm... where is error detail page 🤔 |
@16yuki0702 The two unit tests that are failing are notoriously flaky running as part of the CI. We're going to be looking into the cause soon, but your changes aren't the issue. /test pull-tekton-cli-unit-tests |
Oh... I got it, thanks!! |
/test pull-tekton-cli-unit-tests |
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.
Thanks @16yuki0702!
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielhelfand, vdemeester 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 |
Changes
Related issue is #263
adding interactive menu to taskrun logs.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make docs
andmake man
if needed.make check
See the contribution guide
for more details.
Release Notes