Skip to content

butane/fcos: remove duplicate cex translation registration - #2297

Open
vishnu2ko5 wants to merge 1 commit into
coreos:mainfrom
vishnu2ko5:fix-butane-cex-translation
Open

butane/fcos: remove duplicate cex translation registration#2297
vishnu2ko5 wants to merge 1 commit into
coreos:mainfrom
vishnu2ko5:fix-butane-cex-translation

Conversation

@vishnu2ko5

Copy link
Copy Markdown

Removes a redundant translation merge call in translateBootDeviceLuksCex that was causing duplicate translation registrations for the enabled field.

The function translateBootDeviceLuksCex was previously calling both translate.Prefixed and translate.MergeP for the exact same enabled field in BootDeviceLuks.Cex. This PR updates the logic to simply translate the entire Cex struct using translate.Prefixed, which is sufficient and correctly maintains the TranslationSet.

This fix is applied across all experimental and stable FCOS Butane specs that support CEX (v1_6, v1_7, and v1_8_exp), preventing incorrect path tracking and duplicate entries for CEX-enabled LUKS configurations.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 330f755a-b501-4b9c-bed6-3c1107888ea2

📥 Commits

Reviewing files that changed from the base of the PR and between 9e2b242 and 26c248d.

📒 Files selected for processing (3)
  • butane/config/fcos/v1_6/translate.go
  • butane/config/fcos/v1_7/translate.go
  • butane/config/fcos/v1_8_exp/translate.go

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Include the required Apache 2.0 license header at the top of every Go source file.
Use the project's import ordering in Go files: standard library imports, blank line, project packages, blank line, then external dependencies.
Follow the project's Go naming conventions: exported identifiers use PascalCase, unexported identifiers use camelCase, and filenames use snake_case.

Files:

  • butane/config/fcos/v1_7/translate.go
  • butane/config/fcos/v1_8_exp/translate.go
  • butane/config/fcos/v1_6/translate.go
🔇 Additional comments (3)
butane/config/fcos/v1_6/translate.go (1)

364-364: LGTM!

butane/config/fcos/v1_7/translate.go (1)

364-364: LGTM!

butane/config/fcos/v1_8_exp/translate.go (1)

363-363: LGTM!


📝 Walkthrough

Walkthrough

The FCOS v1.6, v1.7, and v1.8 experimental translators now translate the complete boot-device CEX structure instead of only its Enabled field.

Changes

CEX translation

Layer / File(s) Summary
Full CEX structure mapping
butane/config/fcos/v1_6/translate.go, butane/config/fcos/v1_7/translate.go, butane/config/fcos/v1_8_exp/translate.go
Each translator uses one prefixed call to map the complete Cex structure under the cex path. The separate enabled-field merge was removed.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 26c24

This is a small, localized cleanup of duplicate CEX translation registration across three supported specs, with no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: prestist

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required subsystem format, lowercase description, imperative mood, and no trailing period.
Description check ✅ Passed The description accurately explains the duplicate CEX translation registration fix and identifies all affected FCOS specifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Commit Message Convention ✅ Passed The PR has one non-merge commit: butane/fcos: remove duplicate cex translation registration. It uses a valid subsystem, starts with lowercase imperative remove, and has no period.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant