Skip to content

fix(users): Online Users 'All time' filter returns empty (#28145) [1.12.9]#28209

Merged
sonika-shah merged 1 commit into
1.12.9from
cherry-pick/28145-1.12.9
May 18, 2026
Merged

fix(users): Online Users 'All time' filter returns empty (#28145) [1.12.9]#28209
sonika-shah merged 1 commit into
1.12.9from
cherry-pick/28145-1.12.9

Conversation

@sonika-shah
Copy link
Copy Markdown
Collaborator

Cherry-pick of #28145 to 1.12.9.

Summary

Closes #27993 on the 1.12.9 release branch.

The /v1/users/online endpoint computed the SQL threshold as now - timeWindow*60*1000. When the UI sent timeWindow=0 for the All time dropdown option, the threshold collapsed to now, producing lastActivityTime > now — which matches zero rows. The page therefore rendered empty whenever a user selected All.

The fix skips the time predicate entirely when timeWindow <= 0, so the filter falls through to "all non-bot users".

Conflict resolution

UserResourceIT.java import block — kept both the existing SubjectCache/SubjectContext imports (already on 1.12.9) and the new HttpMethod/RequestOptions imports the new test needs.

Test plan

  • mvn -pl openmetadata-service,openmetadata-integration-tests -am test-compile passes locally
  • CI green
  • Manual: in the UI, open Settings → Members → Online Users, select All time — list populates

…28145)

The /v1/users/online endpoint computed `now - timeWindow*60*1000` for the
SQL threshold. When the UI sent `timeWindow=0` for the "All time" option,
the threshold collapsed to `now`, producing `lastActivityTime > now` —
which matched zero rows. Skip the time predicate entirely when
`timeWindow <= 0` so the filter falls through to "all non-bot users".

Reported via #27993.
@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels May 18, 2026
@sonika-shah sonika-shah merged commit bbc9860 into 1.12.9 May 18, 2026
16 of 39 checks passed
@sonika-shah sonika-shah deleted the cherry-pick/28145-1.12.9 branch May 18, 2026 05:17
@github-actions
Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

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

@github-actions
Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 1 failure(s), 14 flaky

✅ 2729 passed · ❌ 1 failed · 🟡 14 flaky · ⏭️ 95 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 2 697 1 4 13
🟡 Shard 4 712 0 3 19
✅ Shard 5 673 0 0 35
🟡 Shard 6 647 0 7 28

Genuine Failures (failed on all attempts)

Features/DescriptionSuggestion.spec.ts › View, Close, Reject and Accept the Suggestions (shard 2)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveCount�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('suggested-SuggestDescription-card')
Expected: �[32m9�[39m
Received: �[31m7�[39m
Timeout:  5000ms

Call log:
�[2m  - Expect "toHaveCount" with timeout 5000ms�[22m
�[2m  - waiting for getByTestId('suggested-SuggestDescription-card')�[22m
�[2m    8 × locator resolved to 7 elements�[22m
�[2m      - unexpected value "7"�[22m

🟡 14 flaky test(s) (passed on retry)
  • Features/DataQuality/IncidentManagerDateFilter.spec.ts › Date filter persists on page reload (shard 2, 1 retry)
  • Features/ExploreQuickFilters.spec.ts › should show correct count for tier filter options from aggregation (shard 2, 1 retry)
  • Features/Glossary/LargeGlossaryPerformance.spec.ts › should search and filter glossary terms (shard 2, 1 retry)
  • Features/Glossary/LargeGlossaryPerformance.spec.ts › should handle drag and drop for term reordering (shard 2, 1 retry)
  • Pages/CustomThemeConfig.spec.ts › Update Hover and selected Color (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Delete Topic (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag Add, Update and Remove for child entities (shard 4, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify LineageSearchSelect in lineage mode (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Api Service (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Dashboard Service (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Messaging Service (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Search Index Service (shard 6, 1 retry)
  • Pages/ServiceListing.spec.ts › should render the service listing page (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Add and Remove Assets and Check Restricted Entity (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

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.

1 participant