Skip to content

Make host/port editable for non-managed databases #6155

Open
pawelangelow wants to merge 5 commits into
mainfrom
feature/make-host-editable-for-non-managed-dbs
Open

Make host/port editable for non-managed databases #6155
pawelangelow wants to merge 5 commits into
mainfrom
feature/make-host-editable-for-non-managed-dbs

Conversation

@pawelangelow

@pawelangelow pawelangelow commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Makes a database's host and port editable from the edit connection
form for non-managed databases, while keeping the endpoint locked for
cloud-managed databases (Redis Cloud and Azure).

Relates to #6148 and #5752


Note

Medium Risk
Changes database update validation and connection endpoint editing; misclassification of managed vs non-managed could block legitimate edits or allow stale cloud metadata.

Overview
Non-managed databases can now change host and port in the edit connection form; Redis Cloud and Azure managed instances keep a read-only endpoint in the UI and on the API.

The API adds a guard on PATCH /databases/:id that rejects host/port changes when cloudDetails.cloudId or providerDetails is present, using isEndpointChanged so unchanged values in the payload are not treated as edits. When a non-managed DB still uses the default host:port alias, the display name is synced to the new endpoint unless the user set a custom name or sends an explicit name.

The UI introduces isManagedDatabase (aligned with DatabaseService.isManagedDatabase), wires isManaged through the manual connection flow, shows editable host/port in EditConnection only for non-managed edits, and adjusts DbInfo so read-only endpoint summary appears for managed/cloud cases. Coverage includes unit, API integration, and Playwright e2e for edit host behavior.

Reviewed by Cursor Bugbot for commit 90f7bc3. Bugbot is set up for automated code reviews on this repo. Configure here.

@pawelangelow pawelangelow self-assigned this Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 93.11% 16509/17731
🟡 Branches 75.37% 5256/6974
🟢 Functions 87.42% 2530/2894
🟢 Lines 92.96% 15785/16980

Test suite run success

3654 tests passing in 319 suites.

Report generated by 🧪jest coverage report action from 90f7bc3

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.7% 26830/32054
🟡 Branches 69.41% 11421/16454
🟡 Functions 79.02% 7173/9077
🟢 Lines 84.17% 26137/31054

Test suite run success

7600 tests passing in 847 suites.

Report generated by 🧪jest coverage report action from 90f7bc3

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.15% 18187/22977
🟡 Branches 61.91% 8482/13699
🟡 Functions 66.91% 2459/3675
🟡 Lines 78.76% 17123/21740

@pawelangelow pawelangelow marked this pull request as ready for review July 8, 2026 12:26
@pawelangelow pawelangelow requested a review from a team as a code owner July 8, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants