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

Failure JSON parsing null value #5

Open
sagydr opened this issue Sep 5, 2023 · 2 comments
Open

Failure JSON parsing null value #5

sagydr opened this issue Sep 5, 2023 · 2 comments

Comments

@sagydr
Copy link

sagydr commented Sep 5, 2023

Expected variables, which weren't set (or set to null), fail on JSON parsing

@armantur
Copy link

I'm facing this issue during environment deployment. Maybe it is possible to just ignore a null value and assign empty value to the variable? For example, "" for string, and {} for JSON?

Here is an example of the error:

main.go:99: updateByName:  outputkey: kafka_broker_endpoints
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.updateByName(0x683800, {0xc000018600, 0xc00001c410, 0xf})
	/tmp/681a3b6d-cd27-49a1-a0c3-e4bfe6d5073c/env0-import-variable-plugin/main.go:115 +0x5cf
main.main()
	/tmp/681a3b6d-cd27-49a1-a0c3-e4bfe6d5073c/env0-import-variable-plugin/main.go:297 +0x1438

@away168
Copy link
Contributor

away168 commented Sep 15, 2023

@armantur Could you share what the reference string looks like? e.g. ${env0:<environment name>:<output name>}

so does this mean that the environment (environment name) you're referencing doesn't have the output value?

some more context will help me build a simple repro to better understand where I should fix the code, thx!

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

No branches or pull requests

3 participants