Skip to content

payload-snapshot: surface podman stderr on RPMDB extraction failure - #667

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
petr-muller:rpmdb-in-snapshot
Aug 3, 2026
Merged

payload-snapshot: surface podman stderr on RPMDB extraction failure#667
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
petr-muller:rpmdb-in-snapshot

Conversation

@petr-muller

@petr-muller petr-muller commented Aug 3, 2026

Copy link
Copy Markdown
Member

RpmdbCollector previously swallowed subprocess stderr/exit codes when podman commands failed (e.g. reading image-references, create/cp), leaving only an unhelpful "failed to ..." warning with no diagnostic detail.

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability of container-based payload snapshots.
    • Added clearer diagnostics for failed commands, timeouts, startup issues, and RPM database extraction problems.
    • Improved handling of container operations and image-reference processing to reduce snapshot failures.
  • Chores

    • Updated the CI plugin version to 0.0.79 across marketplace and documentation listings.

@openshift-ci
openshift-ci Bot requested review from kasturinarra and zaneb August 3, 2026 11:23
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5ba3b933-59d5-4de8-99d1-8703de6cc874

📥 Commits

Reviewing files that changed from the base of the PR and between 7f0ca05 and 0071a2b.

📒 Files selected for processing (1)
  • plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py

Walkthrough

The payload snapshot now reports Podman failures, validates process results during RPMDB extraction, includes payload tags in logs, and removes temporary containers. CI plugin metadata is updated from 0.0.78 to 0.0.79.

Changes

CI payload snapshot

Layer / File(s) Summary
Podman execution and RPMDB collection
plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py
_run_podman returns CompletedProcess results and logs failures. RPMDB extraction validates exit codes, reads image references from stdout, includes payload tags in logs, and attempts container cleanup.

CI plugin version synchronization

Layer / File(s) Summary
Version metadata
.claude-plugin/marketplace.json, docs/index.html, plugins/ci/.claude-plugin/plugin.json
The CI plugin version changes from 0.0.78 to 0.0.79 in marketplace, documentation, and manifest metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RpmdbCollector
  participant PodmanRunner
  participant Podman
  RpmdbCollector->>PodmanRunner: Run RPMDB extraction commands
  PodmanRunner->>Podman: Execute Podman command
  Podman-->>PodmanRunner: Return CompletedProcess
  PodmanRunner-->>RpmdbCollector: Return result and diagnostics
  RpmdbCollector->>Podman: Remove extraction container
Loading

Possibly related PRs

Suggested reviewers: zaneb, kasturinarra


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No Assumed Git Remote Names ❌ Error The changed payload-snapshot skill contains git fetch origin at line 820 without discovering the remote name first. Discover the temporary clone's remote with git remote -v or git remote and use the discovered name instead of hardcoding origin.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: exposing Podman stderr when RPMDB extraction fails.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed The PR adds only version metadata and Podman/RPMDB implementation text; added-line scans found no real-person names or style-reference language.
Git Push Safety Rules ✅ Passed The aggregate PR diff adds no git push, force-push, or main/master push commands; it changes only version metadata and payload-snapshot Python.
No Untrusted Mcp Servers ✅ Passed The commit changes only RPMDB payload logging and collector wiring; the diff adds no MCP references, server dependencies, package installs, or external MCP sources.
Ai-Helpers Overlap Detection ✅ Passed The PR changes a Python script and metadata only; no modified path matches plugins//commands/.md, plugins//skills//SKILL.md, or agents/*.md.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py`:
- Around line 1377-1386: Update the cleanup in the finally block of the podman
operation to inspect the return code from podman rm and log cleanup failures,
including exceptions. Ensure cleanup failure after a successful podman cp
follows an explicit policy and prevents the surrounding collection flow from
reporting success or writing .complete, while preserving the existing timeout
and startup-error handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e2a14e3b-67a0-4a74-9743-a722751b81c3

📥 Commits

Reviewing files that changed from the base of the PR and between cc0d7b8 and 8c161f6.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/ci/.claude-plugin/plugin.json
  • plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py

Comment thread plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py Outdated
RpmdbCollector previously swallowed subprocess stderr/exit codes when
podman commands failed (e.g. reading image-references, create/cp),
leaving only an unhelpful "failed to ..." warning with no diagnostic
detail.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py`:
- Around line 1391-1393: Update the TimeoutExpired handling in _extract_rpmdb
and _run_podman to read and normalize e.stderr whether it is bytes or str, log
it when non-empty, and retain the existing timeout failure behavior. Add
regression coverage verifying partial stderr is logged for both data types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9aff6f62-9c7c-4f5a-b6ba-551251abcbbe

📥 Commits

Reviewing files that changed from the base of the PR and between 8c161f6 and 991df5d.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/ci/.claude-plugin/plugin.json
  • plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/ci/.claude-plugin/plugin.json

Comment thread plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py Outdated
_extract_rpmdb hand-rolled the same log-exit-code/stderr/timeout/OSError
pattern three times across nested try/except blocks. Have _run_podman
return the CompletedProcess and do the logging once, so callers just
check .returncode.
RpmdbCollector runs one instance per payload in the chain, concurrently
across worker threads. Its per-variant log lines only named the RHCOS
variant (e.g. "rhel-coreos: rpmdb.sqlite extracted"), so interleaved
output from multiple payloads was indistinguishable. Thread the
payload's chain tag through, matching the pattern JUnitCollector
already uses.

@smg247 smg247 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2026
@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller, smg247

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit e5724b4 into openshift-eng:main Aug 3, 2026
6 checks passed
@petr-muller
petr-muller deleted the rpmdb-in-snapshot branch August 3, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants