Skip to content

fix: improve error handling for empty clusters#51

Merged
rm3l merged 3 commits intoredhat-developer:mainfrom
rm3l:fix/fix_confusing_warnings_in_output_with_jq
Jan 13, 2026
Merged

fix: improve error handling for empty clusters#51
rm3l merged 3 commits intoredhat-developer:mainfrom
rm3l:fix/fix_confusing_warnings_in_output_with_jq

Conversation

@rm3l
Copy link
Member

@rm3l rm3l commented Jan 13, 2026

  • gather_helm: Check if standalone_dir exists before running find command
    to avoid pipeline failure due to set -o pipefail
  • gather_operator: Check if Backstage CRD exists before querying CRs and
    validate JSON output before parsing with jq to prevent parse errors
  • common.sh: Only log ERR trap messages in debug/trace mode to avoid
    confusing users with expected failures (e.g., resource not found)

These changes fix misleading error messages when running must-gather
on clusters without RHDH installed.

Description

Which issue(s) does this PR fix or relate to

  • Fixes #issue_number

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

@github-actions
Copy link

- gather_helm: Check if standalone_dir exists before running find command
  to avoid pipeline failure due to set -o pipefail
- gather_operator: Check if Backstage CRD exists before querying CRs and
  validate JSON output before parsing with jq to prevent parse errors
- common.sh: Only log ERR trap messages in debug/trace mode to avoid
  confusing users with expected failures (e.g., resource not found)

These changes fix misleading error messages when running must-gather
on clusters without RHDH installed.
@rm3l rm3l force-pushed the fix/fix_confusing_warnings_in_output_with_jq branch from fc3f7bb to 50009d6 Compare January 13, 2026 16:30
@github-actions
Copy link

rm3l added 2 commits January 13, 2026 18:32
- Operator CRs: Wait for pods to be Running instead of CR Deployed condition
- Standalone Helm: Wait for Running phase instead of Ready condition
- PostgreSQL: Wait for Running phase instead of Ready condition
- Increase timeouts from 60s to 120s for pod discovery

This makes E2E tests more resilient by not requiring pods to be fully
Ready (which depends on readiness probes passing). Just Running is
sufficient for must-gather to collect data.
- Move replicas:2 from StatefulSet CR to Deployment CR for better test coverage
- Wait for both pods to be Running before proceeding
- Update validation to expect 2 replicas for Deployment CR, 1 for StatefulSet CR
- Update process validation to check for expected replica count
@github-actions
Copy link

@rm3l rm3l merged commit 02ff544 into redhat-developer:main Jan 13, 2026
6 checks passed
@rm3l rm3l deleted the fix/fix_confusing_warnings_in_output_with_jq branch January 13, 2026 17:51
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.

1 participant