Skip to content

Preserve original prow job names in PG provider - #3863

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:worktree-fix-pg-prowjob-normalization
Aug 3, 2026
Merged

Preserve original prow job names in PG provider#3863
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:worktree-fix-pg-prowjob-normalization

Conversation

@mstaeble

@mstaeble mstaeble commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixed the PG data provider overwriting the ProwJob field on TestJobRunRows with the normalized name (X.X) instead of preserving the original version number (e.g., 4.22). The BQ provider already preserved the original name correctly.
  • The normalized name is only needed as the map key for cross-release grouping. The ProwJob field flows to the test details API response (displayed on the frontend) and into RegressionJobRun records, so it should retain the literal version number.
  • Added integration test assertions verifying that original job names are preserved in result rows even when grouped under a normalized key.

Test plan

  • gofmt -w on modified files
  • go vet passes
  • Unit tests pass (go test ./pkg/api/componentreadiness/...)
  • All 133 integration tests pass (make integration)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Preserved the original test job names in component readiness results while continuing to combine equivalent versioned jobs correctly.
    • Improved result details so users can distinguish the specific job runs contributing to merged results.
  • Tests

    • Added coverage validating result merging and preservation of original job names.

The PG data provider for component readiness was overwriting the
ProwJob field on TestJobRunRows with the normalized name (X.X),
while the BQ provider correctly preserved the original name. The
normalized name is only needed as the map key for cross-release
grouping; the ProwJob field is used for display and regression
tracking and should retain the literal version number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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-robot

openshift-ci-robot commented Aug 3, 2026

Copy link
Copy Markdown

@mstaeble: This pull request references TRT-2821 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:

Summary

  • Fixed the PG data provider overwriting the ProwJob field on TestJobRunRows with the normalized name (X.X) instead of preserving the original version number (e.g., 4.22). The BQ provider already preserved the original name correctly.
  • The normalized name is only needed as the map key for cross-release grouping. The ProwJob field flows to the test details API response (displayed on the frontend) and into RegressionJobRun records, so it should retain the literal version number.
  • Added integration test assertions verifying that original job names are preserved in result rows even when grouped under a normalized key.

Test plan

  • gofmt -w on modified files
  • go vet passes
  • Unit tests pass (go test ./pkg/api/componentreadiness/...)
  • All 133 integration tests pass (make integration)

🤖 Generated with Claude Code

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-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The provider now preserves original Prow job names in result rows while continuing to group results by normalized names. The integration test verifies that version-specific names remain preserved after merging.

Changes

Component readiness job results

Layer / File(s) Summary
Preserve names during result merging
pkg/api/componentreadiness/dataprovider/postgres/provider.go, test/integration/component_readiness_test.go
The provider stores the original database job name in TestJobRunRows.ProwJob. The integration test verifies that normalized result keys merge versioned jobs while preserving both original names.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: stbenjam

🚥 Pre-merge checks | ✅ 21
✅ Passed checks (21 passed)
Check name Status Explanation
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.
Go Error Handling ✅ Passed The changed hunk adds no error-producing call, ignored error, panic, or pointer dereference; provider query errors are checked, and the integration test asserts an empty error list.
Sql Injection Prevention ✅ Passed The PR changes only result-field mapping. SQL inputs use placeholders; dynamic filters concatenate only fixed SQL and generated ? markers, while numeric VALUES are internally generated.
Excessive Css In React Should Use Styles ✅ Passed The PR changes only two Go files and adds no React, JSX, CSS, inline style, or useStyles code; this check is not applicable.
Test Coverage For New Features ✅ Passed The modified integration test verifies both normalized-key merging and preservation of both original ProwJob names; the parent implementation would fail these new assertions.
Single Responsibility And Clear Naming ✅ Passed The patch adds no package, struct, or method; it uses clear names (normalizedName, queryTestDetails) and preserves the focused map-key/output-row distinction.
Feature Documentation ✅ Passed The only docs/features file covers symptoms and labels; it does not describe component-readiness job-name normalization or TestJobRunRows, so no feature-document update is needed.
Stable And Deterministic Test Names ✅ Passed The PR adds only assertions to the static Go test TestJobNameNormalizationMergesResults; it adds no dynamic Ginkgo or test title content.
Test Structure And Quality ✅ Passed The added test is a standard testify Test function, not Ginkgo code; it uses existing DB helpers with t.Cleanup, has no cluster waits, and includes focused assertions with diagnostic messages.
Microshift Test Compatibility ✅ Passed The change adds a standard Go TestJobNameNormalizationMergesResults test, not a Ginkgo e2e test, and adds no MicroShift-incompatible API or resource usage.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e test was added. The change adds assertions to a standard testing.T integration test, with no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The patch changes only PostgreSQL result grouping and integration assertions; it adds no manifests, operators, controllers, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only ProwJob assignment and test assertions; it adds no main(), init(), TestMain(), suite setup, klog, or stdout write.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds a standard Go Test function, not a Ginkgo e2e test; added lines use database fixtures and assertions only, with no IPv4 assumptions or external connectivity.
No-Weak-Crypto ✅ Passed The PR changes only ProwJob assignment and test assertions; the patch adds no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparison code.
Container-Privileges ✅ Passed The PR changes only Go code and an integration test. No container or Kubernetes manifest changes add privileged access; existing pod contexts set privileged=false and runAsNonRoot=true.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds no logging calls or sensitive-data formatting; it only preserves ProwJob values and adds test assertions. Existing logging records only a release field.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preserving original Prow job names in the PostgreSQL provider.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Aug 3, 2026
@openshift-ci
openshift-ci Bot requested review from dgoodwin and stbenjam August 3, 2026 15:24
@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
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@mstaeble mstaeble changed the title TRT-2821: Preserve original prow job names in PG provider Preserve original prow job names in PG provider Aug 3, 2026
@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mstaeble: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

Summary

  • Fixed the PG data provider overwriting the ProwJob field on TestJobRunRows with the normalized name (X.X) instead of preserving the original version number (e.g., 4.22). The BQ provider already preserved the original name correctly.
  • The normalized name is only needed as the map key for cross-release grouping. The ProwJob field flows to the test details API response (displayed on the frontend) and into RegressionJobRun records, so it should retain the literal version number.
  • Added integration test assertions verifying that original job names are preserved in result rows even when grouped under a normalized key.

Test plan

  • gofmt -w on modified files
  • go vet passes
  • Unit tests pass (go test ./pkg/api/componentreadiness/...)
  • All 133 integration tests pass (make integration)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

  • Preserved the original test job names in component readiness results while continuing to combine equivalent versioned jobs correctly.

  • Improved result details so users can distinguish the specific job runs contributing to merged results.

  • Tests

  • Added coverage validating result merging and preservation of original job names.

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.

@smg247 smg247 left a comment

Copy link
Copy Markdown
Member

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
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mstaeble, 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 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@mstaeble: 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 9845224 into openshift:main Aug 3, 2026
10 checks passed
@mstaeble
mstaeble deleted the worktree-fix-pg-prowjob-normalization branch August 3, 2026 18:01
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. 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.

3 participants