Skip to content

TRT-2633: Add e2e tests for triage symptom summaries and sync edge cases#3513

Open
smg247 wants to merge 1 commit intoopenshift:mainfrom
smg247:additional-triage-symptom-tests
Open

TRT-2633: Add e2e tests for triage symptom summaries and sync edge cases#3513
smg247 wants to merge 1 commit intoopenshift:mainfrom
smg247:additional-triage-symptom-tests

Conversation

@smg247
Copy link
Copy Markdown
Member

@smg247 smg247 commented May 8, 2026

Following up on #3497 to add additional testing

Tests GetTriageSymptomSummaries directly: nil returns, percentage calculation, sort order, multi-regression counts, and regression ID collection. Tests SyncTriageSymptoms edge cases: duplicate symptom deduplication within a job run, and syncing to multiple triages. Adds API expansion test for no-symptoms case. Updates all test Jira URLs to use redhat.atlassian.net.

Summary by CodeRabbit

  • Tests
    • Updated e2e test coverage for triage symptom handling, including deduplication and expanded retrieval scenarios.
    • Migrated triage system test references to Atlassian Jira platform.

Tests GetTriageSymptomSummaries directly: nil returns, percentage
calculation, sort order, multi-regression counts, and regression ID
collection. Tests SyncTriageSymptoms edge cases: duplicate symptom
deduplication within a job run, and syncing to multiple triages.
Adds API expansion test for no-symptoms case. Updates all test Jira
URLs to use redhat.atlassian.net.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 8, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 8, 2026

@smg247: This pull request references TRT-2633 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Following up on #3497 to add additional testing

Tests GetTriageSymptomSummaries directly: nil returns, percentage calculation, sort order, multi-regression counts, and regression ID collection. Tests SyncTriageSymptoms edge cases: duplicate symptom deduplication within a job run, and syncing to multiple triages. Adds API expansion test for no-symptoms case. Updates all test Jira URLs to use redhat.atlassian.net.

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 openshift-eng/jira-lifecycle-plugin repository.

@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: automatic mode

@openshift-ci openshift-ci Bot requested review from deepsm007 and stbenjam May 8, 2026 12:44
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4f34d61d-53fa-4b41-91a2-5a65f2a3fc56

📥 Commits

Reviewing files that changed from the base of the PR and between 6f198dc and 795b454.

📒 Files selected for processing (2)
  • test/e2e/componentreadiness/regressiontracker/regressiontracker_test.go
  • test/e2e/componentreadiness/triage/triageapi_test.go

Walkthrough

This PR updates e2e tests across the componentreadiness test suite to use Atlassian Jira URLs instead of Red Hat Issues URLs, and expands test coverage for symptom deduplication, symptom syncing across multiple triages, and triage symptom summary computation.

Changes

Triage and Regression Tracking Test Updates

Layer / File(s) Summary
Test Fixtures & URLs
test/e2e/componentreadiness/regressiontracker/regressiontracker_test.go, test/e2e/componentreadiness/triage/triageapi_test.go
Triage bug URLs migrated from https://issues.redhat.com/browse/... to https://redhat.atlassian.net/browse/... across multiple test fixtures and the createBug helper function.
Audit Log Assertions
test/e2e/componentreadiness/triage/triageapi_test.go
DELETE and CREATE audit log assertions updated to expect Atlassian Jira URLs in url field changes.
Symptom Handling Test Scenarios
test/e2e/componentreadiness/regressiontracker/regressiontracker_test.go
Added two new subtests to Test_SyncTriageSymptoms: one verifying duplicate symptoms within a single job run deduplicate to one row, another verifying the same symptom syncs as independent TriageSymptom rows for separate triage records.
Symptom Summary Tests
test/e2e/componentreadiness/triage/triageapi_test.go
Added test for expanded triage returning nil symptom summaries when no symptoms exist, and a comprehensive new test Test_GetTriageSymptomSummaries covering nil returns, percentage calculations, descending regression-count sorting, distinct regression counting, and regression ID aggregation per symptom.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 16 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (16 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding e2e tests for triage symptom summaries and sync edge cases, with specific reference to the Jira ticket TRT-2633.
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.
Go Error Handling ✅ Passed All error handling rules properly followed: No underscore error ignoring, no panic() calls, no unhandled errors, proper nil checks. Code uses require.NoError() (121+ instances) throughout.
Sql Injection Prevention ✅ Passed Test code uses GORM ORM with parameterized queries (46 Where clauses with ? placeholders, 4 Exec calls literal SQL). No Raw(), string concatenation, or unsafe patterns detected.
Excessive Css In React Should Use Styles ✅ Passed Custom check is not applicable. PR modifies only Go test files; check targets React components with inline CSS. Repository has no React/TSX components.
Test Coverage For New Features ✅ Passed PR adds only test coverage for existing functions. No new exported functions/methods added. Tests cover pre-existing GetTriageSymptomSummaries and SyncTriageSymptoms functions from prior PR.
Single Responsibility And Clear Naming ✅ Passed Clear naming in test functions and helpers. Each test and subtest has single focused responsibility. No generic Manager/Handler naming patterns. Struct complexity within limits.
Stable And Deterministic Test Names ✅ Passed All test names in modified files are stable and deterministic. Tests use standard Go testing with t.Run() subtests (not Ginkgo). All test names are static string literals with no dynamic content.
Test Structure And Quality ✅ Passed Check targets Ginkgo test code, but these tests use standard Go testing.T with t.Run (not Ginkgo). Tests follow Go best practices with defer cleanup and single-responsibility subtests.
Microshift Test Compatibility ✅ Passed The custom check targets Ginkgo e2e tests using OpenShift APIs. These are standard Go unit tests in sippy that do not use Ginkgo or Kubernetes cluster APIs, making the check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Custom check not applicable. PR adds standard Go unit tests using testing package, not Ginkgo e2e tests (no It/Describe/Context/When patterns). Tests are database-focused.
Topology-Aware Scheduling Compatibility ✅ Passed Custom check not applicable. PR contains only test code in test/e2e/componentreadiness/. No deployment manifests, operator code, or controllers are modified.
Ote Binary Stdout Contract ✅ Passed No OTE Binary Stdout Contract violations detected. Both test files are standard Go tests with no process-level code that writes to stdout. All logging is properly contained within test functions.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Custom check targets Ginkgo e2e tests. PR adds only standard Go tests using testing.T/t.Run. No Ginkgo patterns found. Check not applicable.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.1)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@openshift-merge-bot openshift-merge-bot Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label May 8, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

@smg247: 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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants