- Separate TLS and non-TLS branches to handle different connection types
- Each branch now fully handles client creation, query execution, and cleanup
- Follows the same pattern used in pg_executor.rs
The TLS connector fix requires postgres-native-tls to be available as
a dependency in windmill-api. This was already in the workspace but
not explicitly added to the windmill-api crate dependencies.
The ssl_mode values verify-ca and verify-full are already normalized
to 'require' earlier in the function (line 689), so we only need to
check for 'require' in the conditional.
The setup_ducklake_catalog_db_inner function was using NoTls even when
sslmode=require was set in the connection string, causing TLS handshake
failures with AWS RDS PostgreSQL.
This fix adds conditional TLS connector logic similar to pg_executor.rs:
- Uses native_tls::TlsConnector with MakeTlsConnector when sslmode requires SSL
- Accepts invalid certs/hostnames for compatibility with managed DB services
- Falls back to NoTls for non-SSL connections
Fixes the 'error performing TLS handshake: no TLS implementation configured'
error when setting up DuckLake instance catalogs with RDS PostgreSQL.
* handle conversation for preview endpoints
* rm
* way better chat logic
* remove old logic
* no streaming in flow input
* pass conv id to preview func
* max width on input
* add info
* cleaning
* nits
* nits
* use streaming in preview
* fix(backend): replace regex with one-pass algorithm for PowerShell param parsing
The previous regex-based approach used which would
fail when encountering nested parentheses inside the param block, such as
or .
This commit replaces the regex with a proper one-pass parser that:
- Tracks parenthesis depth to correctly handle nesting
- Respects string quotes (both single and double quotes)
- Handles PowerShell's backtick escape character
- Works correctly with complex default values and function calls
Changes:
- Removed RE_POWERSHELL_PARAM regex constant
- Added extract_powershell_param_block() function for extracting param contents
- Added extract_powershell_param_block_full() function for extracting full param block
- Updated parse_powershell_file() in windmill-parser-bash
- Updated pwsh_executor.rs to use the new extractor
- Added comprehensive test cases for nested parens and quoted strings
Fixes#7079
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* refactor(backend): combine PowerShell param extraction functions
Merged extract_powershell_param_block() and extract_powershell_param_block_full()
into a single function with a boolean parameter to control output format:
- include_keyword=false returns just contents between parentheses
- include_keyword=true returns full param(...) block
This eliminates code duplication while maintaining all existing functionality.
Co-authored-by: hugocasa <hugocasa@users.noreply.github.com>
* fix(backend): improve pwsh param block parsing
* chore: publish parser
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: hugocasa <hugocasa@users.noreply.github.com>