-
Notifications
You must be signed in to change notification settings - Fork 57
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
blueprints: (optionally) include blueprint repos in 2nd depsolve #1218
base: main
Are you sure you want to change the base?
Conversation
91728e2
to
8e9fc73
Compare
8e9fc73
to
eb07964
Compare
Indeed, the |
Yeah, it's a bit tricky. The obvious thing to do is to add a configuration with a repository in the blueprint to We could do something a bit "silly". If you look at the test repository configurations, some of them have these image_type_tags, which limits the use of a repository to just those image types that are listed. This is done so that we don't use, for example, |
+1 It used to be much worse - duplication for every RHEL major version 😅 We can unify Fedora and RHEL. The code can be written to support the super-set of all features. It does not matter if there are bits specific to RHEL-7, that Fedora does not use. |
I have two proposals:
Both are pretty straightforward. EPEL repo would be usable only for a specific version of RHEL major version, so COPR is the most universal approach. |
I was re-thinking my comment and had a similar thought. A custom repo with 2-3 dummy packages would be useful for all sorts of tests actually. We could use it for quick and dirty depsolve tests for example in all our projects, like in osbuild-composer where we create one locally each time. EDIT: Elaborating on the "2-3 packages" part: If we make packages with dependencies, it would be a nice, simple depsolver test repo too. |
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.
Nice and simple. I've added two (or really just one) suggestions...
// When set the repository will be used during the depsolve of | ||
// payload repositories | ||
EnabledDuringBuild bool `json:"enabled_during_build" toml:"enabled_during_build"` |
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.
Nitpick: would maybe suggest active form enable_during_built
or something shorter such as install_from
. I can live with the current name as well 😅
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.
I have no strong opinion here, I like your suggested and used install_from
now as it is shorter but I'm open for more ideas (I had a hard time picking a good name)
@@ -76,6 +80,17 @@ func (rc *RepositoryCustomization) getFilename() string { | |||
return rc.Filename | |||
} | |||
|
|||
func RepoCustomizationsFilterEnabledDuringBuild(repos []RepositoryCustomization) []RepositoryCustomization { |
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.
Would it make sense to return ([]rpmmd.RepoConfig, error)
from the function (basically just calling .customRepoToRepoConfig()
on the repo)? Calling RepoCustomizationsToRepoConfigAndGPGKeyFiles()
seems to do much more than just conversion and the resulting []*fsnode.File
is always discarded for these repos.
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.
Thanks, that is a nice one - much simpler this way
This commit allows to (optionally) include the custom repositories from the blueprints as part of the depsolving when installing the user packages. Thanks to Ondrej for suggesting this.
This commit moves the TestManifestRepositoryCustomization into the distro package to avoid the previous duplication. The test location is not ideal, but either we duplicate this test in rhel/imagetype_test.go and fedora/imagetype_test.go or we have one version here that has knowledge about the details of how images types are implemented in {fedroa,rhel}/imagetype.go (i.e. how workloads and payload repos get added during the imagetype.Manifest() call).
49b43b0
to
7b373aa
Compare
This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes. This is simply a notice. It will not block this PR from being merged. |
This commit allows to (optionally) include the custom repositories from the blueprints as part of the depsolving when installing the user packages.
I'm a bit unsure about the best way to go about a full end-to-end test, I'm not super familiar with the existing integration test scripts in "images", I was thinking to do the full end-to-end test with image-builder-cli but maybe that is silly, ideas very welcome.
The amount of duplication in between rhel/fedora in the pkg/distro is also something I'm not happy about but it seems that is the current design but I would love to get back to this and see we can do something about it.
Thanks to Ondrej for raising this.