-
Notifications
You must be signed in to change notification settings - Fork 107
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: unify implementations of files input 🧹 #3248
Conversation
d6bd1ae
to
63f1625
Compare
(just butting in to say that this makes the files input handling more easy to understand, and it would had made my life easier handling the Ignition stuff, so thanks!!) |
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.
Great stuff. Love how the stages cleaned up now. All is how it should be, for files inputs at least.
Rework files input implementation to support all reference types supported by the input schema. Also implement helper functions to generate supported reference types. In some cases, the reference supports e.g. referencing multiple pipelines in the stage inputs, but this is currently not implemented, since no pipeline in composer uses it. Rework the files input unit tests to cover the new functionality. Adjust all code affected by the changes made to files input. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The `FilesInputs` was since the beginning an XZ-specific implementation of the input, but it was implemented in the `files_input.go` in a false hope that it could be used as a generic stage inputs by any stages. It turned out that various stages require different implementation of its input. Specifically there is usually a stage-specific key, which has assigned a common input type. For XZ stage, the key is `file`. Remove `FilesInputs` and instead implement `XzStageInputs` which is now accepted by the XZ stage. Fix all affected pipeline implementations that use XZ stage. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as `FDOStageInput`, but instead use the one common `FilesInput` implementation and its supported references. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as `QEMUStageInput`, but instead use the one common `FilesInput` implementation and its supported references. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as `IgnitionStageInput`, but instead use the one common `FilesInput` implementation and its supported references. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as `RPMStageInput`, but instead use the one common `FilesInput` implementation and its supported references. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
63f1625
to
9bc7f40
Compare
I added comments about the |
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.
Still great :)
This PR is a pre-work to support custom files in
/etc
, because the copy stage implementation will need to be extended to support files input with origin source. Instead of implementing 6th version of it, I decided to rework files input implementation, which we wanted to do anyway (me and @achilleas-k).Rework files input implementation to support all reference types supported by the input schema. Also implement helper functions to generate supported reference types. In some cases, the reference supports e.g. referencing multiple pipelines in the stage inputs, but this is currently not implemented, since no pipeline in composer uses it.
Rework the stage inputs implementation of the following stages to use the common files input:
This rework should not have any effect on manifests produced by osbuild-composer.
This pull request includes: