Commit graph

216 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
8d1e4ff059
ci: add 'test' job to run Typescript and Python tests (#2489)
* chore: update workflow_dispatch in Python and TypeScript test workflows

* feat(release.yml): add a new 'test' job to run Typescript and Python tests before releasing Langflow Main to ensure code quality and stability. Update dependencies to include Typescript and Python test workflows.
2024-07-02 12:40:57 -07:00
Nicolò Boschi
2787bec4fb
ci: skip tests with openai key required (#2477)
* ci: skip tests with openai key required

* ci: skip tests with openai key required

* ci: skip tests with openai key required

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 06:20:13 -07:00
Gabriel Luiz Freitas Almeida
26a71e1c36
ci: add auto_merge_enabled to PR activity types and concurrency settings (#2471)
* ci: add auto_merge_enabled to pr activity types

* fix  (auto-update.yml): remove 'dev' branch from trigger to run workflow on 'main' branch pushes only

fix (js_autofix.yml): remove unnecessary push trigger for 'main' branch in workflow to run on specific file changes only

* ci: Update concurrency settings in CI workflows
2024-07-01 18:45:15 -07:00
Gabriel Luiz Freitas Almeida
4dda82609e
ci: remove merge_group from workflows (#2467)
Remove the merge_group configuration from the workflows to simplify the CI pipeline.
2024-07-01 15:03:23 -07:00
Nicolò Boschi
f2bf62e284
ci: fix mypy checks (#2431)
* ci: fix mypy

* ci: fix mypy

* ci: fix mypy

* run fe checks

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:42:14 -07:00
Gabriel Luiz Freitas Almeida
6259269105
ci: add lint commit workflow for pull requests (#2463)
* chore: Add lint commit workflow for pull requests

* chore: Update commit message prefix and include scope for dependabot.yml

* ci: remove pr-checker

* chore: Update commitlint-github-action to version 5

* chore: Remove lint-commit workflow and add semantic.yml configuration
2024-07-01 14:33:49 -07:00
Gabriel Luiz Freitas Almeida
8bcba2d414
chore: Update ruff command in py_autofix.yml to use 'ruff check' before 'ruff --fix-only' (#2461) 2024-07-01 12:36:06 -07:00
Gabriel Luiz Freitas Almeida
4a13afc13b
Merge branch 'main' into dependabot/github_actions/install-pinned/ruff-b52a71f70b28264686d57d1efef1ba845b9cec6c 2024-07-01 15:31:37 -03:00
dependabot[bot]
2a98346740
chore(deps): bump install-pinned/ruff
Bumps [install-pinned/ruff](https://github.com/install-pinned/ruff) from 6b463d795ce39011cc004438ae507ae56235e12a to b52a71f70b28264686d57d1efef1ba845b9cec6c.
- [Release notes](https://github.com/install-pinned/ruff/releases)
- [Commits](6b463d795c...b52a71f70b)

---
updated-dependencies:
- dependency-name: install-pinned/ruff
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 13:58:41 +00:00
Gabriel Luiz Freitas Almeida
e7239f9a7a chore: Update branch checkout description in TypeScript test workflow 2024-06-30 11:22:53 -03:00
cristhianzl
224d447f6b chore: Add branch input parameter to Frontend Tests workflow 2024-06-28 12:05:48 -03:00
cristhianzl
04277fae7e merge dev into branch 2024-06-27 15:16:21 -03:00
Gabriel Luiz Freitas Almeida
adb674355a
Reactivate frontend tests (#2403)
🔧 (typescript_test.yml): Update job name to "Run Playwright Tests" for
clarity and consistency
🔧 (typescript_test.yml): Remove unnecessary 'ref' input from
'actions/checkout' step
2024-06-27 13:33:15 +00:00
Gabriel Luiz Freitas Almeida
7b12a4b3be 🔧 (typescript_test.yml): Add step to get Playwright version and cache Playwright binaries based on the version for better dependency management
🔧 (typescript_test.yml): Update job name to "Run Playwright Tests" for clarity and consistency
🔧 (typescript_test.yml): Remove unnecessary 'ref' input from 'actions/checkout' step
2024-06-27 09:56:08 -03:00
Gabriel Luiz Freitas Almeida
f2fa0be2d0 ⬆️ (typescript_test.yml): upgrade Poetry version from 1.8.2 to 1.8.3 for testing purposes 2024-06-27 09:54:00 -03:00
Gabriel Luiz Freitas Almeida
c3d84dd50d 🔧 (typescript_test.yml): update workflow trigger from workflow_dispatch to pull_request and merge_group to improve workflow automation and efficiency 2024-06-27 09:53:39 -03:00
Gabriel Luiz Freitas Almeida
cfa59a1d52
Merge branch 'dev' into cz/fixTestsCI 2024-06-27 05:08:58 -07:00
Gabriel Luiz Freitas Almeida
f499e257f9
Merge main into dev (#2400)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

* chore: Fix missing parentheses in RequestCancelledMiddleware

* chore: Update pydantic-settings and tenacity versions

The commit updates the versions of the `pydantic-settings` and `tenacity` packages in the `poetry.lock` file. The `pydantic-settings` version is updated from 2.3.3 to 2.3.4, and the `tenacity` version is updated from 8.4.1 to 8.4.2.

* Update README.md

Add 1.0 banner

* fix fetch data to work even with autologin true

* format code

* deactivate stop button until we have a better solution (#2337)

* chore: Update authContext imports and remove duplicate imports

* Refactor telemetry service payload field names for consistency

* chore: Update package versions in pyproject.toml files

* chore: Update release.yml to use the correct branch for the commit

* added firecrawl integration

* chore: Rename Kubernetes documentation file to use .md extension

* components: simplify astra vectorize

* components: simplify astra vectorize

* Cassandra: support for non-AstraDB databases

* chore: Add GitHub workflows for JavaScript and Python autofix

This commit adds GitHub workflows for JavaScript and Python autofix. The JavaScript workflow is triggered on pull requests and pushes to the main branch, specifically for changes in the "src/frontend" directory. It checks out the code, sets up Node.js, caches Node.js dependencies, installs Node.js dependencies, and runs Prettier for code formatting. The Python workflow is also triggered on pull requests and pushes to the main branch, but for changes in the "poetry.lock", "pyproject.toml", "src/backend", and "tests" directories. It checks out the code, installs Ruff, and runs Mypy for type checking and code formatting.

* chore: Update GitHub workflow to run Ruff Check

* ci: always run required checks (#2395)

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com>
Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
2024-06-27 05:06:10 -07:00
Gabriel Luiz Freitas Almeida
0e7f4ff37c
Merge branch 'dev' into cz/fixTestsCI 2024-06-27 04:33:29 -07:00
Gabriel Luiz Freitas Almeida
e7f1b9c881
Update dockerfiles and docker-build.yml (#2389)
* chore: Update docker-build.yml to disable pre-release by default

* chore: Update Dockerfiles to set LANGFLOW_HOST and LANGFLOW_PORT

The Dockerfiles have been updated to set the environment variables LANGFLOW_HOST and LANGFLOW_PORT. This ensures that the correct host and port are used when running the langflow application.

* 🔧 (build_and_push_backend.Dockerfile): remove unnecessary host and port configuration to simplify the Dockerfile and focus on backend-only functionality

* chore: Update LANGFLOW_CONFIG_DIR in docker-compose.yml

The LANGFLOW_CONFIG_DIR environment variable in docker-compose.yml has been updated to /app/langflow. This change ensures that the correct directory is used for storing logs, file storage, monitor data, and secret keys.
2024-06-27 04:24:35 -07:00
Nicolò Boschi
bcf5807262
ci: always run required checks (#2395) 2024-06-27 04:22:17 -07:00
cristhianzl
65ea7bede3 Merge branch 'cz/fixTestsCI' of https://github.com/logspace-ai/langflow into cz/fixTestsCI 2024-06-27 02:57:20 -03:00
cristhianzl
f26ba492a4 add more shard and break store tests in 2 2024-06-27 02:57:02 -03:00
cristhianzl
45578b6c81 add store api key 2024-06-27 02:36:53 -03:00
Cristhian Zanforlin Lousa
00f6bea71b
Merge branch 'dev' into cz/fixTestsCI 2024-06-26 23:45:52 -03:00
cristhianzl
68780e468f 🔧 (typescript_test.yml): update shard configuration to include 7 shards for better distribution of tests 2024-06-26 22:41:02 -03:00
cristhianzl
922711740c (typescript_test.yml): update shard configuration to include 6 shards
 (index.tsx): add data-testid attribute to checkbox component
 (basicExamples.spec.ts): add waitForSelector for send icon to improve test stability
 (chatInputOutputUser.spec.ts): add waitForSelector for send icon to improve test stability
 (deleteComponentFlows.spec.ts): add waitForSelector for various elements to improve test stability
 (generalBugs.spec.ts): add waitForSelector for send icon to improve test stability
2024-06-26 22:22:51 -03:00
cristhianzl
b645d17c87 🔧 (typescript_test.yml): add OPENAI_API_KEY to environment variables in CI
 (basicExamples.spec.ts): refactor API key check to run at the start of tests
2024-06-26 20:30:27 -03:00
Gabriel Luiz Freitas Almeida
68c4485770 Merge branch 'main' into dev 2024-06-26 16:28:45 -03:00
cristhianzl
c820b9c81a chore: Update shardIndex and shardTotal in TypeScript test workflow 2024-06-26 13:54:13 -03:00
cristhianzl
cf963c7ca0 chore: Update Playwright test configuration for CI 2024-06-26 13:30:42 -03:00
cristhianzl
7a871d6534 chore: Update Playwright test configuration for CI 2024-06-26 13:24:55 -03:00
cristhianzl
fe6f4134a3 chore: Update Playwright test configuration for CI 2024-06-26 12:32:34 -03:00
cristhianzl
d66d9e3e62 chore: Update Playwright test configuration for CI 2024-06-26 12:31:17 -03:00
Gabriel Luiz Freitas Almeida
12c3e53e42 chore: Update GitHub workflow to run Ruff Check 2024-06-26 12:09:02 -03:00
Gabriel Luiz Freitas Almeida
fc9401c195 chore: Add GitHub workflows for JavaScript and Python autofix
This commit adds GitHub workflows for JavaScript and Python autofix. The JavaScript workflow is triggered on pull requests and pushes to the main branch, specifically for changes in the "src/frontend" directory. It checks out the code, sets up Node.js, caches Node.js dependencies, installs Node.js dependencies, and runs Prettier for code formatting. The Python workflow is also triggered on pull requests and pushes to the main branch, but for changes in the "poetry.lock", "pyproject.toml", "src/backend", and "tests" directories. It checks out the code, installs Ruff, and runs Mypy for type checking and code formatting.
2024-06-26 12:09:02 -03:00
Gabriel Luiz Freitas Almeida
3f8c244f27 chore: Add auto-update workflow
The auto-update workflow has been added to the repository. This workflow will automatically trigger on pushes to the `dev` and `main` branches. It runs on the latest version of Ubuntu and uses the `tibdex/auto-update@v2` action to perform the auto-update process.
2024-06-26 09:01:19 -03:00
Gabriel Luiz Freitas Almeida
f6d7bcfd88 chore: Update lint-js.yml to trigger checks on requested actions 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
a1afbf86cf Refactor curl command in python_test.yml to use the correct API endpoint for auto_login 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
2ed4d54f99
Add check-format script and update lint-js.yml (#2357)
* chore: Add check-format script to package.json for code formatting consistency

* chore: Update lint-js.yml to use npm run check-format instead of npm run format
2024-06-25 14:46:51 -07:00
Gabriel Luiz Freitas Almeida
20ceb42504 chore: Update release.yml to use the correct branch for the commit 2024-06-25 11:34:20 -07:00
Gabriel Luiz Freitas Almeida
8ea95420c7 Update workflows for better test coverage and integration (#2344)
*  (typescript_test.yml): add workflow_dispatch event to trigger workflow manually with branch input parameter

🔧 (typescript_test.yml): update workflow to checkout code from the specified branch when triggered manually

* 📝 (lint-py.yml): update linting workflow to trigger on specific pull request events and checks requested action

📝 (lint-py.yml): add a specific job to run Mypy for static type checking in the linting workflow

* 🔧 (python_test.yml): update pull_request event types and branches to trigger on more actions for better test coverage and integration
2024-06-25 10:21:38 -07:00
Gabriel Luiz Freitas Almeida
791bd70c04 chore: Fix curl command in release.yml to wait for server start 2024-06-25 10:21:38 -07:00
Cristhian Zanforlin Lousa
4077135ba7 Updating Tests and Fixing Related Bugs (#2319)
* 🐛 (tableNodeCellRender): fix templateValue check to use Object.keys
 (textAreaComponent): add Case component for conditional rendering
♻️ (editNodeModal): remove commented-out useEffect code
 (basicExamples.spec): update test selectors and increase timeout values

 (filterEdge.spec.ts): update test IDs to match new naming conventions

 (inputListComponent.spec.ts, intComponent.spec.ts): update test IDs and streamline test steps for consistency and clarity

 (keyPairListComponent.spec.ts): update test ID for model element
 (keyPairListComponent.spec.ts): add steps to test editing model options and saving changes

*  (tests): update end-to-end tests for chat input/output and modal components

- Update test selectors for better accuracy
- Add keyboard interaction in chatInputOutputUser.spec.ts
- Improve file handling in chat image upload test
- Refine prompt modal component tests for better validation
- Enhance twoEdges.spec.ts with additional view controls

* ♻️ (tests): refactor repeated click actions into reusable function in e2e tests

*  (tests): replace waitForTimeout with waitForSelector in end-to-end tests

*  (typescript_test.yml): add --debug flag to Playwright test command for better debugging

*  (typescript_test.yml): enable trace option in Playwright tests for better debugging

*  (typescript_test.yml): reduce Playwright test workers from 2 to 1 to improve stability
 (textInputOutput.spec.ts): add waitFor visibility checks to ensure elements are visible before interaction

*  (tests): update paths for test assets to correct locations
 (tests): add waitForSelector to ensure elements are loaded before interaction

*  (typescript_test.yml): increase Playwright workers from 1 to 2 to speed up tests
 (chatInputOutputUser.spec.ts): increase timeout for AI response to 100000ms
 (chatInputOutputUser.spec.ts): correct file path for image upload test
 (deleteComponentFlows.spec.ts): change waitFor to target last checkbox-component
 (store.spec.ts): increase timeout for share button to 100000ms

* 🐛 (flows.py): ensure flow names are unique by appending a number if necessary

* Apply Ruff formatting

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhianzl <Cristhianzl@users.noreply.github.com>
2024-06-25 10:21:38 -07:00
Gabriel Luiz Freitas Almeida
fff4537b1e
Fixes CLI and server (#2342)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

* chore: Fix missing parentheses in RequestCancelledMiddleware

* chore: Update pydantic-settings and tenacity versions

The commit updates the versions of the `pydantic-settings` and `tenacity` packages in the `poetry.lock` file. The `pydantic-settings` version is updated from 2.3.3 to 2.3.4, and the `tenacity` version is updated from 8.4.1 to 8.4.2.

* Update README.md

Add 1.0 banner

* fix fetch data to work even with autologin true

* format code

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Fix .env values not being honored in CLI (#2336)

* chore: Update launch.json to include environment file

The launch.json file was updated to include the environment file path for the "run" command in the "Python: Flask" configuration. This change ensures that the necessary environment variables are loaded when running the backend base of Langflow frontend. The previous configuration had the environment variables set in the "env" field, but it has been removed as it is redundant with the new environment file inclusion.

* chore: Update dotenv import and environment variable handling

This commit updates the import statement for the `dotenv` module in the `__main__.py` file. It adds the `dotenv_values` function to the import statement to enable loading environment variables from a file. Additionally, it introduces a new section of code that maps environment variables to their corresponding variables and types, allowing for more flexible and dynamic configuration. The commit also updates the `run` function to update variables based on environment variables, if they are present. This change improves the handling of environment variables and enhances the configurability of the application.

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>

* Update GitHub Actions workflows and dependencies (#2341)

* chore: Add GitHub Actions workflow for testing documentation build

* Fix server start command in GitHub Actions workflows

* chore: Bump langflow and langflow-base versions

* chore: Update GitHub Actions workflow for docs_test

* chore: Update typing import in __main__.py

* Fix user authentication and authorization issues (#2343)

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2024-06-25 09:20:55 -07:00
Gabriel Luiz Freitas Almeida
d85657f214
Refactor "created_at" column type for consistency and fix cancel middleware (#2316) (#2320)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
2024-06-24 13:15:54 -07:00
dependabot[bot]
1293a1ec4e chore(deps): bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 16:05:05 +00:00
Gabriel Luiz Freitas Almeida
2102c1d5f2 chore: update linting workflows to include dev branch in merge_group 2024-06-24 07:41:40 -07:00
Gabriel Luiz Freitas Almeida
f4ddc60d2a chore: Update docker-build.yml to include pre_release option and base-latest tag 2024-06-24 04:28:23 -07:00
Gabriel Luiz Freitas Almeida
7c35e29da2 chore: Update docker-build.yml to include pre_release option and base-latest tag 2024-06-24 04:28:23 -07:00