Skip to content

Use split candlepin containers for integration tests#22

Open
Lorquas wants to merge 1 commit into
mainfrom
split-candlepin-containers
Open

Use split candlepin containers for integration tests#22
Lorquas wants to merge 1 commit into
mainfrom
split-candlepin-containers

Conversation

@Lorquas

@Lorquas Lorquas commented Jun 11, 2026

Copy link
Copy Markdown

Summary

Updates the integration test workflow to use the new split Candlepin container images (candlepin-app + candlepin-db) instead of the monolithic candlepin-unofficial image.

Changes

  • Replace ghcr.io/candlepin/candlepin-unofficial:latest with ghcr.io/candlepin/candlepin-app:latest + ghcr.io/candlepin/candlepin-db:latest as GitHub Actions services
  • Set DB_HOST: candlepin-db on the app service so it connects to the database via the Docker service network
  • Remove --privileged from the candlepin service — the new image runs Tomcat in foreground without systemd, so privileged mode is no longer needed
  • Update readiness health check from http://candlepin:8080 to https://candlepin:8443 (the new image has working HTTPS with ML-DSA PQC certificates)

Why

The monolithic candlepin-unofficial:latest image is no longer maintained and does not build against Candlepin 4.8+ (JDK and dependency changes). The split images are built from source on UBI 10 with JDK 25 and include pre-baked test data (owners, products, yum repos) that these integration tests require.

Depends on

Test plan

  • Merge and trigger the split_image_build workflow in candlepin-container-unofficial to publish images to ghcr.io
  • Re-run this PR's CI to verify integration tests pass with the new images
  • Verify rhc connect --username admin --password admin --organization donaldduck succeeds
  • Verify productid tests can install packages from candlepin-hosted repos

@sourcery-ai

sourcery-ai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the integration test GitHub Actions workflow to use split Candlepin app and database containers instead of the legacy monolithic image, and adjusts service options and readiness checks accordingly.

File-Level Changes

Change Details Files
Switch integration test services from the monolithic Candlepin image to split app and database containers and align service options.
  • Add a postgres service using ghcr.io/candlepin/candlepin-db:latest for the database layer
  • Change the candlepin service image to ghcr.io/candlepin/candlepin-app:latest
  • Remove the --privileged flag from the candlepin service options while keeping the hostname configuration
.github/workflows/integration-tests.yml
Update the Candlepin readiness health check to target the new HTTPS endpoint on the app container. .github/workflows/integration-tests.yml

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since the readiness probe now uses curl -k to bypass TLS verification, consider adding a brief inline comment explaining why insecure mode is acceptable here (self-signed test certs, PQC setup, etc.) to prevent future confusion or accidental reuse of this pattern in non-test workflows.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the readiness probe now uses `curl -k` to bypass TLS verification, consider adding a brief inline comment explaining why insecure mode is acceptable here (self-signed test certs, PQC setup, etc.) to prevent future confusion or accidental reuse of this pattern in non-test workflows.

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.

@Lorquas Lorquas marked this pull request as draft June 11, 2026 19:56
Replace the monolithic candlepin-unofficial image with split containers:
- candlepin-app (ghcr.io/candlepin/candlepin-app) for the application
- candlepin-db (ghcr.io/candlepin/candlepin-db) as a PostgreSQL service

The DB service is named "postgres" to match the upstream Candlepin image's
db_host configuration, eliminating the need for runtime config overrides.

Assisted-by: Claude (Cursor)

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new DB service is named postgres but the description mentions DB_HOST=candlepin-db; consider either renaming the service to candlepin-db or setting DB_HOST=postgres in the candlepin app service to keep the configuration consistent and avoid connection issues.
  • The hard-coded HTTPS URL (https://candlepin:8443/candlepin/status) in the readiness check could be extracted into an environment variable or matrix value so future protocol/port changes don’t require editing the workflow logic.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new DB service is named `postgres` but the description mentions `DB_HOST=candlepin-db`; consider either renaming the service to `candlepin-db` or setting `DB_HOST=postgres` in the candlepin app service to keep the configuration consistent and avoid connection issues.
- The hard-coded HTTPS URL (`https://candlepin:8443/candlepin/status`) in the readiness check could be extracted into an environment variable or matrix value so future protocol/port changes don’t require editing the workflow logic.

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.

@jirihnidek

Copy link
Copy Markdown
Contributor

Integration tests fails, because the candlepin si not deployed. This steps fail: https://github.com/candlepin/rhsm-dnf5-plugins/blob/main/.github/workflows/integration-tests.yml#L58. It seems that candlepin was not started there properly.

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