Skip to content

Convert extra_hosts separator from = to :#28

Merged
flowzone-app[bot] merged 1 commit into
mainfrom
extra-hosts-separator
May 26, 2026
Merged

Convert extra_hosts separator from = to :#28
flowzone-app[bot] merged 1 commit into
mainfrom
extra-hosts-separator

Conversation

@cywang117

@cywang117 cywang117 commented May 26, 2026

Copy link
Copy Markdown
Contributor

compose-go normalises extra_hosts to = separator,
however neither Moby nor balenaEngine support =, both expect :.

Change-type: patch

@cywang117 cywang117 requested a review from pipex May 26, 2026 19:35
@flowzone-app flowzone-app Bot enabled auto-merge May 26, 2026 19:40
Comment thread lib/compose.ts Outdated
}

// compose-go normalizes extra_hosts to `host=ip`, but our Engine expects `host:ip`
// even though latest Moby only supports `=`. Convert the separator back.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

the issue is the supervisor that should convert = back to :, latest moby doesn't support = either https://github.com/moby/moby/blob/ad6b80a888d3248fba66ce149f1f072487f7697b/daemon/pkg/opts/hosts.go#L152

Comment thread lib/compose.ts
path.relative(path.dirname(composeFilePath), build.context) || '.';
}

// compose-go normalizes extra_hosts to `host=ip`, but our Engine expects `host:ip`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not entirely sure this is needed on service.build, I suppose it is if extra_hosts is not processed by balena-compose either

@cywang117 cywang117 force-pushed the extra-hosts-separator branch from 80fb14e to 9f37db5 Compare May 26, 2026 19:46
compose-go normalises extra_hosts to `=` separator,
however neither Moby nor balenaEngine support =, both expect :.

Change-type: patch
@cywang117 cywang117 force-pushed the extra-hosts-separator branch from 9f37db5 to 6789778 Compare May 26, 2026 19:58
@flowzone-app flowzone-app Bot merged commit 84620a2 into main May 26, 2026
55 checks passed
@flowzone-app flowzone-app Bot deleted the extra-hosts-separator branch May 26, 2026 20:16
@cywang117

Copy link
Copy Markdown
Contributor Author

Relates to: balena-os/balena-supervisor#2524

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