Skip to content

Use pod replace in ibutsu-pod.sh#848

Merged
mshriver merged 1 commit into
ibutsu:mainfrom
mshriver:pod-replace
May 18, 2026
Merged

Use pod replace in ibutsu-pod.sh#848
mshriver merged 1 commit into
ibutsu:mainfrom
mshriver:pod-replace

Conversation

@mshriver
Copy link
Copy Markdown
Contributor

@mshriver mshriver commented May 18, 2026

Summary by Sourcery

Update ibutsu pod management script to use replaceable containers, modernize the Postgres image, and improve backend startup failure diagnostics.

Enhancements:

  • Enable podman --replace flag for all ibutsu pod service containers to allow seamless recreation without manual cleanup.
  • Upgrade the Postgres container image from registry.redhat.io/rhel8/postgresql-12 to postgresql-15 in the pod script.
  • Add a timeout and diagnostic logging when waiting for the backend to start, failing fast with container logs if startup exceeds the limit.

Copilot AI review requested due to automatic review settings May 18, 2026 08:45
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 18, 2026

Reviewer's Guide

Adds podman --replace semantics to all ibutsu pod services, upgrades the Postgres container image from 12 to 15, and introduces a timeout with diagnostic logging when waiting for the backend to become ready.

Flow diagram for backend readiness wait with timeout

flowchart TD
    A[Start waiting for backend] --> B[Set BACKEND_WAIT = 0]
    B --> C[Set BACKEND_TIMEOUT = 600]
    C --> D{curl to backend succeeds?}
    D -->|Yes| H[Backend up]
    D -->|No| E[Sleep 2s]
    E --> F[BACKEND_WAIT = BACKEND_WAIT + 2]
    F --> G{BACKEND_WAIT >= BACKEND_TIMEOUT?}
    G -->|Yes| I[Print error and ibutsu-backend logs]
    I --> J[Exit 1]
    G -->|No| D
Loading

File-Level Changes

Change Details Files
Ensure all podman-managed containers in the ibutsu pod are replaceable by name to avoid conflicts from previous runs.
  • Add the --replace flag to podman run invocations for postgres, redis, backend (image and dev modes), worker (image and dev modes), scheduler (image and dev modes), flower (image and dev modes), and frontend (image and dev modes)
  • Retain existing --rm semantics so containers are removed on stop while allowing name reuse between runs
scripts/ibutsu-pod.sh
Update the Postgres image used by the pod to a newer major version.
  • Change the Postgres container image reference from registry.redhat.io/rhel8/postgresql-12 to registry.redhat.io/rhel8/postgresql-15
scripts/ibutsu-pod.sh
Improve robustness and debuggability of backend startup by enforcing a timeout and printing container logs on failure.
  • Introduce BACKEND_WAIT and BACKEND_TIMEOUT variables to track how long the script waits for the backend health endpoint
  • Extend the curl-based wait loop to increment the wait counter, enforce a 600s timeout, and on timeout print ibutsu-backend logs before exiting with a non-zero status
scripts/ibutsu-pod.sh

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

Co-authored-by: Claude <noreply@anthropic.com>
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 reviewed your changes and they look great!


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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the scripts/ibutsu-pod.sh Podman-based dev environment script to make container startup more repeatable and to fail faster when the backend doesn’t become reachable.

Changes:

  • Add podman run --replace across services to avoid name-collision failures on reruns.
  • Add a backend readiness wait loop with a 10-minute timeout and log dump on failure.
  • Bump the PostgreSQL container image from rhel8/postgresql-12 to rhel8/postgresql-15.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/ibutsu-pod.sh
Comment thread scripts/ibutsu-pod.sh
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.44%. Comparing base (fdf00eb) to head (afa444a).

❌ Your project check has failed because the head coverage (73.44%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #848   +/-   ##
=======================================
  Coverage   73.44%   73.44%           
=======================================
  Files         154      154           
  Lines        7562     7562           
  Branches      662      662           
=======================================
  Hits         5554     5554           
  Misses       1788     1788           
  Partials      220      220           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdf00eb...afa444a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mshriver mshriver merged commit 3058525 into ibutsu:main May 18, 2026
14 of 15 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