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

dnfjson: skip sbom tests with dnf5 #1017

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

achilleas-k
Copy link
Member

dnfjson: add Solver string to DepsolveResult

The solver string is returned from the depsolver with the response and
identifies the solver library that was used. Currently, it is either
dnf or dnf5.

Returning it with the DepsolveResult can be useful for reproducibility
and troubleshooting.


dnfjson: skip sbom tests with dnf5

SBOMs are not yet supported when using the dnf5 solver in
osbuild-depsolve-dnf. Running the test on Fedora 41, which uses dnf5 by
default, makes the test fail.

Sniff the solver used using a quick, simple depsolve to get the result,
and skip any SBOM tests if the solver is dnf5.


The solver string is returned from the depsolver with the response and
identifies the solver library that was used.  Currently, it is either
dnf or dnf5.

Returning it with the DepsolveResult can be useful for reproducibility
and troubleshooting.
SBOMs are not yet supported when using the dnf5 solver in
osbuild-depsolve-dnf.  Running the test on Fedora 41, which uses dnf5 by
default, makes the test fail.

Sniff the solver used using a quick, simple depsolve to get the result,
and skip any SBOM tests if the solver is dnf5.
@achilleas-k achilleas-k requested review from mvo5 and thozza November 6, 2024 18:59
Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to get the tests working on Fedora 41 again however I feel like we might want a more 'official' approach to get the solver-in-use than a fake depsolve in the future :)

@mvo5 mvo5 added this pull request to the merge queue Nov 7, 2024
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this.

I'm OK with this being a temporary workaround to make tests pass on F41. However, This made me think about a few things:

  1. Should the test case not explicitly configure the solver.json and test SBOM support only with DNF4 (and later with DNF5)? Alternatively, whether the decision to choose the DNF version should not be left up to the caller if it specifies it in the request.
  2. Using DNF5 by default for our depsolving is not a good idea, even on F41. The implementation is still WIP AFAICT and does not support essential use cases. So people may experience regressions on F41+ on-prem image builds, depending on what they are doing.

Merged via the queue into osbuild:main with commit 5134c8b Nov 7, 2024
17 of 19 checks passed
@achilleas-k achilleas-k deleted the test/skip-dnf5-sbom branch November 7, 2024 09:38
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.

4 participants