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

allow null to be value and set as empty array #73

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

jhsinger-klotho
Copy link
Contributor

• Does any part of it require special attention?
• Does it relate to or fix any issue?

We hit this bug during the komodor sync. Essentially for any helm pass through where they are deploying a fully owned chart, we dont have any values we need to substitute in after rendering the helm chart. We expected go embed to render the empty array as [] but its rendering it as null. So if we get a null we will just flip it to []

downloaded redis helm chart and tested passthrough using that. Deployed fine

Standard checks

  • Unit tests: Any special considerations? would need a full integration test, but not very easy to do since it wont be exposed or anything
  • Docs: Do we need to update any docs, internal or public? no
  • Backwards compatibility: Will this break existing apps? If so, what would be the extra work required to keep them working? yes, bug fix

@@ -53,7 +53,7 @@ export interface EksExecUnit {
export interface HelmChart {
Name: string
Directory: string
Values: Value[]
Values: Value[] | null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you specifically want null, or is undefined okay?

If undefined is okay, then I think the more typescripty way to do this would be:

Suggested change
Values: Value[] | null
Values?: Value[]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go embed is rendering it to null, so in this case we would specifically want null. Figured its easier to make a 2 line change here than muck around with the go templating stuff

@github-actions
Copy link

Package Line Rate Health
github.com/klothoplatform/klotho/pkg/analytics 2%
github.com/klothoplatform/klotho/pkg/annotation 24%
github.com/klothoplatform/klotho/pkg/core 20%
github.com/klothoplatform/klotho/pkg/env_var 82%
github.com/klothoplatform/klotho/pkg/exec_unit 45%
github.com/klothoplatform/klotho/pkg/infra/kubernetes 58%
github.com/klothoplatform/klotho/pkg/infra/kubernetes/helm 52%
github.com/klothoplatform/klotho/pkg/input 63%
github.com/klothoplatform/klotho/pkg/lang 37%
github.com/klothoplatform/klotho/pkg/lang/dockerfile 0%
github.com/klothoplatform/klotho/pkg/lang/golang 9%
github.com/klothoplatform/klotho/pkg/lang/javascript 47%
github.com/klothoplatform/klotho/pkg/lang/python 60%
github.com/klothoplatform/klotho/pkg/lang/yaml 0%
github.com/klothoplatform/klotho/pkg/logging 7%
github.com/klothoplatform/klotho/pkg/multierr 95%
github.com/klothoplatform/klotho/pkg/provider/aws 60%
github.com/klothoplatform/klotho/pkg/runtime 75%
github.com/klothoplatform/klotho/pkg/static_unit 32%
github.com/klothoplatform/klotho/pkg/validation 73%
Summary 42% (3592 / 8582)

@jhsinger-klotho jhsinger-klotho merged commit fb2cae7 into main Jan 12, 2023
@jhsinger-klotho jhsinger-klotho deleted the helm_values_fix branch January 12, 2023 17:15
atorres-klo added a commit that referenced this pull request Aug 14, 2024
fixed a bug introduced by model reworking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants