Skip to content

feat(connections): add ConnectionsRouterClassBase for pluggable connection routing#27662

Merged
harsh-vador merged 7 commits intomainfrom
classbase-askcollate-connections-support
Apr 27, 2026
Merged

feat(connections): add ConnectionsRouterClassBase for pluggable connection routing#27662
harsh-vador merged 7 commits intomainfrom
classbase-askcollate-connections-support

Conversation

@harsh-vador
Copy link
Copy Markdown
Contributor

@harsh-vador harsh-vador commented Apr 23, 2026

Describe your changes:

Fixes 3502

Summary

  • Introduces ConnectionsRouterClassBase — centralizes all connection-related route generation into a singleton class, mirroring the ObservabilityRouterClassBase pattern
  • Updates EditConnectionFormPage and AddServicePage to use connectionsRouterClassBase for all navigate() calls so Collate can override paths without touching OSS components
  • Adds ConnectionsRouterClassBase.test.ts with full unit coverage

Motivation

Collate embeds connection pages inside /askCollate/connections/. When OSS pages call navigate(getEditConnectionPath(...)) directly, navigation escapes the embedded context. This class provides a seam for Collate's build-time class replacement plugin to swap in path-prefixed variants.

Changes

  • utils/ConnectionsRouterClassBase.ts — new singleton with methods: getSettingsServicesPath, getServiceDetailsPath, getEditConnectionPath, getAddServicePath, getPathByServiceFQN, getLogsViewerPath
  • pages/EditConnectionFormPage/EditConnectionFormPage.component.tsxnavigate(getPathByServiceFQN(...))connectionsRouterClassBase.getPathByServiceFQN(...)
  • pages/AddServicePage/AddServicePage.component.tsx — all navigation calls migrated to router class

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

  • Routing updates:
    • Added getEditIngestionPath method to ConnectionsRouterClassBase to support pluggable ingestion route generation.

This will update automatically on new commits.

@harsh-vador harsh-vador self-assigned this Apr 23, 2026
@harsh-vador harsh-vador requested a review from a team as a code owner April 23, 2026 09:54
@harsh-vador harsh-vador added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
61.94% (61779/99725) 42.06% (33023/78509) 45.11% (9771/21657)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

🟡 Playwright Results — all passed (17 flaky)

✅ 3956 passed · ❌ 0 failed · 🟡 17 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 752 0 7 8
🟡 Shard 3 730 0 2 7
🟡 Shard 4 756 0 3 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 733 0 4 8
🟡 17 flaky test(s) (passed on retry)
  • 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/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/Glossary/MUIGlossaryMutualExclusivity.spec.ts › MUI-ME-H01: ME glossary (top level) children render Radio with ME behavior (shard 2, 1 retry)
  • Features/IncidentManager.spec.ts › Verify filters in Incident Manager's page (shard 2, 2 retries)
  • Features/IncidentManager.spec.ts › Next, Previous and page indicator (shard 2, 2 retries)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › workflow-name-input is disabled in OSS (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Integer (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Container (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for ApiEndpoint (shard 4, 1 retry)
  • Features/AutoPilot.spec.ts › Create Service and check the AutoPilot status (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for dashboard -> searchIndex (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Tier Add, Update and Remove (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 27, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Introduces ConnectionsRouterClassBase to enable pluggable connection routing while resolving the incorrect cancel navigation path to settings.

✅ 1 resolved
Bug: Cancel navigates to generic /settings/services instead of service-type tab

📄 openmetadata-ui/src/main/resources/ui/src/pages/AddServicePage/AddServicePage.component.tsx:113-115 📄 openmetadata-ui/src/main/resources/ui/src/utils/ConnectionsRouterClassBase.ts:33-38
In handleSelectServiceCancel, the old code called getSettingPath(GlobalSettingsMenuCategory.SERVICES, getServiceRouteFromServiceType(serviceCategory)) which navigated to the specific service-type tab (e.g., /settings/services/databases). The new code calls connectionsRouterClassBase.getSettingsServicesPath() which only produces /settings/services, losing the service-type context.

This means when a user cancels adding a Database service, they land on the generic services page instead of the databases tab, which is a UX regression.

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

@harsh-vador harsh-vador merged commit 4357f95 into main Apr 27, 2026
46 checks passed
@harsh-vador harsh-vador deleted the classbase-askcollate-connections-support branch April 27, 2026 08:38
harsh-vador added a commit that referenced this pull request Apr 27, 2026
…ction routing (#27662)

* feat(connections): add ConnectionsRouterClassBase for pluggable connection routing

* address gitar

* fix checkstyle

* add edit ingestion path

* fix checkstyle

(cherry picked from commit 4357f95)
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants