Skip to content

feat(prow-job): add JIRA export feature for test failure analysis - #321

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift-eng:mainfrom
wangke19:feat/prow-job-jira-export
Feb 13, 2026
Merged

openshift-merge-bot[bot] merged 2 commits into
openshift-eng:mainfrom
wangke19:feat/prow-job-jira-export

Conversation

@wangke19

@wangke19 wangke19 commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds JIRA export capability to /prow-job:analyze-test-failure using the OCPBUGS issue template format.

Changes

1. JIRA Export with User Prompt

After analysis completes, the user is prompted:

Question: "Analysis complete! Would you like to export this to JIRA format?"
Options:
  - "Yes - Export to JIRA (OCPBUGS format)"
  - "No - Skip JIRA export"

If the user chooses "Yes", a JIRA-formatted file is generated using the OCPBUGS template.

2. OCPBUGS Format Template

The JIRA export uses the standard Red Hat OCPBUGS bug template:

Description of problem:
[Test failure summary]

Version-Release number of selected component (if applicable):
[OpenShift version]

How reproducible:
[Based on test history]

Steps to Reproduce:
1. Run Prow CI job: [job-name]
2. Execute test: [test-name]
3. [Specific conditions]

Actual results:
[Error messages, stack traces]
{noformat}
[Stack trace or error output]
{noformat}

Expected results:
[Test should pass]

Additional info:
[Correlation analysis, timeline, cluster diagnostics]

Job Details:
- Job URL: [link]
- Build ID: {{build_id}}
- Test artifacts: {{path}}

Root Cause Analysis:
[Detailed analysis]

Benefits:

  • Direct copy-paste into JIRA OCPBUGS issues
  • All standard OCPBUGS fields populated
  • Proper JIRA wiki markup

3. Bug Fix: OUTPUT_DIR Error Handling

Issue: When must-gather extraction fails to find OUTPUT_DIR, code continued to reference undefined variables.

Fix:

  • Added cleanup: rm -rf "$TMP_EXTRACT"
  • Clear variables: HAS_HOSTED_CLUSTER="false", unset HOSTED_DIR, unset OUTPUT_DIR
  • Wrap processing in else block
  • Short-circuit to Step 5 when OUTPUT_DIR missing

4. Output Display

When JIRA export is chosen:

✅ Analysis complete!
📄 Reports generated:
- Markdown: .work/prow-job-analyze-test-failure/{build_id}/analysis.md
- JIRA (OCPBUGS format): .work/prow-job-analyze-test-failure/{build_id}/analysis-jira.txt

💡 Tip: Copy the contents of analysis-jira.txt directly into a JIRA OCPBUGS issue

When JIRA export is skipped:

✅ Analysis complete!
📄 Report generated:
- Markdown: .work/prow-job-analyze-test-failure/{build_id}/analysis.md

Files Changed

File Changes Purpose
plugins/prow-job/commands/analyze-test-failure.md +10, -14 Command documentation
plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md +104, -9 OCPBUGS format implementation
plugins/prow-job/.claude-plugin/plugin.json +1, -1 Version bump to 0.0.5
.claude-plugin/marketplace.json +1, -1 Auto-generated
PLUGINS.md +1, -1 Auto-generated
docs/data.json +2, -2 Auto-generated

Total: 6 files, 116 insertions, 25 deletions

Commit Structure

Following repository guidelines:

  1. Commit 1 (35a4a7f): Infrastructure code

    • Add user prompt for JIRA export
    • Implement OCPBUGS format template
    • Add OUTPUT_DIR bug fix
    • Update documentation
  2. Commit 2 (a514577): Generated files

    • marketplace.json, PLUGINS.md, docs/data.json

Testing

  • Verified analysis workflow
  • Tested OCPBUGS format generation
  • Confirmed JIRA wiki markup
  • Validated output display
  • Tested OUTPUT_DIR error handling
  • make lint passes
  • make update executed

Ready for review! 🎉

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 12, 2026
@openshift-ci

openshift-ci Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Hi @wangke19. Thanks for your PR.

I'm waiting for a openshift-eng member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@coderabbitai

coderabbitai Bot commented Feb 12, 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

Walkthrough

Bumps prow-job plugin to 0.0.5 and adds an optional --export-jira flag to analyze-test-failure, which introduces JIRA-formatted output (analysis-jira.txt), CLI/docs updates, and changes to must-gather detection/extraction and analysis flow.

Changes

Cohort / File(s) Summary
Version bumps
.claude-plugin/marketplace.json, plugins/prow-job/.claude-plugin/plugin.json, docs/data.json
Update prow-job plugin version from 0.0.40.0.5.
Command docs & CLI hints
docs/data.json, plugins/prow-job/commands/analyze-test-failure.md, PLUGINS.md
Add --export-jira to analyze-test-failure usage/argument hints and document JIRA export mode and new artifact analysis-jira.txt.
Skill implementation & flow
plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md
Parse optional --export-jira flag (EXPORT_JIRA state), generate JIRA-formatted output when requested, and adjust must-gather detection/extraction and archive handling/control flow to accommodate the new mode.

Sequence Diagram(s)

sequenceDiagram
participant User as User
participant Plugin as Prow-Job Plugin
participant Store as Artifact Store
participant Analyzer as Must-Gather Analyzer
participant FS as Filesystem

User->>Plugin: /prow-job:analyze-test-failure <url> <test> [--fast] [--export-jira]
Plugin->>Store: locate/download logs, intervals, must-gather
Store-->>Plugin: artifacts (or not found)
alt must-gather available
Plugin->>Analyzer: run cluster/must-gather analysis
Analyzer-->>Plugin: analysis outputs
end
Plugin->>Plugin: correlate logs, intervals, and cluster analysis
alt EXPORT_JIRA=true
Plugin->>FS: write .work/.../analysis-jira.txt (JIRA wiki markup)
else
Plugin->>FS: write .work/.../analysis.md (Markdown)
end
Plugin->>User: display summary and artifact locations
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a JIRA export feature to the prow-job plugin's test failure analysis command, which is accurately reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Real People Names In Style References ✅ Passed No references to real people's names used as style references found in any modified files including marketplace.json, docs/data.json, plugin.json, analyze-test-failure.md, SKILL.md, or PLUGINS.md.
No Assumed Git Remote Names ✅ Passed PR modifies documentation and configuration files for prow-job plugin's JIRA export feature without any git commands or hardcoded git remote assumptions.
Git Push Safety Rules ✅ Passed No git push commands, force push operations, or pushes to protected branches found in the PR changes.
No Untrusted Mcp Servers ✅ Passed PR does not introduce MCP server installations, npm packages, or untrusted external dependencies. Changes are limited to version bumping, CLI flag addition, and documentation updates.
Ai-Helpers Overlap Detection ✅ Passed PR adds --export-jira flag to existing prow-job:analyze-test-failure command. No overlapping test-analysis or JIRA-export functionality found in repository or other open PRs.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@wangke19
wangke19 force-pushed the feat/prow-job-jira-export branch from 1eaa76a to 796e5b7 Compare February 12, 2026 04:30

@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: 2

🤖 Fix all issues with AI agents
In `@plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md`:
- Around line 983-996: Update the summary in SKILL.md that currently lists only
".work/prow-job-analyze-test-failure/{build_id}/must-gather/logs/" so it
correctly shows HyperShift must-gather paths for unified/dual layouts: detect
HyperShift context (or document both options) and display mgmt and hosted
must-gather paths conditionally (e.g.,
".work/.../{build_id}/must-gather/mgmt/logs/" and
".work/.../{build_id}/must-gather/hosted/logs/") or list both when unsure;
adjust the user-facing text around the Reports/Artifacts block and preserve
existing placeholders like {build_id} and the --export-jira note to ensure paths
are accurate for HyperShift setups.
- Around line 372-398: When OUTPUT_DIR is missing, short-circuit immediately
instead of letting later code reference unified-path variables: after the
existing rm -rf "$TMP_EXTRACT" add a short-circuit that clears relevant
variables and exits the current flow (e.g. set HAS_HOSTED_CLUSTER="false" and
unset HOSTED_DIR and OUTPUT_DIR, then either return 0 if inside a function or
exit 0 if in the top-level script) so subsequent uses of OUTPUT_DIR, HOSTED_DIR
or HAS_HOSTED_CLUSTER (and moves into
.work/prow-job-analyze-test-failure/{build_id}/...) cannot run.

Comment thread plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md
Comment thread plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md Outdated
@wangke19
wangke19 force-pushed the feat/prow-job-jira-export branch 2 times, most recently from f990f97 to 9270011 Compare February 12, 2026 06:44

@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

🤖 Fix all issues with AI agents
In `@plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md`:
- Around line 895-920: In SKILL.md under "Step 5.5: Generate JIRA-Formatted
Output" update the fenced code block that echoes the JIRA file path so it
includes a language specifier (e.g., change the triple backtick fence before the
echo to ```bash or ```text) to match other examples; locate the echo snippet
(the line containing echo "JIRA-formatted analysis saved to:
.work/prow-job-analyze-test-failure/{build_id}/analysis-jira.txt") and add the
language tag on the opening fence while leaving the closing fence intact.

Comment thread plugins/prow-job/skills/prow-job-analyze-test-failure/SKILL.md Outdated
@wangke19
wangke19 force-pushed the feat/prow-job-jira-export branch 2 times, most recently from 9c193de to a514577 Compare February 12, 2026 08:05
@wangke19

Copy link
Copy Markdown
Contributor Author

📊 Test Analysis Results - Both Output Formats

I've generated analysis for the test failure in both formats to demonstrate the JIRA export feature.

Test analyzed: [Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically
Job: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/30585/pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6/2021677521346498560


📝 Format 1: Markdown Output (analysis.md)

Click to view Markdown format
# Prow Job Test Failure Analysis

## Job Information

- **Job Name**: pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6
- **Build ID**: 2021677521346498560
- **Job URL**: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/30585/pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6/2021677521346498560
- **PR**: openshift/origin#30585 (OCPBUGS-60853: cert tests: mark TLS registry test as informing)
- **Status**: FAILED
- **Duration**: ~3h 59m

## Failed Test

**Test Name**: `[Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically`

## Failure Summary

The test failed because **6 pathological event patterns** were detected, meaning these events repeated more than the allowed threshold (typically 20 times).

## Pathological Events Detected

### 1-4. Container Probe Test Failures (4 instances)
- Liveness probe redirects (23 occurrences each)
- Startup probe failures (23 occurrences each)
- **Analysis**: E2E container probe tests intentionally creating unhealthy pods

### 5-6. CNV Must-Gather Image Pull Failures (2 instances)
- Failed to pull `registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v4.15.0`
- 18 occurrences each on node `master-1.ostest.test.metalkube.org`
- **Time**: 2026-02-11 23:28:46Z to 23:41:02Z

## Verdict

**Assessment**: This is likely a **flaky test failure** unrelated to the PR changes.

**Rationale**:
1. Container probe events are expected test behaviors that exceeded threshold
2. Must-gather image pull failures are environmental issues during cleanup
3. PR only modifies certificate test annotations, unrelated to event monitoring

## Recommendations

- **Action**: `/retest` - Safe to rerun
- **Reason**: Failure unrelated to PR changes, appears to be environmental flake

🎫 Format 2: JIRA OCPBUGS Output (analysis-jira.txt)

Click to view JIRA OCPBUGS format (ready for copy-paste)
Description of problem:
The test "[Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically" failed with 6 pathological event patterns detected. The test monitors Kubernetes events during the entire E2E test run to detect abnormal event repetition indicating systemic issues.

Version-Release number of selected component (if applicable):
OpenShift 4.x (e2e-metal-ipi-ovn-ipv6 job)

How reproducible:
Intermittent - appears to be environmental/test infrastructure flake

Steps to Reproduce:
1. Run Prow CI job: pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6
2. Execute test: [Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically
3. Test runs as part of E2E suite monitoring event patterns throughout test execution

Actual results:
Test failed with 6 pathological event patterns exceeding threshold (20+ occurrences):

1. Liveness Probe Redirects (4 instances, 23 occurrences each):
   - Namespaces: e2e-container-probe-1241, e2e-container-probe-2381
   - Error: "Liveness probe warning: Probe terminated redirects, Response body: <a href="http://0.0.0.0/">Found</a>."
   - Nodes: worker-1, worker-2

2. Startup Probe Failures (2 instances, 23 occurrences each):
   - Namespaces: e2e-container-probe-778, e2e-container-probe-8109
   - Error: "Startup probe failed:"
   - Node: worker-0

3. CNV Must-Gather Image Pull Failures (2 instances, 18 occurrences each):
   - Namespaces: openshift-must-gather-5n68c, openshift-must-gather-x8f25
   - Node: master-1.ostest.test.metalkube.org
   - Error: Back-off pulling image "registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v4.15.0"
   - Time Range: 2026-02-11 23:28:46Z to 23:41:02Z

{noformat}
event happened 22 times, something is wrong: namespace/openshift-must-gather-5n68c node/master-1.ostest.test.metalkube.org pod/must-gather-vmw9s hmsg/d5bf9afefc - reason/Failed Error: ImagePullBackOff (23:33:58Z) result=reject
event happened 21 times, something is wrong: namespace/openshift-must-gather-x8f25 node/master-1.ostest.test.metalkube.org pod/must-gather-9w66c hmsg/d5bf9afefc - reason/Failed Error: ImagePullBackOff (23:41:02Z) result=reject
{noformat}

Expected results:
Test should pass with no pathological event patterns detected, or patterns should be within acceptable thresholds.

Additional info:

*Root Cause Analysis:*

1. Container Probe Test Failures (4 instances):
   - The e2e-container-probe tests are intentionally designed to test probe behavior
   - Liveness probe redirect responses (HTTP 302 to {{http://0.0.0.0/}}) suggest test containers are correctly simulating unhealthy states
   - These are *expected test behaviors* but exceeded the pathological threshold (20+ occurrences)
   - Tests may need tolerance adjustments

2. CNV Must-Gather Image Pull Failures (2 instances):
   - Failed to pull {{registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v4.15.0}}
   - Both occurrences during must-gather collection phase (post-test cleanup)
   - Indicates registry connectivity issues or image availability problems during test window
   - Unrelated to PR changes

*Context:*
- Test Environment: e2e-metal-ipi-ovn-ipv6 (bare metal IPv6 cluster)
- PR Changes: openshift/origin#30585 modifies cert tests to mark TLS registry test as informing
- Relationship to PR: Failures appear *unrelated to PR changes*, which only affect certificate tests

*Job Details:*
- Job URL: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/30585/pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6/2021677521346498560
- Build ID: {{2021677521346498560}}
- PR: https://github.com/openshift/origin/pull/30585
- Status: FAILED
- Duration: ~3h 59m

*Assessment:*
This is likely a flaky test failure unrelated to the PR changes.

Rationale:
1. Container probe events are expected from e2e-container-probe tests but exceeded threshold
2. Must-gather image pull failures are environmental issues during cleanup phase
3. PR scope limited to certificate test annotations, completely unrelated to event monitoring

*Recommendations:*
- Action: {{/retest}} - Safe to rerun the failing test
- Reason: Failure unrelated to PR changes, appears to be environmental/test infrastructure flake

For Test Infrastructure:
1. Adjust pathological event thresholds for e2e-container-probe tests (intentionally generate probe failures)
2. Investigate CNV must-gather image pull reliability from registry.redhat.io
3. Review {{AllowImagePullBackOffFromRedHatRegistry}} filter effectiveness

✅ Comparison: Key Differences

Aspect Markdown Format JIRA OCPBUGS Format
Structure Free-form sections OCPBUGS template fields
Headers #, ##, ### Field labels (Description, Steps, etc.)
Code blocks ```code``` {noformat}code{noformat}
Emphasis **bold** *bold*
Monospace `text` {{text}}
Use case GitHub, docs, general JIRA OCPBUGS issues
Copy-paste Works in Markdown viewers Direct paste into JIRA

💡 Usage Tips

Markdown format (analysis.md):

  • View in any Markdown viewer
  • Include in GitHub comments/issues
  • Add to documentation
  • Share via email/Slack

JIRA OCPBUGS format (analysis-jira.txt):

  • Copy entire content
  • Paste directly into JIRA issue description
  • All OCPBUGS fields pre-populated
  • Proper JIRA wiki markup renders correctly

Both formats contain the same analysis, just formatted for different platforms! 🎯

@mgencur mgencur 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.

I love it. Thanks!

That's exactly how I imagined this. One tip for the future (not now!): there is a claude command in this repository under plugins/jira/commands/create.md . We could add this as another option, something like: Label: "Yes - File a JIRA using the jira:create command"
It would then feed the information into the jira command and file the bug directly. But that's an enhancement for the future. I didn't suggest it earlier because I just got this idea now.

Comment thread .claude-plugin/marketplace.json Outdated
@wangke19
wangke19 force-pushed the feat/prow-job-jira-export branch from a514577 to 6dceb60 Compare February 12, 2026 12:09
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2026
This commit enhances the /prow-job:analyze-test-failure command to support
JIRA export using the OCPBUGS issue template format.

Changes:
- Remove --export-jira command-line flag (UX improvement)
- Ask user at the end if they want JIRA export (better workflow)
- Use OCPBUGS format template for JIRA output:
  - Description of problem
  - Version-Release number of selected component
  - How reproducible
  - Steps to Reproduce
  - Actual results
  - Expected results
  - Additional info
- Add bug fix for OUTPUT_DIR error handling (prevent undefined variable usage)
- Display both file locations (Markdown and JIRA) for easy review

Benefits:
- More natural workflow: analyze first, then decide on export format
- OCPBUGS format allows direct copy-paste into JIRA issues
- Follows Red Hat/OpenShift bug reporting conventions
- Users don't need to know about JIRA export upfront

Example workflow:
1. Run: /prow-job:analyze-test-failure <url> <test-name>
2. Review analysis
3. Prompted: "Would you like to export to JIRA format?"
4. Choose "Yes - Export to JIRA (OCPBUGS format)" or "No"
5. Get appropriately formatted output

Output files:
- .work/prow-job-analyze-test-failure/{build_id}/analysis.md (always)
- .work/prow-job-analyze-test-failure/{build_id}/analysis-jira.txt (if requested)
@wangke19
wangke19 force-pushed the feat/prow-job-jira-export branch from 6dceb60 to e512817 Compare February 12, 2026 12:38
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2026
@mgencur

mgencur commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

@mgencur: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

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.

@cblecker

Copy link
Copy Markdown
Collaborator

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 12, 2026
@mgencur

mgencur commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2026
**JIRA export (prompted at end)**:
- After analysis completes, you'll be asked if you want to export to JIRA format
- If yes, generates JIRA-formatted output using OCPBUGS template
- Perfect for copy-pasting directly into JIRA OCPBUGS issues

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.

Won't hold up this PR, but you could then just turn around and use the jira plugin/skills to make the OCPBUGS instead of copying into Jira manually

@wangke19 wangke19 Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great idea! We actually discussed this exact enhancement — adding a third option like "Yes - File a JIRA using the jira:create command" that would feed the analysis data directly into /jira:create to file the bug automatically. Noted as a follow-up enhancement.

done

# Move hosted cluster data (hostedcluster-* subdirectory)
if [ "$HAS_HOSTED_CLUSTER" = "true" ]; then

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.

Where is this getting set to true prior to this? I'm missing it.

@wangke19 wangke19 Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

HAS_HOSTED_CLUSTER is set earlier in Step 3 (pattern detection), around lines 193-216 of SKILL.md. When the code identifies the archive pattern:

  • Line 193 (Pattern 1 - unified): HAS_HOSTED_CLUSTER=$(tar -tf "$TMP_CHECK" 2>/dev/null | grep -q "hostedcluster-" && echo "true" || echo "false")
  • Line 205 (Pattern 2 - dual): Same tar check on the hypershift-dump archive
  • Lines 211/216 (Pattern 3/none): HAS_HOSTED_CLUSTER=false

So by the time execution reaches this block (Pattern 1 extraction at line 376), the variable was already determined during archive detection. This code block at line 376 is pre-existing from PR #294 — this PR only restructured it into an if/else to properly short-circuit when OUTPUT_DIR is missing.

@bryan-cox bryan-cox 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.

/approve

@openshift-ci

openshift-ci Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, mgencur, wangke19

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 Feb 13, 2026
@wangke19

wangke19 commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

The new feature has been tested with two real Prow jobs and posted the results as a PR comment. Both Markdown and JIRA (OCPBUGS format) outputs were generated and verified:

  1. Job 2021794122704097280 (pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6) — test: [Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically
  2. Job 2021677521346498560 (pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6) — same test, different run

Both produced analysis.md and analysis-jira.txt outputs. The JIRA output follows the OCPBUGS template format with all required fields.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6351d90 into openshift-eng:main Feb 13, 2026
5 checks passed
@wangke19
wangke19 deleted the feat/prow-job-jira-export branch February 13, 2026 13:22
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants