Skip to content

ref: flip wxo ff#12924

Open
jordanrfrazier wants to merge 1 commit intorelease-1.9.2from
flip-wxo-ff
Open

ref: flip wxo ff#12924
jordanrfrazier wants to merge 1 commit intorelease-1.9.2from
flip-wxo-ff

Conversation

@jordanrfrazier
Copy link
Copy Markdown
Collaborator

@jordanrfrazier jordanrfrazier commented Apr 29, 2026

flip wxo ff

Summary by CodeRabbit

Release Notes (v1.9.2)

  • New Features

    • Added event telemetry tracking for deployment operations to capture performance metrics and success rates.
  • Bug Fixes

    • Resolved HTTP 413 status code mapping for oversized content handling.
    • Enhanced credential resolution fallback logic for environment variable-based authentication.
  • Chores

    • Updated package versions across components to 1.9.2.
    • Disabled wxo_deployments feature by default.

@jordanrfrazier jordanrfrazier changed the base branch from main to release-1.9.2 April 29, 2026 13:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This pull request bumps package versions across the project (1.9.1 → 1.9.2), introduces a new telemetry infrastructure for deployment events, integrates telemetry logging throughout deployment API routes, updates credential resolution logic, adds extensive test coverage, and adjusts default feature flag settings.

Changes

Cohort / File(s) Summary
Version Bumps
.secrets.baseline, pyproject.toml, src/backend/base/pyproject.toml, src/frontend/package.json, src/lfx/pyproject.toml, src/sdk/pyproject.toml
Package version increments across main project (1.9.1 → 1.9.2), langflow-base (0.9.1 → 0.9.2), lfx (0.4.1 → 0.4.2), and SDK (0.1.1 → 0.1.2). Updated lfx dependency constraint from ~0.4.1 to ~0.4.2. Refreshed secrets baseline metadata including line number and timestamp.
Telemetry Schema & Service
src/backend/base/langflow/services/telemetry/schema.py, src/backend/base/langflow/services/telemetry/service.py
Added DeploymentPayload class with fields for action, provider, duration, success flag, error message, and optional tenant ID. Extended TelemetryService with three new async logging methods: log_package_deployment(), log_package_deployment_provider(), and log_package_deployment_run().
Deployments API Integration
src/backend/base/langflow/api/v1/deployments.py
Integrated telemetry context injection across deployment and provider account write routes (create/update/delete operations). Updated route handlers to measure execution duration, capture outcomes, emit DeploymentPayload events, and populate deployment_provider and wxo_tenant_id fields from resolved provider/account data.
Deployment Helper Functions
src/backend/base/langflow/api/v1/mappers/deployments/helpers.py
Extended return signatures of resolve_adapter_from_deployment() and resolve_adapter_mapper_from_deployment() to include additional provider_tenant_id value (typed as str | None), expanding tuples from 4 to 5 elements.
Credential Resolution Logic
src/lfx/src/lfx/base/models/unified_models/credentials.py
Modified conditional database lookup flow to only query the DB-backed variable service when user_id is provided and not the string "None", preserving fallback to environment variables when DB lookup yields no value.
Model Catalog & Feature Flags
src/lfx/src/lfx/base/models/unified_models/model_catalog.py, src/lfx/src/lfx/services/settings/feature_flags.py, src/lfx/src/lfx/services/adapters/deployment/exceptions.py
Added parameter mapping for Google embedding models (dimensionsoutput_dimensionality). Changed wxo_deployments feature flag default from True to False. Updated HTTP 413 status constant from HTTP_413_REQUEST_ENTITY_TOO_LARGE to HTTP_413_CONTENT_TOO_LARGE.
Deployment Route Handler Tests
src/backend/tests/unit/api/v1/test_deployment_route_handlers.py
Injected telemetry=_fake_telemetry() throughout test calls to deployment/provider handlers. Updated fake provider account data to include provider_tenant_id field. Adjusted mocked return-value tuples to include new provider_tenant_id element.
New Deployments Telemetry Test Suite
src/backend/tests/unit/api/v1/test_deployments_telemetry.py
Comprehensive new test module fully mocking telemetry pipeline with fixtures for async telemetry mocks and standardized DB/mapper returns. Tests all deployment/provider CRUD endpoints and deployment runs for successful telemetry emission and error-path handling with formatted error messages and appropriate tenant ID capture.
Telemetry & Schema Unit Tests
src/backend/tests/unit/services/telemetry/test_telemetry_schema.py, src/backend/tests/unit/test_telemetry.py
Added DeploymentPayload schema validation tests verifying field assignment, defaults, alias mapping, and round-trip serialization. Added TelemetryService tests asserting correct queue enqueue behavior for three deployment logging methods and respecting do_not_track flag.
Credential Resolution & Model Tests
src/backend/tests/unit/test_credential_resolution.py, src/backend/tests/unit/test_unified_models.py
Added coverage for user_id=None path in credential resolution. Expanded embedding option generation tests with Google model dimension parameter mapping and assertion of output_dimensionality field propagation.
Endpoint Test Updates
src/backend/tests/unit/api/v1/test_endpoints.py
Modified test expectations: /config unauthenticated endpoint now expects feature_flags.wxo_deployments default as False rather than True, and deprecated oversized-file test expects HTTP_413_CONTENT_TOO_LARGE.

Sequence Diagram

sequenceDiagram
    participant Client
    participant FastAPI as FastAPI Route Handler
    participant Telemetry as TelemetryService
    participant Adapter as DeploymentAdapter
    participant Database as Database

    Client->>FastAPI: POST /deployments (create)
    
    activate FastAPI
    FastAPI->>Adapter: resolve_adapter_from_deployment()
    Adapter-->>FastAPI: deployment_row, adapter, provider_key, provider_tenant_id
    
    Note over FastAPI: Start telemetry timer
    FastAPI->>Adapter: create(provider_account)
    activate Adapter
    Adapter->>Database: query provider credentials
    Database-->>Adapter: credentials
    Adapter-->>FastAPI: success
    deactivate Adapter
    
    Note over FastAPI: Calculate duration
    FastAPI->>Telemetry: log_package_deployment(DeploymentPayload)
    activate Telemetry
    Telemetry-->>FastAPI: enqueued to telemetry_queue
    deactivate Telemetry
    
    FastAPI-->>Client: 201 Created
    deactivate FastAPI
    
    Note over Telemetry: Async background<br/>sends telemetry data
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

🚥 Pre-merge checks | ✅ 6 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.91% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Quality And Coverage ⚠️ Warning Test suite covers multiple endpoints and error scenarios but heavily mocks telemetry service, preventing validation of actual exception-to-string conversion and real error handling flow. Privacy concern about sensitive data leakage via str(exc) is not validated. Add integration-style tests that mock only lower-level components to validate real exception flow. Add more error scenarios (timeouts, HTTP adapter errors) and tests validating error messages don't leak sensitive details.
Title check ❓ Inconclusive The PR title "flip wxo ff" is vague and does not clearly convey the actual scope of changes, which include telemetry infrastructure additions, version bumps across multiple packages, feature flag adjustments, and credential resolution updates. Clarify the title to better reflect the main changes, such as 'Disable WXO deployments feature flag and add telemetry infrastructure' or similar, to help reviewers understand the primary intent.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Implementations ✅ Passed PR includes comprehensive test coverage for all new implementations: 10 integration tests in test_deployments_telemetry.py covering success and error paths, schema validation tests in test_telemetry_schema.py, and service method tests in test_telemetry.py.
Test File Naming And Structure ✅ Passed All backend test files follow test_*.py naming convention and are properly organized in src/backend/tests/ with descriptive test names, proper fixtures, and comprehensive positive/negative scenario coverage.
Excessive Mock Usage Warning ✅ Passed The test file appropriately mocks only external dependencies while making real FastAPI calls to verify actual telemetry payload creation and field values.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch flip-wxo-ff

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 52.99%. Comparing base (af8cd02) to head (d8406fb).

Files with missing lines Patch % Lines
src/lfx/src/lfx/services/settings/feature_flags.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-1.9.2   #12924      +/-   ##
=================================================
- Coverage          53.02%   52.99%   -0.04%     
=================================================
  Files               2030     2030              
  Lines             183892   183892              
  Branches           27681    27681              
=================================================
- Hits               97506    97448      -58     
- Misses             85287    85345      +58     
  Partials            1099     1099              
Flag Coverage Δ
frontend 52.93% <ø> (-0.05%) ⬇️
lfx 49.99% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/lfx/src/lfx/services/settings/feature_flags.py 0.00% <0.00%> (ø)

... and 161 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 35%
35.26% (40427/114627) 68.08% (5580/8196) 35.87% (940/2620)

Unit Test Results

Tests Skipped Failures Errors Time
4007 0 💤 0 ❌ 0 🔥 9m 0s ⏱️

@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants