fix: preserve api key configuration on flow export#12129
fix: preserve api key configuration on flow export#12129HimavarshaVS merged 47 commits intorelease-1.8.1from
Conversation
Made-with: Cursor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-1.8.1 #12129 +/- ##
================================================
Coverage ? 37.35%
================================================
Files ? 1592
Lines ? 78338
Branches ? 11884
================================================
Hits ? 29265
Misses ? 47400
Partials ? 1673
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ai/langflow into fix-api-key-components
|
Ruff errors |
|
@coderabbitai Can you assess the merge-worthiness of this PR? note that it's a critical bugfix, so dont be overly picky as this was a rushed prioritized patch, just if there's any major major concerns. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainLet me gather the PR details to give you a proper assessment. 🏁 Script executed: Length of output: 5526 Let me look at the actual code changes in the key files. 🏁 Script executed: Length of output: 12492 Let me investigate the failing CI jobs and the unused function. 🏁 Script executed: Length of output: 2596
✅ Overall Verdict: Mergeable (with 2 minor flags to be aware of)The core logic is sound and correctly addresses the bug across both frontend and backend. CI is mostly green — the two failing jobs ("Update Component Index" / "Update Starter Projects") are automated artifact-update workflows, not correctness tests. Their logs are empty, suggesting an infra/permissions issue unrelated to the code changes. What the fix does (and it's correct):
🚩 Minor concerns (not blocking for a hotfix):
No correctness bugs, no data loss risks, Ruff/mypy all pass. Safe to merge. 🧠 Learnings used |
Summary
-Ensure api_key values are preserved across exports and imports, whether they are raw secrets or environment variable names.
-When exporting without API keys, strip only sensitive values while preserving environment variable names (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY) so flows continue to reference external configuration.
Exporting flows:
-If “Save with API keys” is disabled, password fields are cleared, but api_key fields that look like environment variable names are preserved; other API‑like password fields are cleared.
Testing
Screen.Recording.2026-03-11.at.4.26.44.AM.mov