Skip to content
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

manifestgen: pass missing repoConfig to preManifest.Serialize() #50

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Jan 7, 2025

When depsolve is run it returns a list of packageSpecs and the matching repository config. This repo config is different/distinct from the repository config that is passed into depsolve via the package sets or the repositories that are loaded via the reporegistry and needs to be passed into manifest.Serialize().

The key different is that the depsovle repoConfig contains the repo.Id that match the packageSpec.RepoId. With those two matching IDs we can use librepo (see osbuild PR#1974) to infere what mirror to use for what package.

This commit now passes the correct repoConfig into preManifest.Serialize() now.

No test (sorry!) as this is really hard to test in isolation, there is nothing observable today from repoConfig and it is impossible to add a "witness" pipelien that could check that the right argument is passed in pipeline.serializeStart(). So until we refactor images you will have to take my word for this (sorry again).

Alternatively we could only merge once librepo is available, then the issue becomes apparent as nothing will work without this (i.e. there it will be tested implicitly)

@mvo5 mvo5 requested review from achilleas-k and supakeen January 7, 2025 12:33
When depsolve is run it returns a list of packageSpecs and the
matching repository config. This repo config is different/distinct
from the repository config that is passed into depsolve via the
package sets or the repositories that are loaded via the
reporegistry and needs to be passed into `manifest.Serialize()`.

The key different is that the depsovle `repoConfig` contains
the repo.Id that match the packageSpec.RepoId. With those two
matching IDs we can use librepo (see osbuild PR#1974) to infere
what mirror to use for what package.

This commit now passes the correct repoConfig into
preManifest.Serialize() now.

No test (sorry!) as this is really hard to test in isolation, there
is nothing observable today from repoConfig and it is impossible
to add a "witness" pipelien that could check that the right argument
is passed in `pipeline.serializeStart()`. So until we refactor
images you will have to take my word for this (sorry again).
@supakeen supakeen force-pushed the fix-manifestgen-repoconfig branch from 72dc8a2 to 70b03c6 Compare January 10, 2025 13:39
@supakeen supakeen added this pull request to the merge queue Jan 10, 2025
Merged via the queue into osbuild:main with commit 4f1816c Jan 10, 2025
18 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants