Skip to content

fix(flows): escape wildcard flow names when deduplicating#12493

Open
suyua9 wants to merge 1 commit into
langflow-ai:release-1.9.0from
suyua9:fix/flow-name-like-wildcards-suyua9
Open

fix(flows): escape wildcard flow names when deduplicating#12493
suyua9 wants to merge 1 commit into
langflow-ai:release-1.9.0from
suyua9:fix/flow-name-like-wildcards-suyua9

Conversation

@suyua9
Copy link
Copy Markdown

@suyua9 suyua9 commented Apr 3, 2026

Summary

  • escape SQL LIKE wildcards when searching for existing numbered copies in _deduplicate_flow_name()
  • keep exact numbered-suffix matching with the existing regex-based copy-number extraction
  • add a regression test covering % and _ in flow names so unrelated matches no longer inflate the next suffix

Testing

  • git diff --check -- src/backend/base/langflow/api/v1/flows_helpers.py src/backend/tests/unit/api/v1/test_rename_flow_to_save.py
  • python3 -m py_compile src/backend/base/langflow/api/v1/flows_helpers.py src/backend/tests/unit/api/v1/test_rename_flow_to_save.py
  • uvx ruff check src/backend/base/langflow/api/v1/flows_helpers.py src/backend/tests/unit/api/v1/test_rename_flow_to_save.py
  • uv run python -m pytest -q tests/unit/api/v1/test_rename_flow_to_save.py -k "duplicate_flow_name_escapes_like_wildcards or duplicate_flow_name_regex_patterns" (started locally but did not return in a reasonable time window in this checkout; repository CI should provide the authoritative run)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0d6409c-df11-4bb3-a578-3fb7b120cf37

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added community Pull Request from an external contributor bug Something isn't working labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working community Pull Request from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant