Skip to content

Conversation

@TheRealJon
Copy link
Member

The catalog service was incorrectly parsing FBC from catalogd:

  • Short plain-text descriptions were stored in markdownDescription
  • Long markdown-formatted descriptions were stored in description

This fix corrects the field mapping:

  • csvMetadata.Annotations["description"] → item.Description (short, plain-text)
  • csvMetadata.Description → item.MarkdownDescription (long, markdown)

Also removed fallback logic for markdownDescription to keep it empty when not available, and removed unused pkg parameter.

🤖 Generated with Claude Code

The catalog service was incorrectly parsing FBC from catalogd:
- Short plain-text descriptions were stored in markdownDescription
- Long markdown-formatted descriptions were stored in description

This fix corrects the field mapping:
- csvMetadata.Annotations["description"] → item.Description (short, plain-text)
- csvMetadata.Description → item.MarkdownDescription (long, markdown)

Also removed fallback logic for markdownDescription to keep it empty
when not available, and removed unused pkg parameter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 20, 2025
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-65831, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

The catalog service was incorrectly parsing FBC from catalogd:

  • Short plain-text descriptions were stored in markdownDescription
  • Long markdown-formatted descriptions were stored in description

This fix corrects the field mapping:

  • csvMetadata.Annotations["description"] → item.Description (short, plain-text)
  • csvMetadata.Description → item.MarkdownDescription (long, markdown)

Also removed fallback logic for markdownDescription to keep it empty when not available, and removed unused pkg parameter.

🤖 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.

@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

Refactored description derivation logic in the OLM catalog module. Removed helper functions for plain text and markdown description extraction. Updated the withDescription function to prioritize CSV annotation metadata and fall back to package description. Simplified withMarkdownDescription to use CSV metadata directly instead of deriving from multiple sources.

Changes

Cohort / File(s) Summary
OLM Catalog Description Refactoring
pkg/olm/catalog.go
Removed getPlainTextDescription and getMarkdownDescription helper functions. Updated withDescription to initialize with package description, check CSV annotations, and use DescriptionOLMAnnotationKey when available. Changed withMarkdownDescription signature to accept only CSV metadata and set description from csvMetadata.Description. Updated CreateCatalogItem call site to reflect new function signature.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Single file modification with contained logic changes
  • Function signature updates are internal only; no exported API changes
  • Clear intent: prioritize CSV annotations over derived descriptions
  • Consider reviewing the order of precedence in description fallback logic to ensure correctness
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

@openshift-ci openshift-ci bot requested review from Leo6Leo and jhadvig November 20, 2025 16:13
@openshift-ci openshift-ci bot added the component/backend Related to backend label Nov 20, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 Nov 20, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 86c7b34 and 113825e.

📒 Files selected for processing (1)
  • pkg/olm/catalog.go (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/olm/catalog.go
🔇 Additional comments (2)
pkg/olm/catalog.go (2)

245-253: LGTM! Correct field mapping.

The function now correctly maps csvMetadata.Description (long markdown) to item.MarkdownDescription, and intentionally removes the fallback logic as stated in the PR objectives. Explicitly setting to empty string when csvMetadata is nil is good defensive programming.


84-84: LGTM! Call site correctly updated.

The function call correctly reflects the updated signature of withMarkdownDescription with the pkg parameter removed.

Comment on lines 186 to 201
// Plain text description takes precedence, fall back to markdown description if empty
func withDescription(item *ConsoleCatalogItem, csvMetadata *property.CSVMetadata, pkg *declcfg.Package) {
item.Description = pkg.Description
if csvMetadata == nil {
return
}

item.Description = getPlainTextDescription(csvMetadata, pkg)
if csvMetadata.Annotations == nil {
return
}

item.Description = csvMetadata.Annotations[DescriptionOLMAnnotationKey]
if item.Description == "" {
item.Description = getMarkdownDescription(csvMetadata)
item.Description = pkg.Description
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update outdated comment.

The comment on line 186 states "fall back to markdown description if empty", but the implementation falls back to pkg.Description (line 199), not markdown description. This appears to be a remnant from the previous implementation that used helper functions.

The logic itself correctly implements the intended mapping: csvMetadata.Annotations[DescriptionOLMAnnotationKey]item.Description with pkg.Description as fallback.

-// Plain text description takes precedence, fall back to markdown description if empty
+// Plain text description from CSV annotations, falls back to package description
 func withDescription(item *ConsoleCatalogItem, csvMetadata *property.CSVMetadata, pkg *declcfg.Package) {
🤖 Prompt for AI Agents
In pkg/olm/catalog.go around lines 186 to 201, the comment saying "fall back to
markdown description if empty" is outdated because the code actually falls back
to pkg.Description; update the comment to accurately describe behavior (e.g.,
"plain text description takes precedence, fall back to package description if
empty") so it matches the implemented logic and remove any reference to markdown
helper behavior.

@TheRealJon
Copy link
Member Author

/retest

@TheRealJon
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Nov 24, 2025
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-65831, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

/jira refresh

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 removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 24, 2025
@openshift-ci openshift-ci bot requested a review from yapei November 24, 2025 15:42
@Leo6Leo
Copy link
Contributor

Leo6Leo commented Nov 24, 2025

  1) Admission Webhook warning notification
       Create a pod and display Admission Webhook warning notification:
     CypressError: Timed out retrying after 30050ms: `cy.click()` failed because this element:

`<button id="save-changes" data-test="save-changes" class="pf-v6-c-button pf-m-primary" type="submit" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-primary-3">...</button>`

Seems cypress flaky
/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2025

@TheRealJon: all tests passed!

Full PR test history. Your PR dashboard.

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 jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants