-
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
reporegistry: do not prepend repositories
in confPaths
#1179
Conversation
This commit changes cmd/composer to use the `reporegistry.New` call again. This is a preparation for osbuild/images#1179 And undoes parts of osbuild#4378 but that is no longer necessary because in osbuild/images#946 the error is now passed on from `reporegistry.New()` in the same way as from `LoadRepositories()`.
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.
The idea of the change looks good to me, but the code needs some fixes for tests to pass...
This commit changes cmd/composer to use the `reporegistry.New` call again. This is a preparation for osbuild/images#1179 And undoes parts of #4378 but that is no longer necessary because in osbuild/images#946 the error is now passed on from `reporegistry.New()` in the same way as from `LoadRepositories()`.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
58d5ea2
to
afe4cc0
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 changes `reporegistry.New()` to take a new parameter `repoConfigFS []fs.FS`. With that we can unexport the public `LoadAllRepositories{,FromFS}` as the only user for those is `composer` and that can simply use `.New()`. Note that we could also change `New()` to just take a single `repoConfig []fs.FS` but the downside of this is that the error reporting becomes more awkward, i.e. to report what paths where configured would (probably) require to build them manually via `fs.FS.Open(".").Stat().Name()` (but I have not tested this).
This commit breaks the API by changing the confPaths loading in reporegistry to stop prepending `repositories/`. This makes it easier to use this interface in e.g. `cmd/build`. Note that this requires changes in the upstream projecs, notably osbuild-composer and image-builder-cli.
afe4cc0
to
6191f47
Compare
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
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.
This looks OK to me, thanks.
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit re-export the `LoadAllRepositories` helper. It was unexported in osbuild#1179 but that was a bit premature as it is still required for advanced use-cases like osbuild/image-builder-cli#113
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This PR changes the API for reporegistry in two incompatible
ways. The important change is that we want to drop the
prepending of
repositories
when loading from confPaths.Doing this on its own has the disadvantage of breaking
the API without breaking the builds. So this includes a
small tweak to allow adding repos via fs.FS directly
which will mean the code in ibcli will become simpler:
And for composer it will just be adding a
nil
to the New()call.
Note that this also allows us to unexport the LoadAllRepositories
repository loading as this is only used by composer or ibcli.
reporegistry: do not prepend
repositories
in confPathsThis commit breaks the API by changing the confPaths loading
in reporegistry to stop prepending
repositories/
. This makesit easier to use this interface in e.g.
cmd/build
.Note that this requires changes in the upstream projecs, notably
osbuild-composer and image-builder-cli.
This commit changes
reporegistry.New()
to take a new parameterrepoConfigFS []fs.FS
. With that we can unexport the publicLoadAllRepositories{,FromFS}
as the only user for those iscomposer
and that can simply use.New()
.