Skip to content

Conversation

cgwalters
Copy link
Member

apidoc: Quiet many warnings

Should have done this long ago, this greatly reduces the spam
in the terminal logs from builds.


dockerignore: Add

This ensures we don't pick up things we shouldn't from the source.


ci: Updates for centos builds

  • Do the modern way to enable the buildroot with crb and epel

tests/libtest: Just use python as a webserver if no libsoup

We only have a very few tests that actually need what
we have in ostree-trivial-httpd that supports things like serving
random 500 errors etc.

If we don't have libsoup, then just use a python webserver.


Copy link

@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.

Hello @cgwalters, 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!

Summary of Changes

Hello! Gemini here, providing a summary of this pull request titled "A few buildsystem fixes". This PR bundles several distinct improvements and fixes related to the project's build system, CI setup, documentation generation, and test infrastructure. The main goals are to quiet documentation build warnings, add a .dockerignore file for cleaner Docker builds, update the CentOS CI configuration to use a more modern approach for enabling necessary repositories (CRB and EPEL), and enhance the test suite's web server handling to optionally use a simple Python server if the dedicated ostree-trivial-httpd is not available.

Highlights

  • Documentation Warnings: Includes a change to the API documentation configuration (apidoc/ostree-docs.xml) which is intended to reduce the number of warnings generated during the documentation build process.
  • Docker Ignore File: Adds a new .dockerignore file to prevent unnecessary files and directories (like build artifacts and lock files) from being included in the Docker build context.
  • CentOS CI Updates: Modifies the CI scripts (ci/installdeps.sh and ci/libbuild.sh) to update how dependencies and build environments are set up on CentOS, specifically enabling the CodeReady Linux Builder (CRB) and EPEL repositories using modern dnf commands.
  • Test Webserver Flexibility: Refactors the test helper script (tests/libtest.sh) to introduce a common function for starting a web server (run_webserver). This new function can fall back to using a simple Python HTTP server if the OSTREE_HTTPD variable (presumably pointing to ostree-trivial-httpd) is not set, making tests more robust in environments without the dedicated server.

Changelog

Click here to see the changelog
  • .dockerignore
    • Added a new file to specify paths to ignore during Docker builds, including Dockerfile, target/, and Cargo.lock.
  • apidoc/ostree-docs.xml
    • Added an include for xml/annotation-glossary.xml (line 44), likely to address documentation build warnings.
  • ci/installdeps.sh
    • Added installation of ccache (line 19).
    • Removed old CentOS-specific logic for installing EPEL and python34 (lines 30-33).
  • ci/libbuild.sh
    • Updated the CentOS buildroot setup logic to use dnf install dnf-utils, dnf config-manager --enable crb, and dnf install epel{,-next}-release (lines 43-45).
  • tests/libtest.sh
    • Added set +x to run_exit_cmds (line 46) and libtest_cleanup_gpg (line 766) to quiet verbose output during test cleanup.
    • Introduced a new function run_webserver (lines 288-306) to standardize starting a web server for tests.
    • Modified run_webserver to use a Python webserver (webserver.py) if the OSTREE_HTTPD environment variable is not set (lines 293-299).
    • Refactored setup_fake_remote_repo1 (line 339), setup_fake_remote_repo2 (line 382), and setup_fake_remote_repo_httpd_only (line 546) to use the new run_webserver function instead of directly invoking ${OSTREE_HTTPD}.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


Builds fail, tests break,
CI scripts need a shake.
Fixes bundled here,
Making things more clear,
Less noise for goodness sake.

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.

Copy link

@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 introduces several valuable fixes and updates to the build system and test infrastructure. The changes align well with the description, addressing API documentation warnings, adding a .dockerignore file, updating CentOS build dependencies, and improving the test webserver logic. The code is generally clear and follows established patterns within the project. Good work!

Summary of Findings

  • CentOS Dependency Update: The removal of CentOS 7 specific dependency installation (python34) in ci/installdeps.sh is a functional change in the CI environment, dropping explicit support for an older OS version in favor of newer methods in ci/libbuild.sh. This aligns with the PR's goal but represents a change in the supported test matrix.

Merge Readiness

The pull request addresses build system and test infrastructure improvements. The changes are well-explained and appear correct for their intended purpose. There are no critical or high severity issues identified. The changes related to CentOS dependencies seem appropriate for updating the CI environment to newer versions. The pull request appears ready to be merged. I am unable to approve the pull request directly; please have other reviewers review and approve this code before merging.

@cgwalters cgwalters force-pushed the update-dockerfile-prep branch 2 times, most recently from f5d807c to f52fd90 Compare June 2, 2025 22:00
@cgwalters cgwalters force-pushed the update-dockerfile-prep branch 2 times, most recently from 44b804d to 6889dac Compare June 3, 2025 12:30
cgwalters added 7 commits June 3, 2025 10:21
Should have done this long ago, this greatly reduces the spam
in the terminal logs from builds.

Signed-off-by: Colin Walters <walters@verbum.org>
It's way too noisy.

Signed-off-by: Colin Walters <walters@verbum.org>
This ensures we don't pick up things we shouldn't from the source.

Signed-off-by: Colin Walters <walters@verbum.org>
- Do the modern way to enable the buildroot with crb and epel

Signed-off-by: Colin Walters <walters@verbum.org>
This blends better with docker builds where we have a blanket
ignore of `target` in .dockerignore.

Right now we use git.mk to generate .gitignore and autotools
drop stuff all over the place.

Signed-off-by: Colin Walters <walters@verbum.org>
Otherwise there's a lot of test spam.

Signed-off-by: Colin Walters <walters@verbum.org>
Noticed in drive by.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the update-dockerfile-prep branch from 6889dac to 2b7dba7 Compare June 3, 2025 14:21
@cgwalters cgwalters enabled auto-merge June 3, 2025 14:51
@cgwalters cgwalters disabled auto-merge June 3, 2025 18:17
@cgwalters
Copy link
Member Author

cgwalters commented Jun 3, 2025

/override ci/prow/fcos-e2e
Seems like this is stalled

Copy link

openshift-ci bot commented Jun 3, 2025

@cgwalters: Overrode contexts on behalf of cgwalters: ci/prow/fcos-e2e

In response to this:

/override ci/prow/fcos-e2e

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@cgwalters cgwalters enabled auto-merge June 3, 2025 18:18
Copy link

openshift-ci bot commented Jun 3, 2025

@cgwalters: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/fcos-e2e 2b7dba7 link true /test fcos-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jmarrero
Copy link
Member

jmarrero commented Jun 3, 2025

/test fcos-e2e

Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@cgwalters cgwalters disabled auto-merge June 3, 2025 22:04
@cgwalters cgwalters merged commit c6dbd92 into ostreedev:main Jun 3, 2025
24 of 25 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