stratis-storage/stratis-cli

Automate selection of interfaces in update_introspection_data

mulkieran opened this issue · 2 comments

Right now there's a chunk of code that the user has to edit in order to choose the correct interfaces. It's marked with EDIT. We want to let our script choose the correct interfaces by reading the introspection data and choosing the most recent revision.

Ideally, this script would then be runnable in CI, because the user does not need to do any editing.

We should also probably pick up the idempotency problem when we do this, as edits will definitely intersect.

We have one additional thing to consider: the plan for the revisions numbers is to boost them all to the same value as the release minor number, regardless if anything changed. If that plan is implemented first, then the revision numbers can be obtained very directly. That is, it might make more sense just to read the version of stratisd, decide the revision number for all interfaces by extracting the minor version, and if a stratisd interface with that revision number is not found, report an error and quit. Very direct if we do it that way.

Ok. We'll read the version, determine the expected revision numbers and complain if they don't match, for CI. For use, we'll also spew out the introspection data. We can move script to stratisd and make it part of non-rust tests on Jenkins. We can still run it easily enough for stratis-cli from there.