Skip to content

fix: Make connection string property key lookup case-insensitive#196

Merged
YunchuWang merged 1 commit intomainfrom
copilot-finds/bug/fix-connection-string-case-sensitivity
Mar 25, 2026
Merged

fix: Make connection string property key lookup case-insensitive#196
YunchuWang merged 1 commit intomainfrom
copilot-finds/bug/fix-connection-string-case-sensitivity

Conversation

@YunchuWang
Copy link
Copy Markdown
Member

Fixes #189

Problem

DurableTaskAzureManagedConnectionString parses connection string property keys case-sensitively. A connection string with differently-cased keys (e.g., 'endpoint' instead of 'Endpoint') fails validation, violating the Azure SDK convention that connection string property names are case-insensitive.

Changes

  • Normalize keys to lowercase during parsing
  • Use lowercase in lookups
  • Preserves value casing while making key matching case-insensitive
  • Backward-compatible: existing PascalCase connection strings continue to work

… lookup

Azure connection string keys should be case-insensitive per Azure SDK
conventions. The parser stored keys as-is but looked them up by exact
case, causing failures when keys used lowercase or mixed casing
(e.g. 'endpoint=...' instead of 'Endpoint=...').

Fix: normalize keys to lowercase during parsing and lookup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 23, 2026 22:53
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 fixes #189 by making DurableTaskAzureManagedConnectionString treat connection string property keys case-insensitively, aligning behavior with common Azure SDK conventions while preserving value casing.

Changes:

  • Normalize parsed connection string keys to lowercase.
  • Perform lookups using lowercase keys.
  • Add unit tests covering lowercase/uppercase/mixed-case keys and value-casing preservation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/durabletask-js-azuremanaged/src/connection-string.ts Lowercases keys during parsing and during property lookup to make key matching case-insensitive.
packages/durabletask-js-azuremanaged/test/unit/connection-string.spec.ts Adds test coverage for case-insensitive key parsing and confirms values keep original casing.

github-actions bot pushed a commit that referenced this pull request Mar 24, 2026
Verification sample: examples/verification/pr-196-connection-string-case-insensitive.ts

Verifies that connection string property keys are parsed case-insensitively,
matching Azure SDK conventions. Tests parsing with lowercase, uppercase,
mixed-case, and PascalCase keys, plus an end-to-end orchestration using a
lowercase connection string against the DTS emulator.

Generated by pr-verification-agent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added sample-verification-added PR has been verified with a sample application and removed pending-verification labels Mar 24, 2026
@YunchuWang YunchuWang merged commit 60e4eff into main Mar 25, 2026
32 checks passed
@YunchuWang YunchuWang deleted the copilot-finds/bug/fix-connection-string-case-sensitivity branch March 25, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sample-verification-added PR has been verified with a sample application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[copilot-finds] Bug: Connection string parser uses case-sensitive key lookup

3 participants