oci: standardize flashable artifact and annotation contracts#14
Conversation
Replace scattered string-matching with two formal abstractions: - FlashableArtifact enum: central registry of supported disk image media types (raw, qcow2, simg) across both automotive and embedded prefixes. Replaces ad-hoc starts_with() checks in layer selection and flash validation. - AnnotationSchema struct: configurable annotation key resolution for multi-partition extraction. Ships GENERIC (dev.jumpstarter.fls/*) and AUTOMOTIVE (automotive.sdv.cloud.redhat.com/*) presets with auto-detection. Replaces hardcoded automotive annotation keys. Assisted-by: claude-opus-4.6 Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
📝 WalkthroughWalkthroughThis PR introduces a pluggable annotation schema system to replace hardcoded automotive OCI annotation key constants, and abstracts disk image format detection via a new ChangesConfigurable OCI annotation schemas and flashable artifact abstraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Actionable comments posted: 0 |
Replace scattered string-matching with two formal abstractions:
FlashableArtifact enum: central registry of supported disk image media types (raw, qcow2, simg) across both automotive and embedded prefixes. Replaces ad-hoc starts_with() checks in layer selection and flash validation.
AnnotationSchema struct: configurable annotation key resolution for multi-partition extraction. Ships GENERIC (dev.jumpstarter.fls/) and AUTOMOTIVE (automotive.sdv.cloud.redhat.com/) presets with auto-detection. Replaces hardcoded automotive annotation keys.
Fixes #12