Skip to content

Add diagnostic checks to chartmuseum test helper script - #16900

Open
sowmya-sl wants to merge 1 commit into
openshift:mainfrom
sowmya-sl:add-logs-chartmuseum
Open

Add diagnostic checks to chartmuseum test helper script#16900
sowmya-sl wants to merge 1 commit into
openshift:mainfrom
sowmya-sl:add-logs-chartmuseum

Conversation

@sowmya-sl

@sowmya-sl sowmya-sl commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Improve reliability and debuggability of the chartmuseum startup script used in Helm backend integration tests:

  • Verify the binary can actually execute before launching (catches glibc/library incompatibility early with ldd output)
  • Check that TLS cert/key files exist before starting the server
  • Increase startup grace period from 1s to 3s
  • Print exit code and clearer log output on early termination

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

Summary by CodeRabbit

  • Bug Fixes
    • Improved ChartMuseum startup validation to detect binary execution failures earlier.
    • Added checks to ensure TLS certificates and keys are available before startup.
    • Enhanced startup failure reporting with process exit codes and log details.
    • Added diagnostic information to help identify binary compatibility issues.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c549a663-5b1c-4a68-9029-b109dafc0534

📥 Commits

Reviewing files that changed from the base of the PR and between 3207674 and 1570e76.

📒 Files selected for processing (1)
  • pkg/helm/actions/testdata/chartmuseum.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/helm/actions/testdata/chartmuseum.sh

Walkthrough

The ChartMuseum test script validates binary execution and TLS files before startup. It waits longer for startup and reports the process exit code and logs when startup fails.

Changes

ChartMuseum validation

Layer / File(s) Summary
Preflight and startup checks
pkg/helm/actions/testdata/chartmuseum.sh
The script checks ChartMuseum execution, reports ldd and file diagnostics on failure, verifies the TLS certificate and key, waits three seconds for startup, and reports the exit code and log on failure.

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

Suggested reviewers: baijum, martinszuc


Important

Pre-merge checks failed

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

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description summarizes the changes but leaves most required template sections incomplete, including root cause, testing, and reviewer information. Complete the required template sections, especially Analysis / Root cause, Solution description, Test setup, Test cases, and Reviewers and assignees; add the required Jira prefix to the title.
No-Sensitive-Data-In-Logs ❓ Inconclusive Investigation is still in progress. Inspect ChartMuseum logging inputs and generated log contents before deciding.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the diagnostic checks added to the ChartMuseum test helper script.
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.
Stable And Deterministic Test Names ✅ Passed The only changed file is a shell startup helper; the patch contains no Ginkgo test titles or dynamic test-name construction.
Test Structure And Quality ✅ Passed The PR changes only a Bash ChartMuseum helper; affected tests use standard Go Test functions, with no Ginkgo It blocks or Ginkgo structure to review.
Microshift Test Compatibility ✅ Passed The PR changes only pkg/helm/actions/testdata/chartmuseum.sh; it adds no Ginkgo e2e tests or MicroShift-sensitive API references.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only pkg/helm/actions/testdata/chartmuseum.sh; it adds no Ginkgo tests and contains no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The pull request changes only a ChartMuseum Bash test helper; it adds binary, TLS, and startup checks and introduces no deployment, controller, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR only changes chartmuseum.sh; all shell diagnostics use stderr, the binary stdout goes to a log or /dev/null, and no OTE suite entry point is added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The change set contains only pkg/helm/actions/testdata/chartmuseum.sh; it adds no Ginkgo e2e tests or external-network test behavior.
No-Weak-Crypto ✅ Passed The PR changes only ChartMuseum execution, TLS file checks, timing, and diagnostics; the diff contains no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The commit changes only chartmuseum.sh; added lines contain no privileged, hostPID/Network/IPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from baijum and martinszuc August 1, 2026 05:19
@openshift-ci openshift-ci Bot added the component/backend Related to backend label Aug 1, 2026
@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sowmya-sl

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2026

@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 `@pkg/helm/actions/testdata/chartmuseum.sh`:
- Line 17: Update the diagnostic command in the script so its output is routed
directly to stderr rather than redirecting stderr through stdout; replace the
current ldd "$BINARY" redirection while preserving the existing non-failing
behavior.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b8917bed-9342-4a0e-89f5-8cb96b8d4f9a

📥 Commits

Reviewing files that changed from the base of the PR and between ea72ab4 and 3207674.

📒 Files selected for processing (1)
  • pkg/helm/actions/testdata/chartmuseum.sh

Comment thread pkg/helm/actions/testdata/chartmuseum.sh Outdated
Improve reliability and debuggability of the chartmuseum startup
script used in Helm backend integration tests:

- Verify the binary can actually execute before launching (catches
  glibc/library incompatibility early with ldd output)
- Check that TLS cert/key files exist before starting the server
- Increase startup grace period from 1s to 3s
- Print exit code and clearer log output on early termination

Co-authored-by: Cursor <cursoragent@cursor.com>
@sowmya-sl
sowmya-sl force-pushed the add-logs-chartmuseum branch from 3207674 to 1570e76 Compare August 1, 2026 05:26
@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@sowmya-sl: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

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. component/backend Related to backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant