Skip to content

Conversation

@royendo
Copy link
Contributor

@royendo royendo commented Jan 13, 2026

  • auto-detect duplicate connector names
  • common creds generated as ${key}_#
    • password, token, dsn are ${driverName}${key}#
  • added feature to let user use '{{ env "key" }}
    • insensitive reference to '{{ env "key" }}, go requires all caps or no ca

PART 2 of this PR will add fallback to OS level creds. In this case, we should add visual warnings to user that this is occurring. Thinking of adding yellow text state.

https://www.loom.com/share/c0b4e5fb20c449058c809b304c66a81b

@royendo royendo mentioned this pull request Jan 13, 2026
8 tasks
@royendo
Copy link
Contributor Author

royendo commented Jan 20, 2026

Code Review

Professionalism & Code Quality: ⭐⭐⭐⭐ (Good)

Strengths:

  • Clean implementation of the env template function with case-insensitive matching
  • Good test coverage for the new env function with multiple edge cases including case-insensitivity tests
  • Well-documented template function in comments

Issues to Address:

  1. Redundant loop for case-insensitive matching in runtime/parser/template.go:280-285:

    // Try case-insensitive match
    for key, value := range data.Variables {
        if strings.EqualFold(key, name) {
            return value, nil
        }
    }

    Consider using a normalized map upfront to avoid O(n) iteration on every lookup.

  2. Renamed but unused parameter _connectorInstanceName in web-common/src/features/connectors/code-utils.ts:128 - If unused, remove it entirely rather than prefixing with _.

E2E Testing: ⚠️ Missing

No E2E tests for the env variable templating behavior.

Recommendations:

  • Add E2E test verifying .env variables are correctly resolved in connector/source YAML files
  • Test the case-insensitive matching behavior from a user perspective

General Comments:

  • The originalEnvBlob tracking in submitAddDataForm.ts is complex but necessary for conflict detection. Consider adding inline comments explaining the flow.
  • Good approach to store pre-computed env blobs for concurrent "Save Anyway" operations.

Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

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

Approving the backend changes

@royendo royendo requested a review from ericpgreen2 January 22, 2026 16:49
@royendo
Copy link
Contributor Author

royendo commented Jan 22, 2026

thanks!

@ericpgreen2 tagged you for a final review! updated the e2e to expect the new variables and tested the env function

Added 'aws_access_token' to the list of credentials and removed 'privateKey' for Snowflake.
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.

3 participants