Skip to content

Conversation

@harshach
Copy link
Collaborator

@harshach harshach commented Dec 4, 2025

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

  • Test stabilization:
    • Replaced fixed Thread.sleep(5000) with polling in test_testSuiteReindexConsistency
  • New utility methods:
    • TestUtils.waitForReindexCompletion() polls SearchIndexingApplication status with 60s timeout
    • TestSuiteResourceTest.listEntitiesFromSearchWithRetry() handles transient ES errors during reindex

This will update automatically on new commits.

pmbrull
pmbrull previously approved these changes Dec 4, 2025
@gitar-bot
Copy link

gitar-bot bot commented Dec 5, 2025

🔍 CI failure analysis for 987f4e2: Different CI failures across retry attempts: Run 1 had ETag/GlossaryTerm bugs, Run 2 has FeedResource pagination issue.

Issue

The maven-mysql-ci job has different failures across retry attempts, indicating test instability:

Run 1 (Job 57210140871) - 3 failures:

  1. BotResourceTest.patch_concurrent_updates_with_etag (ETag bug)
  2. GlossaryTermResourceTest.put_addEntityCustomAttributes (custom attributes bug)
  3. GlossaryTermResourceTest.test_performance_listEntities (timeout)

Run 2 (Job 57235837346) - 1 failure:

  1. FeedResourceTest.get_listThreadsWithPagination - expected 4 threads but got 3

Root Cause

Changing Failure Pattern Indicates Test Environment Issues

The fact that different tests fail on retry strongly suggests environmental/timing issues rather than deterministic code bugs:

Run 2 Failure:

FeedResourceTest.get_listThreadsWithPagination:891
expected: <4> but was: <3>

A pagination test expected 4 feed threads but only found 3. This is likely a race condition where background thread creation or event processing hasn't completed before the assertion runs.

Previous Failures (Run 1):

  • ETag concurrency bug (500 errors instead of 412)
  • Custom attributes not clearing properly
  • Performance timeout (3475ms > 3000ms limit)

These did NOT reproduce in Run 2, further confirming environmental factors.

Details

None of these failures are related to this PR's changes:

The PR only modifies:

  • TableResourceTest.java (removed concurrent test)
  • TestSuiteResourceTest.java (fixed reindex polling)
  • TestUtils.java (added polling utilities)

No changes to:

  • FeedResource
  • BotResource
  • GlossaryTermResource
  • Entity relationship handling

Test Instability Pattern:

  • Run 1: 3 specific failures (ETag, custom attributes, performance)
  • Run 2: 1 different failure (feed pagination)
  • Suggests: Test isolation issues, shared state, or async timing problems

Suggested Fix

  1. FeedResource Pagination: Should be corrected by adding proper wait/polling for async feed thread creation to complete before asserting counts, similar to the reindex polling fix in this PR.

  2. Previous Run 1 Failures: Should be corrected by:

    • Fixing ETag validation to return 412 instead of 500
    • Ensuring custom attributes are properly replaced
    • Optimizing or increasing timeout for performance tests
  3. Overall Test Stability: Can be resolved by improving test isolation, cleaning up shared state between tests, and adding proper synchronization for async operations.

Gitar Rules 🎸 1 action taken

Gitar Rules

🎸 Summary Enhancement: Summary already accurate; no updates needed
Flaky Test Retry: Already on retry attempt 2; max retries reached
Rule Quality Standards: No Gitar rule markdown files modified in this PR
  • Auto-apply suggestions - Allow Gitar to commit updates to this branch

Tip

Comment Gitar fix CI or enable auto apply.

Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

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.

4 participants