Skip to content

Fix case insensitive connector type matching#7386

Merged
Linker44 merged 6 commits intomainfrom
fix-case-insensitive-connector-type-matching
Feb 19, 2026
Merged

Fix case insensitive connector type matching#7386
Linker44 merged 6 commits intomainfrom
fix-case-insensitive-connector-type-matching

Conversation

@Linker44
Copy link
Contributor

@Linker44 Linker44 commented Feb 13, 2026

Ticket ENG-2706

Description Of Changes

Upon the upload of a new custom template we try to update existing connections by searching for connection configs with the same connector type.
If the connector type is uppercase it will stay uppercased for the connection config but the connector_type value being compared against will be casted to lowercase. this causes a type mismatch and zero connectors being found so no update is done.

We should cast the connection config connector type to lowercase since that is what we do for connector_type.

Code Changes

Steps to Confirm

  1. Upload a custom template with an uppercase connector_type.
  2. set up an integration with it.
  3. upload the same custom template with the same connector type but with an updated saas config. validate that the update was sucessfull for the connection config.

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@Linker44 Linker44 requested a review from tvandort February 13, 2026 01:18
@Linker44 Linker44 self-assigned this Feb 13, 2026
@Linker44 Linker44 requested a review from a team as a code owner February 13, 2026 01:18
@Linker44 Linker44 requested review from JadeCara and removed request for a team February 13, 2026 01:18
@vercel
Copy link
Contributor

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Feb 18, 2026 7:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Feb 18, 2026 7:45pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 13, 2026

Greptile Overview

Greptile Summary

Fixed a bug where connector type matching failed when the stored type field in saas_config had different casing than the connector template. The fix adds case-insensitive comparison using sa_func.lower() on both sides of the filter condition, ensuring that connector configs are properly updated regardless of case differences.

  • Changed the database filter to use sa_func.lower() for case-insensitive comparison
  • Added import for sqlalchemy func as sa_func
  • Added logging to track how many connection configs were found for the connector type
  • Changed return type annotation from Iterable[ConnectionConfig] to list[ConnectionConfig] for clarity
  • Added comprehensive test case that validates uppercase stored types match lowercase template types
  • Test includes manual cleanup that should be removed per project guidelines

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is straightforward, well-tested, and addresses a specific bug. The case-insensitive comparison is the correct approach for this issue. The only concern is a minor style violation with manual test cleanup that doesn't affect production code.
  • No files require special attention

Important Files Changed

Filename Overview
src/fides/service/connection/connection_service.py Added case-insensitive matching for connector types using sa_func.lower() and added helpful logging
tests/service/test_connection_service.py Comprehensive test for case-insensitive connector type matching; includes unnecessary manual cleanup

Last reviewed commit: 8f035bc

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@Linker44 Linker44 removed the request for review from JadeCara February 13, 2026 01:25
@Linker44 Linker44 added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 504ab85 Feb 19, 2026
54 checks passed
@Linker44 Linker44 deleted the fix-case-insensitive-connector-type-matching branch February 19, 2026 16:58
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

Comments