Skip to content

feat(stackable-versioned)!: Automatically generate conversion roundtrip tests#1172

Open
sbernauer wants to merge 4 commits intomainfrom
feat/roundtrip-tests
Open

feat(stackable-versioned)!: Automatically generate conversion roundtrip tests#1172
sbernauer wants to merge 4 commits intomainfrom
feat/roundtrip-tests

Conversation

@sbernauer
Copy link
Member

Description

This was originally implemented back in #1050, but was removed to keep things simpler.

As I spiked a CRD conversion in secret-operator I wondered if my implementation was actually roundtrip-safe. So I remembered this follow-up task and re-added the testing infrastructure. Now the compiler will force me to find out if it is roundtrip-safe 🚀

The PR adds some testdata for all stackable-operator structs. It unsurprisingly uncovered the missing roundtrip-ability of the Person test-struct, as it changes a field, while so far only field additions are supported by the conversion tracking. I hope we don't have a CRD conversion that fails roundtrips in production yet :) This PR is here to prevent exactly that.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@sbernauer sbernauer self-assigned this Mar 11, 2026
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