Skip to content

Added API polling before verifying the activity feed changes#27504

Merged
Rohit0301 merged 4 commits intomainfrom
activity-feed-fix
Apr 18, 2026
Merged

Added API polling before verifying the activity feed changes#27504
Rohit0301 merged 4 commits intomainfrom
activity-feed-fix

Conversation

@Rohit0301
Copy link
Copy Markdown
Contributor

@Rohit0301 Rohit0301 commented Apr 18, 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

  • Test stabilization:
    • Added expect.poll to wait for feed updates in ActivityFeed.spec.ts before proceeding with UI interactions.
    • Implemented authentication context retrieval using getToken and getAuthContext for the polling mechanism.

This will update automatically on new commits.

@Rohit0301 Rohit0301 self-assigned this Apr 18, 2026
@Rohit0301 Rohit0301 requested a review from a team as a code owner April 18, 2026 03:36
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Apr 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.73% (59682/93636) 43.69% (31456/71994) 46.75% (9446/20204)

anuj-kumary
anuj-kumary previously approved these changes Apr 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

🟡 Playwright Results — all passed (29 flaky)

✅ 3656 passed · ❌ 0 failed · 🟡 29 flaky · ⏭️ 89 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 476 0 4 4
🟡 Shard 2 646 0 5 7
🟡 Shard 3 653 0 7 1
🟡 Shard 4 629 0 5 27
🟡 Shard 5 609 0 2 42
🟡 Shard 6 643 0 6 8
🟡 29 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.ts › Table - customization should work (shard 1, 1 retry)
  • Features/CustomizeDetailPage.spec.ts › Domain - customization should work (shard 1, 1 retry)
  • Flow/Metric.spec.ts › Verify Related Metrics Update (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 2 retries)
  • Features/BulkImport.spec.ts › Keyboard Delete selection (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/CuratedAssets.spec.ts › Test Pipelines with display name filter (shard 2, 1 retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customization should work (shard 2, 1 retry)
  • Features/IncidentManager.spec.ts › Complete Incident lifecycle with table owner (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show "Active recently" for users active within last hour (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for SearchIndex (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Spreadsheet (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Owner Rule Not_In (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Glossary Term Add, Update and Remove (shard 4, 1 retry)
  • Pages/EntityDataSteward.spec.ts › Glossary Term Add, Update and Remove (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 2 retries)
  • Pages/Glossary.spec.ts › Drag and Drop Glossary Term Approved Terms having reviewer (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/ServiceListing.spec.ts › should render the service listing page (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 18, 2026

Code Review ✅ Approved 1 resolved / 1 findings

API polling added to verify activity feed changes resolves the APIRequestContext leak identified in previous iterations. No open issues remain.

✅ 1 resolved
Performance: APIRequestContext leaked on every poll iteration

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ActivityFeed.spec.ts:441-454
Inside the expect.poll() loop, getAuthContext(token) creates a new Playwright APIRequestContext (via request.newContext) on every iteration, but the context is never disposed. With a 60 s timeout and 2 s intervals, this can leak up to ~30 contexts per test run, each holding open sockets and resources.

Create the context once before the poll loop and dispose it afterward, or dispose it inside each iteration.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

@Rohit0301 Rohit0301 enabled auto-merge (squash) April 18, 2026 16:09
@Rohit0301 Rohit0301 merged commit a49db9f into main Apr 18, 2026
46 checks passed
@Rohit0301 Rohit0301 deleted the activity-feed-fix branch April 18, 2026 16:37
Rohit0301 added a commit that referenced this pull request Apr 22, 2026
* Added API polling before verifying the activity feed changes

* minor fix

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

Labels

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.

3 participants