knative-extensions / net-contour

A Knative ingress controller for Project Contour
Apache License 2.0
31 stars 52 forks source link

Fix nil pointer dereference error when parsing config map #1095

Closed izabelacg closed 3 months ago

izabelacg commented 3 months ago

Changes

PS: Error found while investigating issues in serving tests:

/kind bug

Release Note

Resolved a nil pointer exception triggered by the cors-policy field being set to an empty value.
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.92%. Comparing base (28e07b4) to head (67ffd7c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1095 +/- ## ======================================= Coverage 93.92% 93.92% ======================================= Files 11 11 Lines 708 708 ======================================= Hits 665 665 Misses 22 22 Partials 21 21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dprotaso commented 3 months ago

/lgtm /approve

knative-prow[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, izabelacg

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: - ~~[OWNERS](https://github.com/knative-extensions/net-contour/blob/main/OWNERS)~~ [dprotaso] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dprotaso commented 3 months ago

Was there some malformed config in the serving tests?

izabelacg commented 3 months ago

Was there some malformed config in the serving tests?

in the serving e2e script, I set the cors-policy field to empty to disable the feature, which should result in a parsing error. That's why the subsequent tests fail, since the net-contour pod enters in an error state and doesn't recover. I'm waiting on the test PR to confirm if I'm properly removing the field instead of setting it to empty

dprotaso commented 3 months ago

/cherry-pick release-1.14

knative-prow-robot commented 3 months ago

@dprotaso: new pull request created: #1096

In response to [this](https://github.com/knative-extensions/net-contour/pull/1095#issuecomment-2127111664): >/cherry-pick release-1.14 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.