Skip to content

improve: fix misleading useSecondaryToPrimaryIndex method name - #3562

Merged
csviri merged 1 commit into
mainfrom
naming-use-sec-to-prim
Aug 17, 2026
Merged

improve: fix misleading useSecondaryToPrimaryIndex method name#3562
csviri merged 1 commit into
mainfrom
naming-use-sec-to-prim

Conversation

@csviri

@csviri csviri commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Signed-off-by: Attila Mészáros a_meszaros@apple.com

Summary by CodeRabbit

  • Bug Fixes
    • Corrected internal index selection for informer event source lookups.
    • Ensured secondary-resource lookups continue to work when no primary-to-secondary mapper is configured.

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Copilot AI lite review requested due to automatic review settings August 17, 2026 11:02
@openshift-ci
openshift-ci Bot requested review from metacosm and xstefank August 17, 2026 11:02

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR clarifies the naming around when the primary-to-secondary index should be used in InformerEventSource, aligning method names with the actual index being conditionally enabled.

Changes:

  • Renamed the conditional helper from useSecondaryToPrimaryIndex() to usePrimaryToSecondaryIndex().
  • Updated call sites to use the renamed helper when creating and querying the primary-to-secondary index.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c537f3d-76b2-4635-9c0d-e75a3ad464b5

📥 Commits

Reviewing files that changed from the base of the PR and between 1df5cba and bcbc819.

📒 Files selected for processing (1)
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java

Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change renames the informer index-selection helper and updates its constructor and secondary-resource lookup call sites. The helper retains its existing null-mapper condition and lookup behavior.

Changes

Informer index selection

Layer / File(s) Summary
Rename index-selection helper and update call sites
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java
The private helper is renamed to usePrimaryToSecondaryIndex(). Constructor initialization and secondary-resource lookup use the renamed helper. The selection condition remains unchanged.

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

Merge Risk: ⚪ Minimal · up to bcbc8

This is a localized naming-only change with no identified user or production impact; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the method rename that is the main change in the pull request.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch naming-use-sec-to-prim

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.

@csviri
csviri merged commit 0731ad8 into main Aug 17, 2026
33 checks passed
@csviri
csviri deleted the naming-use-sec-to-prim branch August 17, 2026 12:14
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.

3 participants