-
Notifications
You must be signed in to change notification settings - Fork 262
Add flag to prefix log lines with log source (task and step name) by default #2525
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
Conversation
…default Signed-off-by: Abhishek Ghosh <abhi.ghosh3108@gmail.com>
|
Hi @abhishek-ghosh-codes. 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. DetailsInstructions 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. |
|
/lgtm |
|
/test pull-tekton-cli-integration-tests |
|
/test pull-tekton-cli-build-tests |
3135e5e to
cfca172
Compare
|
Hi @abhishek-ghosh-codes, Thanks for the pull request, and can you please add a unit test? |
a911e07 to
cfca172
Compare
Signed-off-by: Abhishek Ghosh <abhi.ghosh3108@gmail.com>
|
/retest |
|
@abhishek-ghosh-codes most of the "error" lines in the integration tests are red herrings I believe; they seem to be expected to fail but Prow doesn't render that very well. However it looks like the test diff --git c/test/e2e/pipeline/start_test.go i/test/e2e/pipeline/start_test.go
index f8ba360a5..b91b7fcce 100644
--- c/test/e2e/pipeline/start_test.go
+++ i/test/e2e/pipeline/start_test.go
@@ -78,7 +78,7 @@ func TestPipelineInteractiveStartE2E(t *testing.T) {
})
t.Run("Validate pipeline logs, with follow mode (-f) and --last ", func(t *testing.T) {
- res := tkn.Run(t, "pipeline", "logs", "--last", "-f")
+ res := tkn.Run(t, "pipeline", "logs", "--last", "-f", "--prefix=false")
expected := "\n\ntest-e2e\n\n"
helper.AssertOutput(t, expected, res.Stdout())
}) |
|
/retest-required |
Signed-off-by: Abhishek Ghosh <abhi.ghosh3108@gmail.com>
c128942 to
65e88e9
Compare
|
/retest |
1 similar comment
|
/retest |
|
/lgtm |
|
@pratap0007: changing LGTM is restricted to collaborators DetailsIn 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. |
|
/lgtm |
divyansh42
left a comment
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
|
@vinamra28 Can you please review and merge this? |
vinamra28
left a comment
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: divyansh42, vinamra28 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#2548 | [dependabot[bot]] Bump the go-docker-dependencies group with 2 updates | 2025/05/30-06:18 #2544 | [vinamra28] Update CLI docs for tkn v0.41.0 | 2025/05/30-07:58 #2525 | [Abhishek Ghosh] Add flag to prefix log lines with log source (task and step name) by default | 2025/06/05-16:57 #2525 | [Abhishek Ghosh] updated the docs | 2025/06/05-16:57 #2525 | [Abhishek Ghosh] Add unit test scripts | 2025/06/05-16:57 #2525 | [Abhishek Ghosh] Adjust pipeline logs test to align with updated output format | 2025/06/05-16:57 #2549 | [dependabot[bot]] Bump the go-docker-dependencies group with 2 updates | 2025/06/10-10:07 #2553 | [Chmouel Boudjnah] fix: update Pending color of PipelineRunPending | 2025/06/11-14:51 #2552 | [dependabot[bot]] Bump github.com/cloudflare/circl from 1.3.7 to 1.6.1 | 2025/06/13-06:33 #2556 | [divyansh42] Fix deadlock issue when following logs | 2025/06/23-17:15 null | [dependabot[bot]] Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 in /tools | 2025/06/30-07:27 Signed-off-by: vinamra28 <vinjain@redhat.com>
Changes
Added additional formatting options such as --prefix for tkn p logs, which prefixes each log line with the task name and step name to match the output format of tkn pr logs. This is done to resolve issue #2223 .
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make checkmake generatedSee the contribution guide
for more details.
Release Notes