Skip to content

fix: split BiosConfigurationSetter into map and file interfaces - #456

Merged
mergify[bot] merged 1 commit into
bmc-toolbox:mainfrom
mcanevet:fix/bios-configuration-setter-interface
Aug 18, 2026
Merged

fix: split BiosConfigurationSetter into map and file interfaces#456
mergify[bot] merged 1 commit into
bmc-toolbox:mainfrom
mcanevet:fix/bios-configuration-setter-interface

Conversation

@mcanevet

@mcanevet mcanevet commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What does this PR implement/change/remove?

BiosConfigurationSetter currently requires implementing both SetBiosConfiguration and SetBiosConfigurationFromFile. providers/redfish, providers/dell/idrac, and providers/lenovo only implement SetBiosConfiguration - the file-import path is a Dell/Supermicro-SUM-specific whole-config-blob import with no generic Redfish equivalent - so none of them satisfy the interface today. Client.SetBiosConfiguration() fails with no BiosConfigurationSetter implementations found on those providers even though the underlying call works fine.

Confirmed live against a real Supermicro AS-1114S-WN10RT-EU BMC: on current main, SetBiosConfiguration fails with not a BiosConfigurationSetter implementation: *redfish.Conn (and *lenovo.Conn) before any network request is even made; after this fix, dispatch correctly selects those providers and the request goes out.

Splits BiosConfigurationSetter (map only) from a new BiosConfigurationFileSetter (file only), dispatched independently. providers/supermicro, which implements both, is unaffected.

Also adds var _ Interface = (*Conn)(nil) compile-time assertions (the pattern already used in providers/lenovo's bmc.go/virtual_media.go/sel.go/etc., but never applied to the BIOS interfaces) to redfish, dell/idrac, lenovo, and supermicro, so this exact class of bug can't regress silently again - applying the same assertions to unmodified main fails to compile in exactly the three affected providers.

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

Any BMC reached via the generic Redfish, Dell iDRAC, or Lenovo XClarity providers. Confirmed live against Supermicro.

The HW model number, product name this change applies to (if applicable)

Confirmed live against a Supermicro AS-1114S-WN10RT-EU.

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

N/A - this is a Go interface-satisfaction bug, not firmware-dependent.

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

None.

Description for changelog/release notes

Fix BiosConfigurationSetter so the redfish, dell/idrac, and lenovo providers are recognized as implementing SetBiosConfiguration.

Requiring both SetBiosConfiguration and SetBiosConfigurationFromFile
meant redfish, dell/idrac, and lenovo never satisfied the interface,
since none of them implement the file-import path (that's a
vendor-specific whole-config-blob import only Supermicro supports).
Client.SetBiosConfiguration() failed with "no BiosConfigurationSetter
implementations found" on those providers even though
SetBiosConfiguration itself works fine.

Split into BiosConfigurationSetter (map only) and a new
BiosConfigurationFileSetter (file only), dispatched independently.
Also add the var _ Interface = (*Conn)(nil) compile-time assertions
this codebase already uses elsewhere (providers/lenovo/*.go) but never
applied to BIOS config, so this can't silently regress again.

@joelrebel joelrebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, splitting this out is ideal

@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-18 05:42 UTC · Rule: default · triggered by rule refactored queue action rule
  • Checks skipped · PR is already up-to-date
  • Merged2026-08-18 05:42 UTC · at ed10b57e755989a313dcbf6f780d8e473cb5f72c · merge

This pull request spent 12 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 1227e7e into bmc-toolbox:main Aug 18, 2026
4 of 5 checks passed
@mergify mergify Bot removed the queued label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants