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

🌱 Log error when calling a Runtime Extension gets an error that is ignored because of failure policy #11028

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

tsuzu
Copy link
Contributor

@tsuzu tsuzu commented Aug 7, 2024

What this PR does / why we need it:

  • Log an error when Lifecycle Hook Runtime Extension fails while we set Ignore as Failure Policy.
    • I want the error to be on logs even if ignored for investigation.
E0808 14:00:07.430045       1 client.go:349] "ignoring error calling extension handler because of FailurePolicy \"Ignore\"" err="http call failed: Post \"https://test-extension-webhook-service.test-extension-system.svc:443/hooks.runtime.cluster.x-k8s.io/v1alpha1/beforeclustercreate/before-cluster-create?timeout=10s\": dial tcp 10.96.93.238:443: connect: connection refused" controller="topology/cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/capi-quickstart" namespace="default" name="capi-quickstart" reconcileID="8dc4c6bd-f70b-4179-bc80-0df5afcfbf6c" hook="BeforeClusterCreate" extensionHandler="before-cluster-create.test-runtime-sdk-extensionconfig" hook="BeforeClusterCreate"

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Aug 7, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @tsuzu!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 7, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @tsuzu. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@tsuzu
Copy link
Contributor Author

tsuzu commented Aug 7, 2024

/area logging

@k8s-ci-robot k8s-ci-robot added area/logging Issues or PRs related to logging and removed do-not-merge/needs-area PR is missing an area label labels Aug 7, 2024
@sbueringer sbueringer changed the title Log error when Lifecycle Hook Runtime Extension returns an error 🌱 Log error when Lifecycle Hook Runtime Extension returns an error Aug 7, 2024
@sbueringer
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2024
@sbueringer sbueringer changed the title 🌱 Log error when Lifecycle Hook Runtime Extension returns an error 🌱 Log error when calling Runtime Extensions gets an error that is ignored because of failure policy Aug 8, 2024
@sbueringer sbueringer changed the title 🌱 Log error when calling Runtime Extensions gets an error that is ignored because of failure policy 🌱 Log error when calling a Runtime Extension gets an error that is ignored because of failure policy Aug 8, 2024
@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

@sbueringer
Copy link
Member

/cherry-pick release-1.8

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5131e99f5b43600bcdce40ba0dc580662435640a

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8f31a86 into kubernetes-sigs:main Aug 8, 2024
35 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Aug 8, 2024
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #11031

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

rajankumary2k pushed a commit to rajankumary2k/cluster-api that referenced this pull request Aug 12, 2024
🌱 Log error when calling a Runtime Extension gets an error that is ignored because of failure policy
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. area/logging Issues or PRs related to logging cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants