Commit graph

16,440 commits

Author SHA1 Message Date
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
April I. Murphy
aa70a15654
docs: Remove template pages because templates already include explanatory notes within Langflow (#9235)
* finish template description

* remove travel planning and simple agent pages

* remove sequential agent and memory chatbot

* remove 2 template, finish redirects, sidebar

* remove vector store rag page

* remove basic prompting page

* add bold to template name

* fix link
2025-07-30 16:35:50 +00:00
Mendon Kissling
7123c507a7
docs: LANGFLOW_ENABLE_SUPERUSER_CLI environment variable (#9223)
* add-superuser-cli-note-and-env-var

* code-review

* env-var-link

* resolve CLI superuser confusion

---------

Co-authored-by: April M <april.murphy@datastax.com>
2025-07-30 16:33:01 +00:00
April I. Murphy
47be23e02a
docs: Touchup cloud provider deployment pages (#9241)
* recreate 9232 because brokne build

* fix links

* fix nav level

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-07-30 13:09:56 +00:00
Ítalo Johnny
067c1d7fc2
fix: remove duplicated Makefile target format_frontend (#9191)
fix: remove duplicated format_frontend target to silence warnings

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-07-30 12:01:28 +00:00
Eric Pinzur
ed4acabc0c
bug: fix frontend code coverage scoring (#9209)
fix frontend code coverage scoring
2025-07-30 05:11:27 +00:00
Eric Pinzur
da4208dcc9
feat: generate custom coverage config to omit legacy and external compoents (#9221)
* feat: generate custom coverage config to omit legacy and external components

* lint

* fix components config

* also remove deactivated componenets

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-30 04:46:19 +00:00
Harjoben Singh
8d6505558b
docs: fixed broken links in CONTRIBUTING.md (#9231)
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
2025-07-30 01:37:50 +00:00
Mendon Kissling
c03074300f
docs: combine api keys and authentication pages (#9172)
* combine-api-keys-and-auth

* remove-old-page-redirect-and-sidebar

* Update docs/docs/Configuration/api-keys-and-authentication.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix-parse-error

* Apply suggestions from code review

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

* upto-env-vars

* clarity-in-example

* clarify-user-creation

* specify-which-table

* links

* link text

* environment variable alignment

* environment variable table cleanup

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
2025-07-30 01:07:15 +00:00
Gabriel Luiz Freitas Almeida
cd4464d6b1
refactor(tests): parameterize template tests and update timeout use (#9224)
* refactor: Simplify flow execution validation by removing unnecessary asyncio.wait_for calls

Updated the validate_flow_execution function to directly use the client.post and client.get methods with a timeout parameter, improving code readability and maintainability. This change eliminates redundant timeout handling while ensuring consistent timeout values across API calls.

* refactor: Enhance template tests for improved structure and validation

Refactored the template tests in `test_starter_projects.py` to utilize parameterization for better readability and maintainability. Introduced helper functions to retrieve template files and disabled tracing for all tests. Updated individual test methods to validate JSON structure, flow execution, and endpoint validation, ensuring comprehensive coverage of template functionality. This change streamlines the testing process and enhances the robustness of the test suite.

* refactor: Update project metadata and import paths in starter project JSON files

Modified the metadata section in multiple starter project JSON files to reflect updated code hashes and module paths, transitioning from 'lfx' to 'langflow' components. This change enhances consistency across the codebase and ensures that the correct modules are referenced for improved maintainability and clarity.

* chore: Update template test commands to utilize parallel execution

Modified the commands in the Makefile and CI workflows to include the `-n auto` option for pytest, enabling parallel test execution for the starter project template tests. This change enhances test performance and efficiency across the codebase.

* chore: Remove  news-aggregated.json file

Deleted the news-aggregated.json file

* Update test_template_validation.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-29 22:32:48 +00:00
Eric Pinzur
a88a6fb743
bug: don't block CI when the nightly build fails (#9238)
* don't block CI when the nightly build fails

* make suggested chagnes
2025-07-29 19:42:02 +00:00
Cristhian Zanforlin Lousa
96b35e0843
feat: add InputFile customization (#9233)
*  (frontend): introduce CustomInputFileComponent to customize file input component in parameter render component for better flexibility and customization. Remove InputFileComponent from parameter render component and replace it with CustomInputFileComponent.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-29 18:05:35 +00:00
Edwin Jose
575cb7fb17
ref: Update Ruff per-file ignores for tests and scripts (#9206)
Update Ruff per-file ignores for tests and scripts

Added BLE001 to the per-file ignores for test files to allow broad-exception catching. Reformatted the scripts ignore list for consistency.
2025-07-29 14:41:58 +00:00
April I. Murphy
575cde3e8d
docs: Audit admonitions, related links, and prerequisites for style and consistency (#9217)
* add some related links

* admonitions audit

* initial prereq audit

* standardize install LF prereqs

* some coderabbit
2025-07-29 13:25:16 +00:00
Gabriel Luiz Freitas Almeida
cb34e4fe80
fix: add data-testid to new project button in EmptyFolder component (#9222) 2025-07-29 08:56:14 -03:00
Cristhian Zanforlin Lousa
86c54de508
feat: Add .env file support to Windows build scripts (#9214)
* 🔧 (build_and_run.bat): add support for loading environment variables from .env file
🔧 (build_and_run.ps1): add support for loading environment variables from .env file

* 🐛 (build_and_run.bat): fix path to .env file to correctly load environment variables
🐛 (build_and_run.ps1): fix path to .env file to correctly load environment variables

* 🔧 (build_and_run.bat): set env file parameter if .env file exists to pass to langflow run
🔧 (build_and_run.ps1): set env file parameter if .env file exists to pass to langflow run

* 📝 (build_and_run.bat): improve script to dynamically find and set .env file path for Langflow run
📝 (build_and_run.ps1): enhance script to dynamically locate and set .env file path for Langflow run

* Update scripts/windows/build_and_run.bat

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* 🔧 (build_and_run.ps1): refactor script to use a boolean flag 'useEnvFile' instead of a string variable 'envFileParam' to improve readability and maintainability
🔧 (build_and_run.ps1): update uvicorn command to use '--env-file' flag directly instead of building the command with a string variable

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-28 21:11:49 +00:00
Cristhian Zanforlin Lousa
629a6d2837
fix: Exclude base path from custom component loading (#9098)
* ♻️ (components.py): refactor get_and_cache_all_types_dict function to filter out base components path and only load custom components for traditional full loading. This improves code readability and maintainability.

*  (test_component_loading_fix.py): Add tests for the component loading fix that filters out BASE_COMPONENTS_PATH from custom components.

* [autofix.ci] apply automated fixes

* 🐛 (test_component_loading_fix.py): remove unnecessary test case for GitHub issue #8967 and fix test_component_merging_logic method to handle custom component loading failure properly
♻️ (test_component_loading_fix.py): refactor test_component_loading_fix.py to improve readability and remove redundant try-except block in test_component_merging_logic

* [autofix.ci] apply automated fixes

* ♻️ (components.py): refactor _process_single_module function to simplify create_component_template call and improve code readability
♻️ (components.py): refactor _determine_loading_strategy function to handle component loading strategy based on lazy_load_components setting and improve code structure

* 📝 (components.py): add comments and improve readability in _process_single_module function
 (components.py): introduce _determine_loading_strategy function to determine and execute the appropriate component loading strategy based on settings service

---------

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-07-28 19:00:44 +00:00
Mendon Kissling
643a8ccd96
docs: refresh remote server page (#9189)
* clean-up-and-clarify

* code-review

* correct-dockerfile
2025-07-28 18:44:59 +00:00
Yuqi Tang
d0e4e7d1cc
feat: Add template tests (#9083)
* add template tests

* remove files

* adding validate flow build

* add validate endpoint and flow execution

* Update .github/workflows/template-tests.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/backend/base/langflow/utils/template_validation.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* change workflow running

* add ci

* fix test

* fix test

* delete when push

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove remaining merge conflict markers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Improve validate.py unit tests to eliminate CI failures

Fixed 4 failing tests in test_validate.py:
- test_code_with_syntax_error: Better error message handling for syntax errors
- test_raises_error_for_missing_function: Handle StopIteration along with ValueError
- test_creates_simple_class: Use optional constructor parameter to avoid TypeError
- test_handles_validation_error: Use proper ValidationError constructor from pydantic_core
- test_creates_context_with_langflow_imports: Remove invalid module patching
- test_creates_mock_classes_on_import_failure: Use proper import mocking

All 50 validate tests now pass consistently, improving CI stability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* enhance: Add comprehensive edge case tests for template_validation.py

Added 6 additional test cases to improve coverage of template_validation.py:
- test_validate_stream_exception: Tests Graph.validate_stream() exception handling
- test_code_validation_other_exceptions: Tests TypeError/KeyError/AttributeError handling
- test_vertices_sorted_without_end_vertex_events: Tests variable usage tracking
- test_vertex_count_tracking: Tests vertex_count increment paths
- test_empty_lines_in_stream: Tests empty line handling in event streams
- test_event_stream_validation_exception: Tests exception handling in _validate_event_stream

These tests target the remaining 7 uncovered lines to maximize coverage percentage.
Total tests: 40 (all passing)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 18:32:24 +00:00
Yuqi Tang
b7513e5c6f
feat: Add smoke tests workflow for PR validation (#9125)
* feat: Add smoke tests workflow for PR validation

- Adds smoke-test label trigger for running tests without API keys
- Runs backend tests excluding api_key_required markers
- Runs full frontend test suite with mocked APIs
- Provides fast feedback (~10-15 min) before lgtm label
- Enables external contributors to validate changes without API costs
- Comments results back to PR automatically

Usage: Add 'smoke-test' label to any PR to trigger

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Fix YAML indentation in smoke-tests workflow script block

* refactor: Focus smoke tests on critical functionality only

- Run only 10 essential backend test files (version, schema, serialization, etc.)
- Run only frontend unit tests (skip integration/e2e)
- Reduce timeout from 15 to 8 minutes
- Target critical functionality without external dependencies
- Avoid problematic database/API-dependent tests

* fix: Use correct Jest CLI option --testPathPatterns

* add frontend tests

* add tests

* change to essential tests

* fix: Create superuser in test_load_bundles_from_urls test

The test_load_bundles_from_urls test was failing because the load_bundles_from_urls
function expects a superuser to exist in the database, but the test client fixture
sets LANGFLOW_AUTO_LOGIN=false by default, which doesn't create a superuser.

This fix creates a superuser in the test database before calling the function,
resolving the 'Superuser not found in the database' error.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* add on conditions

* fix: Check PR labels correctly for smoke test trigger

Change condition from github.event.label.name to
github.event.pull_request.labels.*.name to work with all trigger
events (synchronize, opened, etc), not just labeled events.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* add workdispatch

* remove initial test

* adding timeout minutes

* edit env var

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 18:27:05 +00:00
Mendon Kissling
ab90aa7439
docs: refresh develop overview page (#9177)
* content

* docs-review
2025-07-28 18:08:19 +00:00