Skip to content

test: gate version history tests on supportsVersionHistory flag#27675

Merged
harshach merged 1 commit intomainfrom
harshach/gate-version-tests
Apr 24, 2026
Merged

test: gate version history tests on supportsVersionHistory flag#27675
harshach merged 1 commit intomainfrom
harshach/gate-version-tests

Conversation

@harshach
Copy link
Copy Markdown
Collaborator

Describe your changes:

After the Task redesign and version history PRs merged, integration tests for AnnouncementResourceIT, TaskFormSchemaResourceIT, and TaskResourceIT started failing with UnsupportedOperationException: version history not implemented - override in subclass. The version history tests in BaseEntityIT were gated only on supportsPatch, but these entities support patch without exposing version endpoints. Gated all version history tests on supportsVersionHistory (and supportsGetByVersion where relevant) and set those flags to false on the three affected IT classes.

Type of change:

  • Bug fix

Checklist:

Version history integration tests in BaseEntityIT were gated only on
supportsPatch, causing UnsupportedOperationException for entities that
support patch but do not implement version endpoints (Announcement,
TaskFormSchema, Task). Gate them on supportsVersionHistory and disable
the flag for the 3 affected entities.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 23, 2026 23:50
@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Apr 23, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 23, 2026

Code Review ✅ Approved

Gates version history tests on the supportsVersionHistory flag to ensure test execution aligns with feature availability. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

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 updates integration tests to avoid running version-history test cases for entity types that don’t (currently) satisfy the shared BaseEntityIT version-history expectations, preventing UnsupportedOperationException failures after recent Task/version-history changes.

Changes:

  • Gate BaseEntityIT version-history tests on supportsVersionHistory (and supportsGetByVersion where applicable), in addition to supportsPatch.
  • Disable version-history and get-by-version test coverage flags in TaskResourceIT, TaskFormSchemaResourceIT, and AnnouncementResourceIT.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/BaseEntityIT.java Tightens version-history test gating using explicit capability flags.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskResourceIT.java Disables shared version-history tests for Task IT.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskFormSchemaResourceIT.java Disables shared version-history tests for TaskFormSchema IT.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/AnnouncementResourceIT.java Disables shared version-history tests for Announcement IT.

Comment on lines +128 to +129
supportsVersionHistory = false;
supportsGetByVersion = false;
Comment on lines +46 to 48
supportsVersionHistory = false;
supportsGetByVersion = false;
}
supportsSearchIndex = false;
supportsVersionHistory = true;
supportsVersionHistory = false;
supportsGetByVersion = false;
@harshach harshach merged commit ce86553 into main Apr 24, 2026
37 of 43 checks passed
@harshach harshach deleted the harshach/gate-version-tests branch April 24, 2026 00:39
@github-actions
Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 2 failure(s), 19 flaky

✅ 3944 passed · ❌ 2 failed · 🟡 19 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 294 1 2 4
🟡 Shard 2 755 0 4 8
🟡 Shard 3 726 0 6 7
🟡 Shard 4 750 0 2 18
🟡 Shard 5 686 0 1 41
🔴 Shard 6 733 1 4 8

Genuine Failures (failed on all attempts)

Pages/SearchSettings.spec.ts › Restore default search settings (shard 1)
Error: �[2mexpect(�[22m�[31mreceived�[39m�[2m).�[22mtoEqual�[2m(�[22m�[32mexpected�[39m�[2m) // deep equality�[22m

�[32m- Expected  - 0�[39m
�[31m+ Received  + 5�[39m

�[33m@@ -45,10 +45,15 @@�[39m
�[2m        "boost": 20,�[22m
�[2m        "field": "displayName.keyword",�[22m
�[2m        "matchType": "exact",�[22m
�[2m      },�[22m
�[2m      Object {�[22m
�[31m+       "boost": 20,�[39m
�[31m+       "field": "name.keyword",�[39m
�[31m+       "matchType": "exact",�[39m
�[31m+     },�[39m
�[31m+     Object {�[39m
�[2m        "boost": 10,�[22m
�[2m        "field": "name",�[22m
�[2m        "matchType": "phrase",�[22m
�[2m      },�[22m
�[2m      Object {�[22m
Pages/Users.spec.ts › Check permissions for Data Steward (shard 6)
ReferenceError: getApiContext is not defined
🟡 19 flaky test(s) (passed on retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 2 retries)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Domain filter should persist across page navigation (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Search suggestions should be filtered by selected domain (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 2 retries)
  • Features/UserProfileOnlineStatus.spec.ts › Should show "Active recently" for users active within last hour (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › add-event-filter-button is enabled in OSS (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Store Procedure (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Owner Rule Is_Not (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Container (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)

📦 Download artifacts

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

jatinmasaram pushed a commit to jatinmasaram/OpenMetadata that referenced this pull request May 2, 2026
…data#27675)

Version history integration tests in BaseEntityIT were gated only on
supportsPatch, causing UnsupportedOperationException for entities that
support patch but do not implement version endpoints (Announcement,
TaskFormSchema, Task). Gate them on supportsVersionHistory and disable
the flag for the 3 affected entities.
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.

3 participants