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

Bugfixes #841

Merged
merged 3 commits into from
Oct 9, 2023
Merged

Bugfixes #841

merged 3 commits into from
Oct 9, 2023

Conversation

Diaphteiros
Copy link
Contributor

How to categorize this PR?

/area quality
/kind enhancement
/priority 3

What this PR does / why we need it:
Fixes two small bugs:

  1. The input formatter, which is used to build error messages for errors during templating called reflect.TypeOf(val).String(), which caused the landscaper to crash if val was nil.
  2. The default value for deployitem/dataobject/target imports was an empty struct. While this probably doesn't matter when using GoTemplate (because it is text-based), this caused problems for Spiff templates without any DeployItems, because the default value was not overwritten and Spiff can't handle the empty struct when building the YAML tree. Changing the default from an empty struct to an empty map solved the problem and is also 'more correct', since all three keys hold objects (json-wise), which are represented as maps in Go. I assume that this issue went unnoticed due to Spiff being rarely used.

Release note:

Fixed a nil pointer exception that could occur during construction of the error message for a failed templating execution.
Fixed a bug which could occur when rendering exports with `Spiff` while not having any DeployItems.

@Diaphteiros Diaphteiros requested a review from a team as a code owner September 29, 2023 11:55
@gardener-robot gardener-robot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension priority/3 Priority (lower number equals higher priority) needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Sep 29, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 29, 2023
@Diaphteiros Diaphteiros merged commit 6764b27 into gardener:master Oct 9, 2023
@Diaphteiros Diaphteiros deleted the fixes branch October 9, 2023 12:36
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review priority/3 Priority (lower number equals higher priority) size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants