Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/cross-platform-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,40 @@ test-installation:
if: steps.install-method.outputs.method == 'wheel'
```

## Known Issues

### macOS AMD64 Python 3.13 Compilation Failures

**Issue**: Nightly/release builds may fail on macOS AMD64 with Python 3.13 due to `chroma-hnswlib` compilation errors:
```
clang: error: unsupported argument 'native' to option '-march='
error: command '/usr/bin/clang++' failed with exit code 1
```

**Root Cause**: Systematic difference in dependency resolution between workspace builds vs published packages:

| Build Type | Package Source | Dependencies | chromadb | Result |
|------------|----------------|--------------|----------|---------|
| **Manual/Source** | Workspace (`langflow-base = { workspace = true }`) | 162 packages | ❌ Not included | ✅ Success |
| **Nightly/Release** | Published (`langflow-base-nightly==0.5.0.dev21`) | 420 packages | ✅ Included | ❌ Compilation fails |

**Technical Details**:
1. **Workspace builds** use local `src/backend/base/pyproject.toml` which excludes `chromadb`
2. **Nightly builds** modify dependencies via `scripts/ci/update_uv_dependency.py`:
- Changes: `langflow-base~=0.5.0` → `langflow-base-nightly==0.5.0.dev21`
- Uses published PyPI package with full dependency tree including `chromadb==0.5.23`
3. **macOS clang** doesn't support `-march=native` flag used by `chroma-hnswlib` compilation

**Workarounds**:
- Manual testing (source builds) works consistently
- Issue only affects nightly/release automated builds
- Some runs may succeed if compatible `chroma-hnswlib` wheels are available on PyPI

**Files Involved**:
- `scripts/ci/update_uv_dependency.py` - Modifies dependency resolution
- `scripts/ci/update_pyproject_combined.py` - Orchestrates nightly build changes
- `pyproject.toml` vs `src/backend/base/pyproject.toml` - Different dependency trees

## Results

- ✅ **Success**: All platforms pass installation and basic functionality
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/cross-platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ jobs:

- name: Install main package from wheel (Unix)
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows'
env:
# Fix chroma-hnswlib compilation on macOS by overriding problematic compiler flags
CFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64' || '' }}
CXXFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64 -stdlib=libc++' || '' }}
# Alternative: Force use of compatible architecture flags
ARCHFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-arch x86_64' || '' }}
run: |
ls -la ./main-dist/
find ./main-dist -name "*.whl" -type f
Expand All @@ -242,6 +248,12 @@ jobs:

- name: Install langflow from PyPI (Unix)
if: steps.install-method.outputs.method == 'pypi' && matrix.os != 'windows'
env:
# Fix chroma-hnswlib compilation on macOS by overriding problematic compiler flags
CFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64' || '' }}
CXXFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64 -stdlib=libc++' || '' }}
# Alternative: Force use of compatible architecture flags
ARCHFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-arch x86_64' || '' }}
run: |
if [ -n "${{ inputs.langflow-version }}" ]; then
uv pip install --python ./test-env/bin/python langflow==${{ inputs.langflow-version }}
Expand Down Expand Up @@ -278,9 +290,9 @@ jobs:

- name: Test server startup (Windows)
if: matrix.os == 'windows'
timeout-minutes: ${{ inputs.test-timeout }}
timeout-minutes: ${{ inputs.test-timeout || 5 }}
env:
TIMEOUT_MINUTES: ${{ inputs.test-timeout }}
TIMEOUT_MINUTES: ${{ inputs.test-timeout || 5 }}
run: |
# Start server in background
$serverProcess = Start-Process -FilePath ".\test-env\Scripts\python.exe" -ArgumentList "-m", "langflow", "run", "--host", "localhost", "--port", "7860", "--backend-only" -PassThru -WindowStyle Hidden
Expand Down Expand Up @@ -312,9 +324,9 @@ jobs:

- name: Test server startup (Unix)
if: matrix.os != 'windows'
timeout-minutes: ${{ inputs.test-timeout }}
timeout-minutes: ${{ inputs.test-timeout || 5 }}
env:
TIMEOUT_MINUTES: ${{ inputs.test-timeout }}
TIMEOUT_MINUTES: ${{ inputs.test-timeout || 5 }}
run: |
# Start server in background
./test-env/bin/python -m langflow run --host localhost --port 7860 --backend-only &
Expand Down