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

promoting webhook service name in the logger #3741

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

pritidesai
Copy link
Member

@pritidesai pritidesai commented Feb 2, 2021

Changes

I came across this NOTE while troubleshooting #3206.

The NOTE has reference to issue in knative eventing which is fixed now: knative/eventing#4530

We already have a configuration in webhook.yaml to configure service name and defaulting to tekton-pipelines-webhook if not specified.

Now, instead of hardcoding "webhook-pipeline", reading it from the env if specified to be consistent.

Please note that the webhook logs will now have the consistent service name in the logs, i.e. "logger":"tekton-pipelines-webhook.*" or the name specified in WEBHOOK_SERVICE_NAME env. variable instead of "logger":"webhook-pipeline.*"

e.g.

Before:

{"level":"info","ts":"2021-02-02T01:23:41.115Z","logger":"webhook-pipeline.ValidationWebhook","caller":"controller/controller.go:530","msg":"Reconcile succeeded","commit":"9751b95","knative.dev/traceid":"ddfcbe3c-5efb-42fe-a171-bac521072674","knative.dev/key":"validation.webhook.pipeline.tekton.dev","duration":0.0131361}

After:

{"level":"info","ts":"2021-02-02T01:23:41.115Z","logger":"tekton-pipelines-webhook.ValidationWebhook","caller":"controller/controller.go:530","msg":"Reconcile succeeded","commit":"9751b95","knative.dev/traceid":"ddfcbe3c-5efb-42fe-a171-bac521072674","knative.dev/key":"validation.webhook.pipeline.tekton.dev","duration":0.0131361}

/kind misc

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)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Promoting webhook service name in the logger instead of always defaulting to "webhook-pipeline". The service name is read from the env. variable `WEBHOOK_SERVICE_NAME` if specified else defaults to "tekton-pipelines-webhook"

Instead of hardcoding "webhook-pipeline", reading it from the env if
specified to be consistent.

The webhook logs will now have the consistent service name in the logs,
i.e. "logger":"tekton-pipelines-webhook.*" or the name specified in
WEBHOOK_SERVICE_NAME env. variable instead of "logger":"webhook-pipeline.*"
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Feb 2, 2021
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 2, 2021
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Nice, thank you!
/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

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 Feb 2, 2021
@ghost
Copy link

ghost commented Feb 2, 2021

/lgtm

@tekton-robot tekton-robot assigned ghost Feb 2, 2021
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2021
@tekton-robot tekton-robot merged commit 01286cf into tektoncd:master Feb 2, 2021
@pritidesai
Copy link
Member Author

This change partially fixed #2987

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. kind/misc Categorizes issue or PR as a miscellaneuous one. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants