Skip to content

Coerce env var values to empty string#23

Merged
flowzone-app[bot] merged 1 commit into
mainfrom
coerce-null-env-vars
May 11, 2026
Merged

Coerce env var values to empty string#23
flowzone-app[bot] merged 1 commit into
mainfrom
coerce-null-env-vars

Conversation

@cywang117

Copy link
Copy Markdown
Contributor

Upstream API doesn't accept null/undefined for
env var values, so we coerce to empty string just
as balena-compose <=v7 (prior to compose-parser integration) did.

Change-type: patch

@flowzone-app flowzone-app Bot enabled auto-merge May 6, 2026 19:02
@cywang117

Copy link
Copy Markdown
Contributor Author

/rebase

@git-basejump git-basejump Bot force-pushed the coerce-null-env-vars branch from fcbaf4e to a68e83c Compare May 6, 2026 19:56
environment:
EXPLICIT_VALUE: hello
EXPLICIT_EMPTY: ""
NULL_DICT_FORM: null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we should add an UNDEFINED_FORM: which is also accepted by compose. Weirdly docker-compose removes explicit fields defined with null but I saw that is not the same behavior of compose-go

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IMPLICIT_NULL_DICT_FORM: already covers the undefined case, but I renamed it to UNDEFINED_FORM: for clarity.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I apologize, I don't know how I missed that 🤦🏼‍♂️

@cywang117 cywang117 force-pushed the coerce-null-env-vars branch from a68e83c to f21b4c8 Compare May 11, 2026 18:26
@cywang117

Copy link
Copy Markdown
Contributor Author

/rebase

Upstream API doesn't accept null/undefined for
env var values, so we coerce to empty string just
as balena-compose <=v7 (prior to compose-parser integration) did.

Change-type: patch
@git-basejump git-basejump Bot force-pushed the coerce-null-env-vars branch from f21b4c8 to 1aad1a2 Compare May 11, 2026 18:30
@flowzone-app flowzone-app Bot merged commit 9f164bc into main May 11, 2026
55 checks passed
@flowzone-app flowzone-app Bot deleted the coerce-null-env-vars branch May 11, 2026 18:39
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