Skip to content

fix(config): keep extra binary defaults on partial decode - #1015

Open
magic-peach wants to merge 2 commits into
urunc-dev:mainfrom
magic-peach:fix/1010-extrabins-defaults
Open

fix(config): keep extra binary defaults on partial decode#1015
magic-peach wants to merge 2 commits into
urunc-dev:mainfrom
magic-peach:fix/1010-extrabins-defaults

Conversation

@magic-peach

Copy link
Copy Markdown

Description

LoadUruncConfig reapplies default values for a partially specified [monitors.name] section, but had no equivalent for [extra_binaries.name]. A partial extra binaries section (e.g. one that only sets path) silently lost the default options. This adds the same defaulting for extra binaries.

Related issues

How was this tested?

Added a unit test in urunc_config_test.go covering a partial [extra_binaries.virtiofsd] section that only sets path, asserting the default options value is kept. Ran go build, go vet, and go test for pkg/unikontainers, and golangci-lint run for the package, all clean.

LLM usage

none

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

A partial [extra_binaries.<name>] section zeroes the fields it
omits, dropping the seeded defaults the same way monitors used to.
Reapply them the same way.

Fixes: urunc-dev#1010
Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 074a455
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a9804da0e158700083a988f

@cmainas cmainas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hello @magic-peach ,

thank you for the PR. Just one comment to remove the unnecessary loop.

Comment thread pkg/unikontainers/urunc_config.go Outdated
Only virtiofsd is a supported extra binary today, so drop the loop
over all configured entries in favor of checking it directly, as
suggested in review.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@magic-peach
magic-peach force-pushed the fix/1010-extrabins-defaults branch from c12fea2 to 074a455 Compare September 2, 2026 11:13
@magic-peach

magic-peach commented Sep 2, 2026

Copy link
Copy Markdown
Author

Done @cmainas i replaced the loop with a direct virtiofsd check.

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.

A partial extra_binaries in urunc cofniguration loses its default values

2 participants