Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
chore(ci): avoid reinstall pipx and pin poetry version aligned with in api dockerfile (#10426)
Bowen Liang754bfb181cee
diff --git a/.github/actions/setup-poetry/action.yml b/.github/actions/setup-poetry/action.ymlnew file mode 100644index 00000000000..5feab33d1da--- /dev/null+++ b/.github/actions/setup-poetry/action.yml@@ -0,0 +1,36 @@+name: Setup Poetry and Python++inputs:+ python-version:+ description: Python version to use and the Poetry installed with+ required: true+ default: '3.10'+ poetry-version:+ description: Poetry version to set up+ required: true+ default: '1.8.4'+ poetry-lockfile:+ description: Path to the Poetry lockfile to restore cache from+ required: true+ default: ''++runs:+ using: composite+ steps:+ - name: Set up Python ${{ inputs.python-version }}+ uses: actions/setup-python@v5+ with:+ python-version: ${{ inputs.python-version }}+ cache: pip++ - name: Install Poetry+ shell: bash+ run: pip install poetry==${{ inputs.poetry-version }}++ - name: Restore Poetry cache+ if: ${{ inputs.poetry-lockfile != '' }}+ uses: actions/setup-python@v5+ with:+ python-version: ${{ inputs.python-version }}+ cache: poetry+ cache-dependency-path: ${{ inputs.poetry-lockfile }}diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.ymlindex eb09abe77ce..76e844aaad8 100644--- a/.github/workflows/api-tests.yml+++ b/.github/workflows/api-tests.yml@@ -28,15 +28,11 @@ jobs:- name: Checkout codeuses: actions/checkout@v4- - name: Install Poetry- uses: abatilo/actions-poetry@v3-- - name: Set up Python ${{ matrix.python-version }}- uses: actions/setup-python@v5+ - name: Setup Poetry and Python ${{ matrix.python-version }}+ uses: ./.github/actions/setup-poetrywith:python-version: ${{ matrix.python-version }}- cache: poetry- cache-dependency-path: api/poetry.lock+ poetry-lockfile: api/poetry.lock- name: Check Poetry lockfilerun: |diff --git a/.github/workflows/db-migration-test.yml b/.github/workflows/db-migration-test.ymlindex c6fe87264d3..f4eb0f8e33e 100644--- a/.github/workflows/db-migration-test.yml+++ b/.github/workflows/db-migration-test.yml@@ -15,25 +15,15 @@ concurrency:jobs:db-migration-test:runs-on: ubuntu-latest- strategy:- matrix:- python-version:- - "3.10"steps:- name: Checkout codeuses: actions/checkout@v4- - name: Set up Python ${{ matrix.python-version }}- uses: actions/setup-python@v5+ - name: Setup Poetry and Python+ uses: ./.github/actions/setup-poetrywith:- python-version: ${{ matrix.python-version }}- cache-dependency-path: |- api/pyproject.toml- api/poetry.lock-- - name: Install Poetry- uses: abatilo/actions-poetry@v3+ poetry-lockfile: api/poetry.lock- name: Install dependenciesrun: poetry install -C apidiff --git a/.github/workflows/style.yml b/.github/workflows/style.ymlindex 01f9757b3c5..282afefe742 100644--- a/.github/workflows/style.yml+++ b/.github/workflows/style.yml@@ -22,34 +22,28 @@ jobs:id: changed-filesuses: tj-actions/changed-files@v45with:- files: api/**-- - name: Install Poetry- if: steps.changed-files.outputs.any_changed == 'true'- uses: abatilo/actions-poetry@v3+ files: |+ api/**+ .github/workflows/style.yml- - name: Set up Python- uses: actions/setup-python@v5+ - name: Setup Poetry and Pythonif: steps.changed-files.outputs.any_changed == 'true'- with:- python-version: '3.10'+ uses: ./.github/actions/setup-poetry- - name: Python dependencies+ - name: Install dependenciesif: steps.changed-files.outputs.any_changed == 'true'run: poetry install -C api --only lint- name: Ruff checkif: steps.changed-files.outputs.any_changed == 'true'- run: poetry run -C api ruff check ./api+ run: |+ poetry run -C api ruff check ./api+ poetry run -C api ruff format --check ./api- name: Dotenv checkif: steps.changed-files.outputs.any_changed == 'true'run: poetry run -C api dotenv-linter ./api/.env.example ./web/.env.example- - name: Ruff formatter check- if: steps.changed-files.outputs.any_changed == 'true'- run: poetry run -C api ruff format --check ./api-- name: Lint hintsif: failure()run: echo "Please run 'dev/reformat' to fix the fixable linting errors."diff --git a/.github/workflows/vdb-tests.yml b/.github/workflows/vdb-tests.ymlindex 8ea38fde76e..caddd23bab7 100644--- a/.github/workflows/vdb-tests.yml+++ b/.github/workflows/vdb-tests.yml@@ -28,15 +28,11 @@ jobs:- name: Checkout codeuses: actions/checkout@v4- - name: Install Poetry- uses: abatilo/actions-poetry@v3-- - name: Set up Python ${{ matrix.python-version }}- uses: actions/setup-python@v5+ - name: Setup Poetry and Python ${{ matrix.python-version }}+ uses: ./.github/actions/setup-poetrywith:python-version: ${{ matrix.python-version }}- cache: poetry- cache-dependency-path: api/poetry.lock+ poetry-lockfile: api/poetry.lock- name: Check Poetry lockfilerun: |diff --git a/README.md b/README.mdindex 4779048001b..d42b3b13a68 100644--- a/README.md+++ b/README.md@@ -177,3 +177,4 @@ To protect your privacy, please avoid posting security issues on GitHub. Instead## LicenseThis repository is available under the [Dify Open Source License](LICENSE), which is essentially Apache 2.0 with a few additional restrictions.+diff --git a/api/Dockerfile b/api/Dockerfileindex eb37303182d..51e2a105064 100644--- a/api/Dockerfile+++ b/api/Dockerfile@@ -4,7 +4,7 @@ FROM python:3.10-slim-bookworm AS baseWORKDIR /app/api# Install Poetry-ENV POETRY_VERSION=1.8.3+ENV POETRY_VERSION=1.8.4# if you located in China, you can use aliyun mirror to speed up# RUN pip install --no-cache-dir poetry==${POETRY_VERSION} -i https://mirrors.aliyun.com/pypi/simple/