-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osbuild: simplify containers_input.go #349
osbuild: simplify containers_input.go #349
Conversation
It's an interesting change. As far as I know it is idiomatic Go to custom type things like these and have an interface for if you ever want to put other stuff in there. However, that only needs to be done when we have other things. |
There's a lot of stupid stuff in the osbuild package in this repo and most of it is from (sometimes, if not often, incorrect) mirroring of the osbuild schema and its flexibility. In this case, the reference for containers input is an interface because inputs in osbuild can (but in the case of containers don't) have multiple schemas. It's also possible for stages to define extra properties for their inputs, though I think we don't do this (though all inputs in osbuild have Anyway. I agree with this change. No need to complicate things unnecessarily. Let's merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's add it to the queue after #348 is added.
1f2de0e
to
41fae22
Compare
We need to drop the first commit here since the stage filename has been renamed in the other PR that just got merged. |
While writing tests to ensure the that the `ContainerDeployInputs` generates the correct json I noticed that this was more involved than I had hoped and it seems there are some indirections in the code that may not be necessary. I removed them and IMHHO the code is now a bit more direct and easier to read.
41fae22
to
f9e388b
Compare
[only the second commit is new in this PR]
While writing tests to ensure the that the
ContainerDeployInputs
generates the correct json I noticed that this was more involved
than I had hoped and it seems there are some indirections in the
code that may not be necessary. I removed them and IMHHO the code
is now a bit more direct and easier to read.
Feedback very welcome!
Build on top of #348 (as I wanted the unit tests from it).