Skip to content

feat: add wxO deployment adapter#12079

Merged
HzaRashid merged 40 commits into
release-1.9.0from
wxo-deploy-impl
Mar 17, 2026
Merged

feat: add wxO deployment adapter#12079
HzaRashid merged 40 commits into
release-1.9.0from
wxo-deploy-impl

Conversation

@HzaRashid
Copy link
Copy Markdown
Collaborator

adds wxO deployment adapter, along with the ibm-watsonx-orchestrate-clients dependency (low-level client for wxO)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 923c580b-9d0d-4747-bd9c-26a9e4b73a48

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wxo-deploy-impl
📝 Coding Plan
  • Generate coding plan for human review comments

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

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

@github-actions github-actions Bot added the enhancement New feature or request label Mar 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 24%
24.37% (8698/35681) 17.19% (4832/28095) 17.05% (1275/7474)

Unit Test Results

Tests Skipped Failures Errors Time
2783 0 💤 0 ❌ 0 🔥 49.62s ⏱️

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 7.57373% with 1379 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-1.9.0@13908b2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...adapters/deployment/watsonx_orchestrate/service.py 2.18% 269 Missing ⚠️
...s/deployment/watsonx_orchestrate/update_helpers.py 0.00% 221 Missing ⚠️
...pters/deployment/watsonx_orchestrate/core/tools.py 0.00% 182 Missing ⚠️
...dapters/deployment/watsonx_orchestrate/payloads.py 0.00% 133 Missing ⚠️
.../adapters/deployment/watsonx_orchestrate/client.py 0.00% 121 Missing ⚠️
...s/adapters/deployment/watsonx_orchestrate/utils.py 0.00% 104 Missing ⚠️
...pters/deployment/watsonx_orchestrate/core/retry.py 0.00% 95 Missing ⚠️
...s/deployment/watsonx_orchestrate/core/execution.py 0.00% 82 Missing ⚠️
...ters/deployment/watsonx_orchestrate/core/config.py 0.00% 53 Missing ⚠️
...s/adapters/deployment/watsonx_orchestrate/types.py 0.00% 43 Missing ⚠️
... and 3 more

❌ Your patch status has failed because the patch coverage (7.57%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-1.9.0   #12079   +/-   ##
================================================
  Coverage                 ?   38.11%           
================================================
  Files                    ?     1646           
  Lines                    ?    82115           
  Branches                 ?    12181           
================================================
  Hits                     ?    31297           
  Misses                   ?    49036           
  Partials                 ?     1782           
Flag Coverage Δ
backend 54.24% <3.32%> (?)
frontend 21.75% <ø> (?)
lfx 44.77% <84.61%> (?)

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

Files with missing lines Coverage Δ
src/backend/base/langflow/api/v1/deployments.py 73.01% <ø> (ø)
...apters/deployment/watsonx_orchestrate/constants.py 100.00% <100.00%> (ø)
src/backend/base/langflow/services/utils.py 81.71% <100.00%> (ø)
...src/lfx/services/adapters/deployment/exceptions.py 90.08% <84.61%> (ø)
...e/langflow/services/adapters/deployment/context.py 0.00% <0.00%> (ø)
...ters/deployment/watsonx_orchestrate/core/status.py 0.00% <0.00%> (ø)
...s/adapters/deployment/watsonx_orchestrate/types.py 0.00% <0.00%> (ø)
...ters/deployment/watsonx_orchestrate/core/config.py 0.00% <0.00%> (ø)
...s/deployment/watsonx_orchestrate/core/execution.py 0.00% <0.00%> (ø)
...pters/deployment/watsonx_orchestrate/core/retry.py 0.00% <0.00%> (ø)
... and 6 more
🚀 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 github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 6, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 7, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 7, 2026
HzaRashid and others added 30 commits March 17, 2026 14:41
…ror messages

Encapsulate SDK private method access and endpoint paths inside
WxOClient wrappers so callers never handle raw paths or touch internal
_get/_post methods. Route all private HTTP calls through a single
_base client auto-created in __post_init__, removing the externally
constructed `base` field.
Additionally fix double-period and redundant text in error messages
produced by the ErrorPrefix + handler pattern, and update E2E/unit
assertions to match the sanitised error output.
Changes:
- types.py: bake endpoint paths into wrapper signatures (post_run,
  get_run, upload_tool_artifact, get_agents_raw); auto-create _base
  via __post_init__; remove base from constructor
- client.py: drop BaseWXOClient import and base= constructor arg
- core/execution.py: pass run_id / query_suffix instead of raw paths
- core/tools.py: pass tool_id instead of raw path
- service.py: fix double-period in ErrorPrefix interpolation; remove
  redundant restatements in generic except handlers
- tests: update _with_wxo_wrappers helper and test doubles to use
  _base; update FakeBaseClient._get to accept params
- e2e: update rollback scenario detail_contains to match sanitised msg
- Add `deployment_type` parameter to `get`, `update`, `redeploy`,
  `duplicate`, `delete`, `get_status`, and `undeploy_deployment` in
  WatsonxOrchestrateDeploymentService to match the updated
  BaseDeploymentService ABC
- Update e2e script to use renamed `add_ids` field on
  SnapshotDeploymentBindingUpdate
- Replace `db: Any` with `db: AsyncSession` across client, config, and
  update_helpers modules
- Extract `_ensure_dict` / `ensure_langflow_connections_binding` helpers
  to eliminate repeated nested-dict safety logic in tools.py and
  update_helpers.py, with documentation explaining why malformed API
  payloads are silently corrected rather than rejected
- Use `PayloadSlot.parse()` for update payload validation instead of
  standalone helper; remove `parse_provider_update_payload`
- Fix lambda late-binding with default-argument captures in service.py
- Use `zip(strict=True)` in update_helpers for defensive mismatch
  detection
- Replace O(n²) duplicate detection with `collections.Counter` in
  payloads.py
- Simplify `dedupe_list` to `list(dict.fromkeys(...))`
- Move type-annotation-only imports into TYPE_CHECKING blocks in
  types.py and config.py
- Introduce `UPDATE_MAX_RETRIES` as a distinct constant from
  `CREATE_MAX_RETRIES`
- Fix "watsonX" → "watsonx" casing in error messages
- Clarify `get_status` docstring and `validate_connection` error message
- Add TODO(deployments-cache) for client cache invalidation on
  credential updates
…wxo adapter path, add request-context memoization with strict mixed-context guards, and lazily initialize wxo SDK clients. Add safer credential handling by storing only authenticators in WxOCredentials. Also improve provider error-detail extraction/messages and make the direct wxo E2E conflict scenario diagnostics and expectations more resilient.
…apter

- Raise DeploymentError on empty API responses instead of fabricating
  fake success in create_agent_run_result and get_agent_run
- Elevate rollback failure logging from WARNING to ERROR for alerting
- Apply retryable filter to retry_rollback to skip 401/403/409/422
- Preserve exception chains (from exc) instead of suppressing (from None)
  across service.py, utils.py, execution.py, and update_helpers.py
- Broaden credential resolution catch to handle arbitrary DB exceptions
- Separate status code dispatch from string heuristics in
  raise_for_status_and_detail to prevent misclassification
- Add tests for all behavioral changes
- Make WxOClient and WxOCredentials frozen dataclasses with eager SDK
  client initialization to eliminate thread-safety races from
  asyncio.to_thread workers and prevent post-construction mutation
- Move instance_url validation and normalization into type __post_init__
- Raise DeploymentError on missing run_id instead of returning partial
  success with execution_id=None
- Preserve exception chains (from exc) instead of suppressing (from None)
  across create, update, and delete service methods
- Add warning logs when _ensure_dict replaces non-dict binding values
  and when _resolve_lfx_requirement falls back to minimum version
- Initialize derived_spec before try block to prevent potential NameError
- Log all ToolUploadBatchError errors before re-raising the first
- Change SUPPORTED_ADAPTER_DEPLOYMENT_TYPES from mutable set to frozenset
- Add tests for 409/422 error mapping in create, unsupported deployment
  type rejection, empty update rejection, zip artifact extraction paths,
  validate_connection negative paths, missing run_id, multiple deployment
  ID rejection, exception chain preservation, and _ensure_dict warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants