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

Improve error message for undefined template key #1032

Merged
merged 14 commits into from
Jul 2, 2021
Merged

Improve error message for undefined template key #1032

merged 14 commits into from
Jul 2, 2021

Conversation

akankshakumari393
Copy link
Contributor

@akankshakumari393 akankshakumari393 commented Jun 21, 2021

Change Overview

Improve error message while rendering undefined template key. Currently, we get an error message " map has no entry for key "

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • K10-7240

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Error message when '{{ .ArtifactsIn.cloudObject.KeyValue.paths }}' is being rendered and paths is undefined.

time="2021-06-28T06:42:27.261951017Z" level=info msg="Failed to execute phase: v1alpha1.Phase{Name:\"pullFromBlobStore\", State:\"pending\", Output:map[string]interface {}(nil)}:" ActionSet=restore-backup-ggzfj-xbmgf File=pkg/controller/controller.go Function="github.com/kanisterio/kanister/pkg/controller.(*Controller).runAction.func1" Line=438 Phase=pullFromBlobStore cluster_name=6fe9c799-279c-4f46-bfda-c6e470080eaa error="Can't render template: key <paths> Not found" hostname=myrelease-kanister-operator-68ff8c8d54-tgp7v

@akankshakumari393 akankshakumari393 changed the title WIP: Improve error message for undefined template key Improve error message for undefined template key Jun 23, 2021
@akankshakumari393 akankshakumari393 marked this pull request as ready for review June 23, 2021 09:14
pkg/param/render.go Outdated Show resolved Hide resolved
pkg/param/render.go Outdated Show resolved Hide resolved
pkg/param/render.go Outdated Show resolved Hide resolved
pkg/param/render.go Outdated Show resolved Hide resolved
akankshakumari393 and others added 3 commits June 29, 2021 20:11
Co-authored-by: Vivek Singh <vsingh.ggits.2010@gmail.com>
pkg/param/render.go Outdated Show resolved Hide resolved
akankshakumari393 and others added 2 commits July 2, 2021 14:22
Co-authored-by: Pavan Navarathna <pavan@kasten.io>
@mergify mergify bot merged commit 7741188 into master Jul 2, 2021
@mergify mergify bot deleted the K10-7240 branch July 2, 2021 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants