Skip to content

Add update functionality for database and cloud storage connections#351

Merged
Edwardvaneechoud merged 2 commits intomainfrom
claude/fix-connection-update-button-fUTBQ
Mar 15, 2026
Merged

Add update functionality for database and cloud storage connections#351
Edwardvaneechoud merged 2 commits intomainfrom
claude/fix-connection-update-button-fUTBQ

Conversation

@Edwardvaneechoud
Copy link
Copy Markdown
Owner

Summary

This PR adds the ability to update existing database and cloud storage connections, complementing the existing create functionality. The implementation includes backend logic to handle partial updates (especially for sensitive fields like passwords/secrets) and frontend UI improvements to support edit mode.

Key Changes

Backend (flowfile_core)

  • Database Connections: Added update_database_connection() function that updates connection details while allowing optional password updates (keeps existing password if not provided)
  • Cloud Connections: Added update_cloud_connection() function with helper _update_cloud_secret() to handle selective secret field updates for AWS and Azure credentials
  • API Routes: Added PUT endpoints for both /db_connection_lib and /cloud_connection to expose update functionality
  • Imports: Added encrypt_secret import to support re-encrypting updated secrets

Frontend (flowfile_frontend)

  • API Layer: Added updateDatabaseConnectionApi() and updateCloudStorageConnectionApi() functions to call the new backend endpoints
  • Database Connection UI:
    • Disabled connection name field in edit mode (prevents renaming)
    • Made password field optional when editing with "Leave blank to keep existing" placeholder
    • Updated validation to allow empty password in edit mode
  • Cloud Connection UI:
    • Disabled connection name field in edit mode
    • Updated secret field placeholders to indicate optional updates in edit mode
    • Modified validation logic to allow empty secret fields when editing
  • View Components: Updated DatabaseView.vue and CloudConnectionView.vue to route submissions to create or update APIs based on edit mode, and pass isEditing prop to form components

Implementation Details

  • Secret fields use a "keep existing if empty" pattern to avoid requiring users to re-enter sensitive credentials during updates
  • Connection names are immutable (disabled in edit mode) to maintain referential integrity
  • The backend validates that connections exist before attempting updates, returning 404 errors for missing connections
  • All secret updates are properly encrypted using the existing encrypt_secret() function

https://claude.ai/code/session_01823mem4d6LxDCJAHuWkpFR

The Modify button existed in both connection views but always called the
create endpoint, which rejected duplicate names. Added PUT endpoints and
update service functions that modify existing connections in-place,
preserving secrets when fields are left blank.

https://claude.ai/code/session_01823mem4d6LxDCJAHuWkpFR
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 15, 2026

Deploy Preview for flowfile-wasm canceled.

Name Link
🔨 Latest commit aa363ee
🔍 Latest deploy log https://app.netlify.com/projects/flowfile-wasm/deploys/69b70576a39d980008ff3c6c

@Edwardvaneechoud Edwardvaneechoud merged commit 98d43ac into main Mar 15, 2026
21 checks passed
@Edwardvaneechoud Edwardvaneechoud deleted the claude/fix-connection-update-button-fUTBQ branch March 15, 2026 19:20
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