Skip to content

[do not merge] Simpletest ci/cd#963

Closed
dougsland wants to merge 2 commits intomainfrom
simpletest
Closed

[do not merge] Simpletest ci/cd#963
dougsland wants to merge 2 commits intomainfrom
simpletest

Conversation

@dougsland
Copy link
Copy Markdown
Member

@dougsland dougsland commented Jan 26, 2026

Summary by Sourcery

Update libkrun installation to use Fedora rawhide repositories when appropriate and make a minor README heading adjustment.

Enhancements:

  • Adjust libkrun install script to optionally enable Fedora rawhide repos, print repo configuration, and install libkrun, crun-krun, and libkrunfw using host config.
  • Disable the CentOS-specific conditional around repository enabling in the libkrun check script.

Documentation:

  • Rename the top-level README heading text.

fixes Internal(Vm(SetMemoryAttributes(Error(22)))) issue.
libkrun 1.17 includes the issue but currently it's in rawhide only.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jan 26, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the libkrun installation script to pull packages from Fedora rawhide on Fedora-based systems and adds some debug output, plus a minor README heading change.

File-Level Changes

Change Details Files
Modify libkrun installation to use Fedora rawhide repos and updated dnf options for installing libkrun-related packages.
  • Add Fedora-detection logic via /etc/os-release to conditionally install fedora-repos-rawhide into the QM rootfs
  • Add debug commands to print repo configuration inside the QM rootfs and list all dnf repos using host reposdir
  • Change dnf install invocation to use host config, rawhide releasever, enable rawhide repo, and include libkrunfw in the installed packages
  • Leave a commented-out conditional block that would call enable_repo only on CentOS, while still unconditionally calling enable_repo
tests/qm-kvm-test/libkrun/check_libkrun.sh
Update README main heading text.
  • Rename the main markdown heading from 'Topics' to 'Topicstest' while keeping the rest of the document structure intact
README.md

Possibly linked issues

  • #QM libkrun tests c9s: PR updates libkrun test installer to fetch libkrun/libkrunfw/crun-krun, implementing the requested QM libkrun test setup.
  • #QM Subpackages: test kvm: PR updates libkrun install in qm-kvm test, directly contributing to keeping the documented KVM setup working.
  • #QM kvm automation spike: PR updates qm-kvm test libkrun installation within QM, directly supporting the KVM automation spike requirements.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @dougsland, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily refines the installation process for libkrun and crun-krun, particularly for Fedora environments, by leveraging the rawhide repository to resolve a specific virtual machine error. It also streamlines the main setup script by removing these packages from a general installation command, indicating a shift towards more specialized handling. A minor, likely test-related, textual change was also made in the README.md file.

Highlights

  • libkrun Installation Logic Update: The check_libkrun.sh script has been updated to specifically handle libkrun and crun-krun installation on Fedora systems. This now involves conditionally installing fedora-repos-rawhide and using the rawhide repository for dnf install to address a known Vm(SetMemoryAttributes(Error(22))) error.
  • Setup Script Refinement: The main setup script has been streamlined by removing libkrun and crun-krun from its general dnf install command. This suggests a more targeted or specialized installation approach for these packages, now handled within the test script.
  • Minor Documentation Adjustment: A small, likely test-related, textual change was made in README.md, altering the main heading from "# Topics" to "# Topicstest".

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dougsland dougsland changed the title Simpletest [do not merge] Simpletest ci/cd Jan 26, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The README heading was renamed to # Topicstest but the table-of-contents link still points to #topics, which will break the anchor; either revert the heading or adjust the link target to match.
  • The install_libkrun function now always installs libkrun from rawhide (--releasever=rawhide --enablerepo=rawhide), which may not exist or be appropriate on non-Fedora systems; consider gating the rawhide-specific flags behind the same Fedora check or a separate configuration knob.
  • The new exec_cmd "cat /usr/lib/qm/rootfs/etc/yum.repos.d/*" and dnf repolist calls add a lot of noisy output to the test logs; if these are only for debugging, consider guarding them with a verbosity/debug flag or removing them before merging.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The README heading was renamed to `# Topicstest` but the table-of-contents link still points to `#topics`, which will break the anchor; either revert the heading or adjust the link target to match.
- The `install_libkrun` function now always installs `libkrun` from rawhide (`--releasever=rawhide --enablerepo=rawhide`), which may not exist or be appropriate on non-Fedora systems; consider gating the rawhide-specific flags behind the same Fedora check or a separate configuration knob.
- The new `exec_cmd "cat /usr/lib/qm/rootfs/etc/yum.repos.d/*"` and `dnf repolist` calls add a lot of noisy output to the test logs; if these are only for debugging, consider guarding them with a verbosity/debug flag or removing them before merging.

## Individual Comments

### Comment 1
<location> `README.md:1` </location>
<code_context>
-# Topics
+# Topicstest

 - [Topics](#topics)
</code_context>

<issue_to_address>
**issue (bug_risk):** Heading text likely contains a typo and now mismatches the table-of-contents anchor link.

The new heading `# Topicstest` looks accidental and now conflicts with the TOC link `#topics`, so the anchor will break. Please update the heading (e.g. back to `# Topics` or the intended text) and align the TOC link text/anchor with it.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread README.md
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates the libkrun installation logic, particularly for Fedora rawhide environments within the check_libkrun.sh test script, and makes a minor adjustment to the README.md heading. The changes in check_libkrun.sh introduce conditional installation of fedora-repos-rawhide and install libkrun, crun-krun, and libkrunfw using rawhide repositories. However, the removal of libkrun and crun-krun from the main setup script might be an oversight if these are core dependencies, and the unconditional call to enable_repo in check_libkrun.sh might lead to incorrect repository enablement on non-CentOS systems.

Comment thread setup
fi

cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} libkrun crun-krun bluechi-agent ${EXTRA_FLAG}"
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} bluechi-agent ${EXTRA_FLAG}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The libkrun and crun-krun packages have been removed from this dnf install command in the main setup script. If these are core dependencies for QM, they should be installed by the primary setup script. While check_libkrun.sh now installs them, that is a test script, not the main installer. This could lead to missing dependencies for a full QM setup if libkrun is expected to be present by default.

Suggested change
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} bluechi-agent ${EXTRA_FLAG}"
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} libkrun crun-krun bluechi-agent ${EXTRA_FLAG}"

Comment on lines +31 to +33
#if grep -qi "^ID=centos" /etc/os-release; then
# enable_repo
#fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The conditional block for enabling the CentOS-specific libkrun COPR repository was commented out, but the enable_repo function is still called unconditionally at line 35. The enable_repo function specifically targets centos-stream-9-$(arch). This means that if this script is run on a Fedora system, it will attempt to enable a CentOS COPR repo, which is likely incorrect and could lead to errors or unexpected behavior. The enable_repo call should remain conditional based on the OS ID.

Suggested change
#if grep -qi "^ID=centos" /etc/os-release; then
# enable_repo
#fi
if grep -qi "^ID=centos" /etc/os-release; then
enable_repo
fi

Comment thread README.md
@@ -1,4 +1,4 @@
# Topics
# Topicstest
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The change from # Topics to # Topicstest appears to be a typo. Please correct this to the intended heading.

Suggested change
# Topicstest
# Topics

# Adding rawhide as 1.17 fixes Internal(Vm(SetMemoryAttributes(Error(22))))
# See-Also: https://github.com/containers/qm/pull/959
if grep -qi "^ID=fedora" /etc/os-release; then
# Need the remove as soon the land in stable channel
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The comment # Need the remove as soon the land in stable channel indicates a temporary solution. It would be beneficial to track this as a proper TODO or issue in the project's issue tracker to ensure it's addressed when libkrun 1.17 lands in a stable channel.

@dougsland dougsland closed this Jan 26, 2026
@dougsland dougsland deleted the simpletest branch January 26, 2026 21:17
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.

1 participant