From 850d91182cbe4e54bfa1b5c01a201bb8c13731e9 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 19 May 2024 14:01:04 +0300 Subject: [PATCH] chore(error): clear up error message (#803) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes https://github.com/truecharts/charts/issues/21072 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Co-authored-by: Kjeld Schouten --- library/common/Chart.yaml | 2 +- library/common/templates/values/_validate.tpl | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 26713585..75584dcc 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -15,7 +15,7 @@ maintainers: name: common sources: null type: library -version: 23.0.5 +version: 23.0.6 annotations: artifacthub.io/category: "integration-delivery" artifacthub.io/license: "BUSL-1.1" diff --git a/library/common/templates/values/_validate.tpl b/library/common/templates/values/_validate.tpl index a6edc079..d4c52c59 100644 --- a/library/common/templates/values/_validate.tpl +++ b/library/common/templates/values/_validate.tpl @@ -12,7 +12,14 @@ {{/* Ideally we would want to extract the error only, but because it usually contains ":", It gets parsed as dict and it cant regex matched it afterwards */}} - {{- fail (printf "Chart - Values contain an error that may be a result of merging. Values containing the error: \n\n %v \n\n See error above values." $allValues) -}} + {{- fail (printf "%s \n %s \n\n %s \n %v \n %s \n\n %s" + "Chart - Values contain an error that may be a result of merging. Make sure you don't have any invalid YAML characters starting a value." + "Renderd Values containing the error:" + "=============================================================================================" + $allValues + "=============================================================================================" + "See error above values." + ) -}} {{- end -}} {{- end -}}