Skip to content

Fix existing followed assets not getting listed after search Reindexing #22621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 30, 2025

Conversation

sonika-shah
Copy link
Contributor

@sonika-shah sonika-shah commented Jul 29, 2025

Describe your changes:

image

Add batch fetch methods for missing fields

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@sonika-shah sonika-shah requested a review from Copilot July 29, 2025 00:36
@sonika-shah sonika-shah requested a review from a team as a code owner July 29, 2025 00:36
@sonika-shah sonika-shah added safe to test Add this label to run secure Github workflows on PRs backend labels Jul 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where followed assets were not being listed after search reindexing by implementing proper batch fetching for the followers field. The issue was that the field support mapping for followers was missing, causing bulk operations to not properly populate follower information.

  • Added batch fetch method for followers field to enable efficient bulk loading
  • Enhanced test validation to verify followers field consistency between bulk and individual operations
  • Fixed the missing field support mapping registration for followers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
EntityRepository.java Added batch followers fetching implementation and registered field support mapping
EntityResourceTest.java Enhanced test validation for followers field consistency and data integrity
Comments suppressed due to low confidence (1)

openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java:903

  • The test assumes getFollowers() method exists and returns List, but this may not be consistent across all entity types. Consider using a more generic approach or add null checks to handle cases where the method might not be available.
          List<EntityReference> bulkFollowers = entity.getFollowers();

harshach
harshach previously approved these changes Jul 30, 2025
Copy link

@sonika-shah sonika-shah merged commit 941262a into main Jul 30, 2025
19 of 20 checks passed
@sonika-shah sonika-shah deleted the fix-batch-fetch-followers branch July 30, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants