fix: revert string parsing in configmap to not trim spaces#3211
fix: revert string parsing in configmap to not trim spaces#3211Cali0707 wants to merge 1 commit into
Conversation
Signed-off-by: Calum Murray <cmurray@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707 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 |
|
/assign @dprotaso @evankanderson |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3211 +/- ##
==========================================
- Coverage 74.63% 74.61% -0.03%
==========================================
Files 209 209
Lines 12022 12022
==========================================
- Hits 8973 8970 -3
- Misses 2770 2772 +2
- Partials 279 280 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Can you clarify the problem more? The trim'ing just trims leading and trailing whitespace |
Yeah, the issue we are seeing in eventing is that there are configmaps with data that looks like: "channel-template-spec": "\tapiVersion: Foo/v1\n\tkind: Bar\n"And since we trim the whitespace the "value" becomes: "apiVersion: Foo/v1\tkind: Bar\n"Resulting in an error that Essentially, the problem is that if we try to use |
|
This honestly might be more of an issue with the fixture string in the test |
|
I think I'd prefer eventing just make their own parser func to handle this YAML scenario. The alternative would be to have all this extra validation everywhere. We'd have to trim the strings for whitespace then check if it's empty. |
That's fair, I'll close this then /close |
|
@Cali0707: Closed this PR. 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-sigs/prow repository. |
In #3200 we switched the configmap parser to trim spaces in strings. Unfortunately, this has broken the parsing of configmaps with multi-line embedded yamls in downstream repos like eventing (see failures in knative/eventing#8618). This PR reverts the change
Changes