Commit graph

16,460 commits

Author SHA1 Message Date
Joey Yakimowich-Payne
8130c06f5b Fix windows error with aiofile failing on starter projects 1.5.0.post1 2025-08-12 13:34:22 -06:00
Ronnie Miller
5b84b51488
docs: Hide previous docs draft build comments on new build (#9334) 2025-08-12 10:18:09 -07:00
Edwin Jose
033453257b
chore: skip mcp everything server test (#9366)
Update test_mcp_util.py
2025-08-12 13:59:00 -03:00
Ítalo Johnny
33d7408096
chore: pin uv version to 0.7.20 (#9365) 2025-08-12 13:11:37 -03:00
Ítalo Johnny
2ef8db7552
chore: bump uv minimum version to 0.7.20 (#9364) 2025-08-12 11:31:26 -03:00
Ítalo Johnny
188220eca3
fix: pin uv to 0.5.6 to restore CI compatibility (#9362) 2025-08-12 11:04:34 -03:00
Ítalo Johnny
5a1ece6dce
test: skip Everything server on Python 3.13 (#9361) 2025-08-12 10:38:26 -03:00
Edwin Jose
163dabdaf3
refactor: Skip MCP Memory leak integration test (#9358)
Update test_mcp_memory_leak.py
2025-08-12 09:26:03 -03:00
Ítalo Johnny
515786c888
fix: improve process cleanup in MCP tests (#9354) 2025-08-11 19:02:47 -03:00
Edwin Jose
6e8767d538
fix: increase Test time out (#9353)
* Improve session fixture cleanup and engine handling

Refactors the session fixture to use an in-memory SQLite engine with proper disposal and ensures tables are dropped and the engine is disposed of after tests. This enhances resource management and test isolation.

* Update src/backend/tests/conftest.py

* Increase pytest timeout to 150 seconds

Updated the pytest timeout setting from 120 to 150 seconds in pyproject.toml to allow tests more time to complete, potentially addressing issues with longer-running tests.

* Update store_pytest_durations.yml

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-08-11 17:25:00 -03:00
Edwin Jose
42c8cfb2cb
fix: Improve session fixture cleanup and engine handling (#9352)
* Improve session fixture cleanup and engine handling

Refactors the session fixture to use an in-memory SQLite engine with proper disposal and ensures tables are dropped and the engine is disposed of after tests. This enhances resource management and test isolation.

* Update src/backend/tests/conftest.py

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-08-11 16:45:06 -03:00
Edwin Jose
1b3493aafd
ref: MCP Tests (#9349)
* update MCP Tests

* [autofix.ci] apply automated fixes

* Update util.py

* [autofix.ci] apply automated fixes

* Refactor MCP session manager for better configurability and cleanup (#9176)

* Add log rotation and header validation features

Introduces support for log rotation via the LANGFLOW_LOG_ROTATION environment variable and CLI/config options, with documentation updates. Adds header validation and sanitization for MCP connections, ensuring RFC 7230 compliance and security. Frontend and backend now support passing custom headers for MCP servers. Includes extensive new and updated unit tests for header handling, MCP utilities, and log rotation.

* Add unit tests for MCP utilities and update disconnect logic

Added comprehensive unit tests for MCP utility functions, session management, header validation, and client classes in test_mcp_util.py. Updated MCPStdioClient and MCPSseClient disconnect methods for clearer session cleanup logic. Refactored test_mcp_component.py to remove redundant and duplicated tests, consolidating coverage in the new test suite.

* [autofix.ci] apply automated fixes

* Update test_mcp_memory_leak.py

* Update util.py

* Improve session and process cleanup in MCP

Added explicit session closing and a short delay to allow subprocess transports to clean up, reducing warnings and potential memory leaks. Test code now waits longer after cleanup and increases process termination timeout to ensure all child processes are properly terminated.

* Improve session and process cleanup logic

Enhanced MCPSessionManager to handle both async and sync session closing methods, using inspection to determine awaitability. Updated memory leak test to more robustly wait for and clean up child processes, logging process states and handling termination more gracefully.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-08-11 15:21:17 -03:00
Edwin Jose
b093c1fadb
refactor(session): migrate to server-based session management and add tests (#9077)
* update MCP Tests

* [autofix.ci] apply automated fixes

* Update util.py

* [autofix.ci] apply automated fixes

* Refactor MCP session manager for better configurability and cleanup (#9176)

* Add log rotation and header validation features

Introduces support for log rotation via the LANGFLOW_LOG_ROTATION environment variable and CLI/config options, with documentation updates. Adds header validation and sanitization for MCP connections, ensuring RFC 7230 compliance and security. Frontend and backend now support passing custom headers for MCP servers. Includes extensive new and updated unit tests for header handling, MCP utilities, and log rotation.

* Add unit tests for MCP utilities and update disconnect logic

Added comprehensive unit tests for MCP utility functions, session management, header validation, and client classes in test_mcp_util.py. Updated MCPStdioClient and MCPSseClient disconnect methods for clearer session cleanup logic. Refactored test_mcp_component.py to remove redundant and duplicated tests, consolidating coverage in the new test suite.

* [autofix.ci] apply automated fixes

* Update test_mcp_memory_leak.py

* Update util.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-08-09 09:30:39 +00:00
Gabriel Luiz Freitas Almeida
80ebe03d94
refactor(core): implement centralized dynamic lazy import system for components (#8932)
* feat: add import utilities for LangFlow components

- Introduced a new module `_importing.py` containing the `import_mod` function.
- This function dynamically imports attributes from specified modules, enhancing modularity and flexibility in component initialization.
- Comprehensive docstring added for clarity on usage and parameters.

* feat: implement dynamic imports for LangFlow components

- Added dynamic import functionality to various LangFlow components, allowing for lazy loading of attributes on access.
- Introduced  mapping in each component's  to manage imports efficiently.
- Enhanced error handling for import failures, providing clearer messages for missing attributes.
- Updated  method to reflect available attributes for better introspection and tab-completion support.
- Comprehensive docstrings added to improve documentation and usability.

* test: add comprehensive tests for dynamic imports and component accessibility

- Introduced integration tests for dynamic import functionality, ensuring components are discoverable and instantiable post-refactor.
- Added unit tests for the `_import_utils` module, validating the `import_mod` function's behavior and error handling.
- Implemented tests to confirm all component modules are importable and maintain backward compatibility with existing import patterns.
- Enhanced performance tests to measure lazy loading efficiency and memory usage during component access.
- Ensured that all components have the required attributes for dynamic loading and that circular imports are prevented.

* chore: update ruff pre-commit hook to version 0.12.2 in configuration file

* refactor: update warning handling for dynamic imports

- Moved the warning suppression for LangChainDeprecationWarning into the dynamic import context to ensure it only applies during the import process.
- This change enhances clarity and maintains the original functionality while improving the robustness of the import mechanism.

* test: enhance dynamic import integration tests for component attributes

- Removed unnecessary import of AgentComponent and added assertions to verify essential attributes of OpenAIModelComponent, including display_name, description, icon, and inputs.
- Ensured that each input field has the required attributes for better validation of component integrity during dynamic imports.

* refactor: update import paths for Message class in conversation utilities

- Changed the import of the Message class from langflow.field_typing to langflow.schema.message across multiple utility files, ensuring consistency and alignment with the updated module structure.
- This refactor enhances code clarity and maintains compatibility with the latest schema definitions.

* refactor: remove Vectara components from LangFlow

- Deleted the Vectara components module from the codebase, streamlining the component structure.
- This change helps to reduce complexity and maintain focus on core functionalities.

* refactor: remove Vectara references from LangFlow component imports

- Eliminated Vectara from both the import statements and dynamic imports mapping, streamlining the component structure.
- This change contributes to reducing complexity and maintaining focus on core functionalities within the LangFlow framework.

* [autofix.ci] apply automated fixes

* fix: remove 'vectara' from __all__ in components module

* refactor: improve error handling tests for dynamic imports

* test: add tests for ModuleNotFoundError handling with None and special module names

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-08-05 20:48:59 +00:00
Mendon Kissling
087c1a2591
docs: refresh custom dependencies page (#9291)
* update-for-tomls

* move-explanation-to-beginning

* Apply suggestions from code review

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
2025-08-02 15:25:16 +00:00
Mendon Kissling
f3701989b8
docs: refresh cli page (#9274)
* cli-values

* split-out-introductory-commands

* remove-feature-flag-envs

* cleanup-cli-links

* fix type

* clarification-on-cli-superuser

* remove-internal-env-vars

* alignment and editorial

* audit booleans

---------

Co-authored-by: April M <april.murphy@datastax.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
2025-08-02 15:24:31 +00:00
Mendon Kissling
21f678dd90
docs: kubernetes best practices and postgresql dba guide (#9226)
* content

* dba-style

* kubernetes-best-practices

* edits

* spacing-cleanup

* see-also

* trailing-space

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* title-case-and-via

* steps-for-intro

* ha-postgres

* dba-page

* code-review

* a-the

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* move-file-location

* split-out-bp-page

* cleanup-links

* link

* editorial - k8s dev and prod deployments

* working on dba and best practices

* finish best practices

* fix link

* finish dba and best practices

* fix migration command

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
2025-08-01 21:37:56 +00:00
Mendon Kissling
67c2523589
docs: add example for plist (#9294)
* add-example-for-plist

* ampersands
2025-08-01 21:23:25 +00:00
Cristhian Zanforlin Lousa
bdcc238618
refactor: Improve cookie security and centralized utility (#9240)
*  (authContext.tsx): Add setCookieWithOptions function to set cookies with specific options for better security and control
📝 (use-post-refresh-access.ts): Update cookies.set calls to use setCookieWithOptions function for consistent cookie settings
♻️ (utils.ts): Refactor setCookieWithOptions function to include httpOnly option and update sameSite values to lowercase for consistency

* 📝 (frontend): add useGetCookieAuth and useSetCookieAuth hooks for managing cookies in auth context
🔧 (frontend): refactor authStore to use new cookie hooks for managing access token and api key cookies
🔧 (frontend): refactor use-post-logout and use-post-refresh-access to use new cookie hooks for cookie management

* 📝 (frontend): Remove redundant useGetCookieAuth hook and use direct access to cookies in authStore and related components
🔧 (utils): Refactor getAuthCookie and setAuthCookie functions to use react-cookie directly for better code organization and readability
2025-08-01 14:38:01 +00:00
Edwin Jose
b18c58e836
ref: Increase max file upload size to 1024 MB (#9276)
Increase max file upload size to 1024 MB

Updated the default value of max_file_size_upload from 100 MB to 1024 MB in the Settings class to allow larger file uploads.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-08-01 14:30:55 +00:00
Cristhian Zanforlin Lousa
caccdb79e2
fix: Add metadata filtering for Chroma components (#9137)
* 🐛 (chroma.py, local_db.py): Handle ImportError when importing filter_complex_metadata function to avoid crashing the application
💡 (chroma.py, local_db.py): Add try-except block to gracefully handle ImportError and log a warning message if the function cannot be imported

* ♻️ (local_db.py): remove unnecessary try-except block and simplify document adding process in LocalDBComponent

* 🔧 (chroma.py): Remove unused import 'filter_complex_metadata' and add support for filtering complex metadata to prevent ChromaDB errors
🔧 (test_chroma_vector_store_component.py): Add test cases for filtering complex metadata, preserving simple metadata types, handling single file upload scenario, fallback behavior when import fails, and handling empty and None metadata values.

* [autofix.ci] apply automated fixes

* 🐛 (test_chroma_vector_store_component.py): fix failing test due to None value being filtered out by ChromaDB metadata handling

* 🔧 (test_chroma_vector_store_component.py): refactor test method names and data to improve clarity and consistency in metadata filtering and preservation logic

* 🐛 (test_chroma_vector_store_component.py): fix missing variable assignment for error message in mocked import error to improve error handling and debugging in tests

* [autofix.ci] apply automated fixes

* 🔧 (test_chroma_vector_store_component.py): delete the file test_chroma_vector_store_component.py as it is no longer needed in the project

* [autofix.ci] apply automated fixes

*  (test_chroma_vector_store_component.py): add unit tests for ChromaVectorStoreComponent including create_db, create_collection_with_data, similarity_search, mmr_search, search_with_different_types, search_with_score, duplicate_handling, chroma_collection_to_data, metadata_filtering_with_complex_data, metadata_filtering_fallback

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-08-01 14:24:07 +00:00
Cristhian Zanforlin Lousa
73225f4d81
fix: Add outputs support to SQLAgentComponent (#9173)
*  (sql.py): add new output definitions for the SQLAgentComponent to include 'Agent' and 'Response' outputs for better functionality and flexibility

* 📝 (sql.py): update import statement for Output class to match new file structure
♻️ (sql.py): refactor Output class usage to remove unnecessary attributes and improve code readability

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-08-01 14:23:59 +00:00
dependabot[bot]
cf863ff4a9
build(deps):(deps): bump actions/setup-python from 4 to 5 (#9285)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:14:10 -03:00
dependabot[bot]
e3710f7431
build(deps):(deps): bump astral-sh/setup-uv from 3 to 6 (#9286)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:53 -03:00
dependabot[bot]
a1c770911c
build(deps):(deps): bump actions/setup-node from 3 to 4 (#9287)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:38 -03:00
dependabot[bot]
b46bf61e84
build(deps):(deps): bump actions/github-script from 6 to 7 (#9288)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:27 -03:00
dependabot[bot]
ec80bae18b
build(deps):(deps): bump autofix-ci/action from 551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef to 635ffb0c9798bd160680f18fd73371e355b85f27 (#8807)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:12 -03:00
Cristhian Zanforlin Lousa
c807c3a663
feat: Add Gemini 2.5 and 2.0 model metadata (#9277)
 (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models.

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-08-01 13:37:46 +00:00
Mendon Kissling
212362f3e6
docs: refresh telemetry page (#9272)
* add-desktop-field-and-remove-notion-artifacts

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* stash

* populate-empty-headings

* clarity

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
2025-08-01 13:32:03 +00:00
April I. Murphy
3369e28f3b
docs: Add more detail to some template notes (#9230)
* update travel agent template description

* update vector store rag description

* update sequential task agent description

* update chat memory template description

* update financial report parser description

* update basic prompting template description

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-08-01 13:08:52 +00:00
April I. Murphy
15637403ad
docs: Standardize style of component names, especially when used in links (#9251)
* standardize component name style and links pt 1

* component name standardization pt 2

* standardization pt 3

* standardize component names pt 4

* peer review

* fix lnk

* update edit tool actions section

* standardize Agent, agent, agentic

* more style auditing

* missing imports
2025-08-01 12:52:18 +00:00
Jordan Frazier
8e4577f0a7
ci: add checkout step to publish to pypi steps in nightly workflow (#9280)
Add checkout step to publish to pypi steps in nightly workflow
2025-08-01 04:01:21 -07:00
Eric Pinzur
938d35812b
chore:more cross-platform test deubgging (#9270) 2025-07-31 17:34:31 +02:00
Eric Pinzur
2bd16f5f86
chore: continue cross-product debug (#9269)
chore:continue cross-product debug
2025-07-31 16:32:47 +02:00
Eric Pinzur
97d4883c68
bug: more cross-platform debug (#9266) 2025-07-31 16:00:17 +02:00
Eric Pinzur
8e892a2f88
bug: debug nightly build (#9263) 2025-07-31 15:38:31 +02:00
Eric Pinzur
20343ea5f9
bug: more cross-platform test debug (#9262) 2025-07-31 15:23:31 +02:00
Eric Pinzur
efe5bddd5b
bug:continue to debug cross-platform tests (#9261) 2025-07-31 15:02:45 +02:00
Eric Pinzur
860c41bacf
bug: continue to debug cross-platform test issues (#9260) 2025-07-31 14:45:08 +02:00
Eric Pinzur
04e8cbe4a1
bug: another fix attempt for the cross-platform tests (#9259) 2025-07-31 14:19:44 +02:00
Eric Pinzur
8358dec09e
bug: more cross platform testing tweaks (#9258) 2025-07-31 14:05:19 +02:00
Eric Pinzur
0c129bef15
bug: simplified cross-platform test logic (#9256) 2025-07-31 13:25:50 +02:00
Eric Pinzur
25f1107e18
bug: potential fix for cross-platform test workflows (#9255) 2025-07-31 12:55:50 +02:00
Eric Pinzur
cb4332dc43
bug: continue to debug manual cross-platform test (#9254) 2025-07-31 12:37:17 +02:00
Eric Pinzur
1314002f43
bug: try again to fix the manual test run (#9253) 2025-07-31 11:54:02 +02:00
Eric Pinzur
7827122c3c
bug: fix the manual cross platform test run (#9252) 2025-07-31 11:22:01 +02:00
April I. Murphy
483af5b090
docs: Fix a broken anchor (#9249)
* fix anchor

* random change to retrigger CI
2025-07-30 20:06:35 +00:00
Eric Pinzur
e1d3e741fd
feat: added install matrix before release (#9205)
* added install matrix before release

* adds ad-hoc testing

* temp enable test

* test changes

* fix test config

* fix package install

* commonize code

* renamed files

* fix issue

* remvoe run id

* fix base build

* revert main package build change

* fix build

* fix upload

* revert ci to main

* updated release workflow naming

* add cross-platform tests to nightly build
2025-07-30 19:57:59 +00:00
Mendon Kissling
91264a0595
docs: refresh docker page (#9208)
* brb

* compose-section-rewrite

* create-dockerfile

* custom-python-files-in-dockerfile

* update intro bullets, fix some code syntax

---------

Co-authored-by: April M <april.murphy@datastax.com>
2025-07-30 19:05:11 +00:00
Mendon Kissling
8858b82085
docs: reference exported key (#9245)
* reference-exported-key

* double-quotes-for-var-expansion
2025-07-30 16:37:42 +00:00