Skip to content

fix(ucs): adapt to optional mandate fields - #14312

Draft
pixincreate wants to merge 1 commit into
mainfrom
fix/ucs-optional-deprecated-proto-fields
Draft

pixincreate wants to merge 1 commit into
mainfrom
fix/ucs-optional-deprecated-proto-fields

Conversation

@pixincreate

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Updates unified-connector-service-client and unified-connector-service-cards to the UCS branch with the proto change, and adjusts the request builders:

  • MandateAmountData.amount and MandateAmountData.currency are now optional, so they are wrapped in Some.
  • Fills fields added by the newer proto: connector_order_id, setup recurring capture_method, and Apple Pay merchant_token_identifier.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Five deprecated fields in the UCS proto were still required. Making them optional keeps consumers working when they omit the deprecated fields. UCS change: juspay/hyperswitch-prism#2329

The dependency points to the UCS branch until the change is released as a tag.

How did you test it?

cargo check -p router and cargo clippy -p router pass with the branch dependency.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

Unified Connector Service marks its deprecated mandate fields
optional. Point the unified-connector-service-* dependencies at the
UCS branch carrying that change, and update the request builders.

- Wrap MandateAmountData.amount and .currency in Some.
- Fill fields added in the newer UCS proto: connector_order_id,
  setup recurring capture_method, and Apple Pay
  merchant_token_identifier.

Switch the dependency to a release tag once the UCS change is
released.

Assisted-by: DeepSeek V4.1 Flash
Signed-off-by: PiX <69745008+pixincreate@users.noreply.github.com>
@pixincreate pixincreate added Rust Pull requests that update Rust code S-test-ready Status: This PR is ready for cypress-tests labels Sep 18, 2026
@semanticdiff-com

semanticdiff-com Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/unified_connector_service/transformers.rs  8% smaller
  Cargo.lock Unsupported file format
  crates/external_services/Cargo.toml Unsupported file format
  crates/hyperswitch_interfaces/Cargo.toml Unsupported file format
  crates/router/Cargo.toml Unsupported file format

@XyneSpaces

Copy link
Copy Markdown
Contributor

[should-fix] Cargo.toml / Cargo.lock

This PR switches the connector-service dependencies from a pinned tag to the moving branch fix/deprecated-fields-optional. That makes builds non-reproducible and lets upstream branch changes land silently. Pin to a tag or exact revision before merging.

@XyneSpaces

Copy link
Copy Markdown
Contributor

[should-fix] Cargo.toml now depends on connector-service via branch = "fix/deprecated-fields-optional" instead of a pinned tag. Branch-based git dependencies can drift or be deleted, and future cargo update pulls new commits automatically. Pin to a tag or exact revision, especially for a dependency shared across external_services, hyperswitch_interfaces, and router.

unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "<stable-tag>", package = "rust-grpc-client" }

@XyneSpaces

Copy link
Copy Markdown
Contributor

[should-fix] The PR switches the unified-connector-service-client / unified-connector-service-cards dependencies from a pinned tag (2026.09.15.0) to the moving branch fix/deprecated-fields-optional. Cargo will fetch the latest commit on that branch, making builds non-reproducible and allowing upstream changes to break this PR after it merges. Pin to a tag or specific rev before merging.

@XyneSpaces

Copy link
Copy Markdown
Contributor

[blocking] Replace the branch = "fix/deprecated-fields-optional" dependency pins with a released tag or a pinned revision before merge. Branch dependencies drift and make the build non-reproducible.

Affected: crates/external_services/Cargo.toml, crates/hyperswitch_interfaces/Cargo.toml, crates/router/Cargo.toml, and the matching Cargo.lock entries.

@XyneSpaces

Copy link
Copy Markdown
Contributor

🚨 Mutable git dependency branch (file:line references below; inline comments could not be posted by this automation):

  • crates/external_services/Cargo.toml:97
  • crates/hyperswitch_interfaces/Cargo.toml:38
  • crates/router/Cargo.toml:246
  • crates/router/Cargo.toml:247

The unified-connector-service-* crates are pinned to branch = "fix/deprecated-fields-optional". A mutable branch can change or be deleted, breaking reproducible builds and CI. Pin these dependencies to a validated tag or rev before merging.

@XyneSpaces

Copy link
Copy Markdown
Contributor

🚨 Cargo.toml now points the UCS gRPC client and cards crates to a moving feature branch (fix/deprecated-fields-optional) instead of a pinned tag. This makes the build non-reproducible and pulls in unreleased connector-service changes.

Pin these dependencies back to a stable tag (or a specific rev) before merging; a temporary branch pointer should not land in main.

@XyneSpaces

Copy link
Copy Markdown
Contributor

⚠️ Cargo dependencies were switched from a pinned tag (2026.09.15.0) to a moving branch (fix/deprecated-fields-optional) in multiple Cargo.toml files and Cargo.lock.

Branch references make the build non-reproducible and can pull in unexpected changes as the branch moves. Pin to a specific tag or commit SHA before merging, especially for the unified-connector-service-client/ucs_cards integrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code S-test-ready Status: This PR is ready for cypress-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants