-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove the use of go.uber.org/zap in entrypoint's dependent packages and uses log/slog #8544
base: main
Are you sure you want to change the base?
Remove the use of go.uber.org/zap in entrypoint's dependent packages and uses log/slog #8544
Conversation
/kind-cleanup |
b4c40b2
to
d2c70d5
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/test check-pr-has-kind-label |
@PuneetPunamiya: The specified target(s) for
The following commands are available to trigger optional jobs:
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. |
/retest |
/test check-pr-has-kind-label |
@PuneetPunamiya: The specified target(s) for
The following commands are available to trigger optional jobs:
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 |
/kind cleanup |
The following is the coverage report on the affected files.
|
@@ -311,7 +307,8 @@ func (e Entrypointer) Go() error { | |||
resultPath = e.ResultsDirectory | |||
} | |||
if err := e.readResultsFromDisk(ctx, resultPath, result.TaskRunResultType); err != nil { | |||
logger.Fatalf("Error while handling results: %s", err) | |||
slog.Error("Error while substituting step artifacts: ", slog.Any("error", err)) | |||
return err |
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'm curious why log.Fatalf
is replaced with logger.Fatalf
in other places, but why are slog.Error
used in these two instances?
@@ -237,10 +233,10 @@ func (e Entrypointer) Go() error { | |||
var cancel context.CancelFunc | |||
if err == nil { | |||
if err := e.applyStepResultSubstitutions(pipeline.StepsDir); err != nil { | |||
logger.Error("Error while substituting step results: ", err) | |||
slog.Error("Error while substituting step results: ", slog.Any("error", err)) |
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.
nit: Can the spaces at the end of the log be removed?
11834ef
to
d2c70d5
Compare
The following is the coverage report on the affected files.
|
/retest |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
d2c70d5
to
12aba0a
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
cmd/entrypoint/main.go
Outdated
// featureFlags "github.com/tektoncd/pipeline/pkg/apis/config" | ||
//"github.com/tektoncd/pipeline/pkg/apis/pipeline" | ||
v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/types" | ||
// "github.com/tektoncd/pipeline/pkg/credentials" | ||
// "github.com/tektoncd/pipeline/pkg/credentials/dockercreds" | ||
// "github.com/tektoncd/pipeline/pkg/credentials/gitcreds" |
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.
Why are these commented out? If they need to be removed, please do so instead of commenting them.
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 think this is temporary (to check the zap symbols) ? @PuneetPunamiya
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.
Yeah it's temporary thingy, I'm working on the patch, will keep the pr on hold for now
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.
Ah, got it, sorry I didn't realise 🙏
/hold |
12aba0a
to
2ab503d
Compare
The following is the coverage report on the affected files.
|
Signed-off-by: PuneetPunamiya <[email protected]>
2ab503d
to
2088751
Compare
The following is the coverage report on the affected files.
|
Fixes: #8531 (one part of the issue)
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes