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

adds finally logs in pipelinerun #1077

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

pradeepitm12
Copy link
Contributor

@pradeepitm12 pradeepitm12 commented Jul 20, 2020

closes #1054

this adds finally logs in pipelinerun logs command in follow and
non follow mode

Signed-off-by: Pradeep Kumar pradkuma@redhat.com

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 20, 2020
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 20, 2020

CLA Check
The committers are authorized under a signed CLA.

  • ✅ PRADEEP KUMAR (8b6652f2d65204eaef1ecddb5d63263c184cf799)

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 20, 2020
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@vdemeester
Copy link
Member

/retest

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

SGTM

test.AssertOutput(t, expected, output)
}

/*func TestPipelinerunLog_with_follow_mode_finally_task_v1beta1(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

We should removed this code if commented 😉

Copy link
Member

Choose a reason for hiding this comment

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

And write an e2e tests instead for it 😝

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeh 😝
Changed this to e2e

@pradeepitm12 pradeepitm12 changed the title WIP: adds finally logs in pipelinerun adds finally logs in pipelinerun Jul 21, 2020
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2020
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@pradeepitm12
Copy link
Contributor Author

/retest

@pradeepitm12
Copy link
Contributor Author

need to ignore finally related test for v0.10.0

@danielhelfand
Copy link
Member

need to ignore finally related test for v0.10.0

This is what I did in #1066:

func (e TknRunner) CheckVersion(component string, version string) bool {

And used in test:

if tkn.CheckVersion("Pipeline", "v0.10.2") {

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@pradeepitm12
Copy link
Contributor Author

need to ignore finally related test for v0.10.0

This is what I did in #1066:

func (e TknRunner) CheckVersion(component string, version string) bool {

And used in test:

if tkn.CheckVersion("Pipeline", "v0.10.2") {

Thank you:smiley: this is helpful

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

t.Logf("Creating pipelinerun in namespace: %s", namespace)
e2e.Assert(t, kubectl.Create(e2e.ResourcePath("pipelinerun-with-finally.yaml")), icmd.Success)

t.Run("Pipelinerun logs with finally "+namespace, func(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove nested t.Run:

t.Run("Pipelinerun logs with finally  "+namespace, func(t *testing.T) {
	res := tkn.Run("pipelinerun", "logs", "exit-handler", "-f")
	log := res.Stdout()
	s := []string{
		"[print-msg : main] printing a message\n",
		"[echo-on-exit : main] finally\n",
	}
	expected := strings.Join(s, "\n") + "\n"
	e2e.AssertOutput(t, expected, log)
})

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@pradeepitm12
Copy link
Contributor Author

/test pull-tekton-cli-unit-tests

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

closes tektoncd#1054

this adds finally logs in pipelinerun logs command in follow and
non follow mode

Signed-off-by: Pradeep Kumar <pradkuma@redhat.com>
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/pipelinerun/tracker.go 94.3% 84.4% -9.8

@pradeepitm12
Copy link
Contributor Author

/test pull-tekton-cli-integration-tests

@piyush-garg
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/meow

@tekton-robot
Copy link
Contributor

@vdemeester: cat image

In response to this:

/meow

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.

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2020
@tekton-robot tekton-robot merged commit bd1f342 into tektoncd:master Jul 22, 2020
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. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PipelineRun logs do not include finally task logs
5 participants