Skip to content

fix:NPE reindex#25742

Open
TeddyCr wants to merge 2 commits intomainfrom
MINOR-Reindex-fix-incident
Open

fix:NPE reindex#25742
TeddyCr wants to merge 2 commits intomainfrom
MINOR-Reindex-fix-incident

Conversation

@TeddyCr
Copy link
Collaborator

@TeddyCr TeddyCr commented Feb 7, 2026

Describe your changes:

Fixes

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.

Summary by Gitar

  • Fixes NullPointerException in Filter.getQueryParam(): Added null check for include field before calling include.value() to prevent NPE during reindex operations
  • Defensive programming enhancement: Used short-circuit evaluation (&& include != null) to safely handle cases where the optional include field is not initialized
  • Minimal surgical fix: Single-line change in openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/Filter.java preserving existing behavior and backward compatibility

harshach
harshach previously approved these changes Feb 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@gitar-bot
Copy link

gitar-bot bot commented Feb 7, 2026

🔍 CI failure analysis for 12866d3: maven-sonarcloud-ci shows 7 test failures (1 failure + 6 errors) in different test classes - pre-existing test issues unrelated to PR's defensive null check.

Previously Reported Failures (STILL ACTIVE)

Issues 1-7: See previous analysis

  • maven-collate-ci (dependency)
  • playwright-ci-postgresql (ALL 6 shards - 100%)
  • integration-tests-mysql-elasticsearch (DB constraints)
  • integration-tests-postgres-opensearch (false positive)
  • Python tests (7 lineage tests)
  • maven-postgresql-ci (1 test timeout)
  • Test Report (cascading)

Issue 8: maven-sonarcloud-ci Failure (NEW)

Root Cause

7 tests failed (1 failure + 6 errors):

Test Results: 7836 tests run, 1 failure, 6 errors, 701 skipped

Failed Tests:

  1. TestCaseResourceTest.test_userAssignmentRemovedAfterUserDeletion (FAILURE)

    • Error: status code: 500 - Entity type testCaseResolutionStatus does not have expected relationship parentOf to/from entity type testCase
    • This is a database relationship integrity error
  2. EventSubscriptionResourceTest.post_createAndValidateEventSubscription_MSTEAMS (ERROR)

    • Error: NullPointerException: Cannot invoke "EventDetails.getEvents()" because "details" is null
    • This is a null pointer error in event subscription test
  3. EventSubscriptionResourceTest.put_updateEndpointURL (ERROR)

    • Error: ConditionTimeout: Lambda expression expected (<true> or <true>) but was <false> within 10 seconds
    • This is a timeout waiting for condition

4-6. AwsCredentialsUtilTest (3 tests - ALL ERRORS)

  • testBuildCredentialsProviderWithEmptyCredentials
  • testBuildCredentialsProviderWithNoCredentials
  • testBuildCredentialsProviderWithOnlyAccessKey
  • Error: IllegalArgumentException: AWS credentials not configured
  • These are AWS credential configuration test failures

Analysis

Why these failures are unrelated to this PR:

This PR only modifies Filter.java's getQueryParam() method:

// Added defensive null check
return name.equals("include") && include != null ? include.value() : queryParams.get(name);

This change does NOT affect:

  1. TestCase/TestCaseResolutionStatus relationships: The Filter class is used for query parameter handling, not for managing entity relationships in the database

  2. Event subscription logic: The Filter class has no connection to MSTeams callback resources or event details processing

  3. Endpoint URL updates: The null check in Filter doesn't affect event subscription endpoint updates or polling logic

  4. AWS credentials handling: The Filter class is completely unrelated to AWS credential provider configuration

These are pre-existing test issues:

  1. Database relationship error: Indicates a data integrity or migration issue in test data setup
  2. NullPointerException in EventSubscription: Pre-existing NPE in event handling code (ironically, needs defensive null checking like this PR adds)
  3. Timeout in EventSubscription: Infrastructure/timing issue similar to other timeout failures
  4. AWS credential tests: Configuration issues in test environment for AWS authentication

None of these failures are caused by adding a null check to Filter.getQueryParam() because:

  • The Filter class is for REST API query parameter handling
  • It doesn't interact with test cases, event subscriptions, or AWS credentials
  • The defensive null check only prevents NPE when include parameter is null
  • It doesn't change behavior for existing code paths

Status: Unrelated to this PR - pre-existing test failures in various components.


Issue 9: Test Report Failure (NEW - CASCADING)

Root Cause

Cascading failure from maven-sonarcloud-ci test failures.

Status: Not a separate issue - consequence of Issue 8.


Summary

Total CI Failures: 9 distinct issues affecting multiple jobs

  1. maven-collate-ci: Dependency issue
  2. playwright-ci-postgresql (ALL 6 shards): Systematic config error
  3. integration-tests-mysql-elasticsearch: DB constraints + timeout
  4. integration-tests-postgres-opensearch: False positive
  5. Python tests (3.10 & 3.11): 7 lineage test failures
  6. maven-postgresql-ci: 1 test timeout (AppsResourceTest)
  7. maven-sonarcloud-ci (NEW): 7 test failures (TestCase relationships, EventSubscription, AWS credentials)
  8. Test Report: Cascading from maven-postgresql-ci
  9. Test Report: Cascading from maven-sonarcloud-ci

All failures are:

  • ✅ Pre-existing test issues
  • ✅ Infrastructure/configuration/timing problems
  • ✅ Unrelated to this PR's code changes
  • ✅ NOT caused by the defensive null check in Filter.java

This PR: Only adds defensive null checking (&& include != null) in query parameter handling - has NO connection to test case relationships, event subscriptions, AWS credentials, Playwright testing, Python ingestion, or database schemas.

No CI failures are caused by or related to the changes in this PR.

Code Review ✅ Approved

Clean one-line NPE fix that adds a null guard for the include field before calling .value(). The fallthrough to queryParams.get("include") when include is null is reasonable and will return null. No issues found.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion 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