Skip to content

feat(framework): Added diff-checker required code and running ucs in shadow mode#9684

Merged
bernard-eugine merged 27 commits intomainfrom
diff-fork
Oct 10, 2025
Merged

feat(framework): Added diff-checker required code and running ucs in shadow mode#9684
bernard-eugine merged 27 commits intomainfrom
diff-fork

Conversation

@AmitsinghTanwar007
Copy link
Contributor

@AmitsinghTanwar007 AmitsinghTanwar007 commented Oct 6, 2025

Type of Change

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

Description

Added a fork using tokio::spawn and sent the cloned router data to UCS,
Added some headers for identification of connector, flow, req-id
called the validation service to send both router data for comparison.

Additional Changes

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

Motivation and Context

How did you test it?

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

@AmitsinghTanwar007 AmitsinghTanwar007 requested review from a team as code owners October 6, 2025 10:15
@semanticdiff-com
Copy link

semanticdiff-com bot commented Oct 6, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/routes/app.rs  46% smaller
  crates/router/src/configs/settings.rs  45% smaller
  crates/external_services/src/grpc_client.rs  37% smaller
  crates/router/src/core/payments.rs  28% smaller
  crates/router/src/services/api.rs  27% smaller
  crates/hyperswitch_domain_models/src/router_data.rs  26% smaller
  crates/external_services/src/http_client/client.rs  22% smaller
  crates/router/src/core/unified_connector_service.rs  16% smaller
  crates/router/src/core/payments/retry.rs  11% smaller
  crates/common_enums/src/enums.rs  0% smaller
  crates/common_utils/src/consts.rs  0% smaller
  crates/common_utils/src/errors.rs  0% smaller
  crates/external_services/src/grpc_client/unified_connector_service.rs  0% smaller
  crates/hyperswitch_domain_models/src/mandates.rs  0% smaller
  crates/hyperswitch_domain_models/src/payment_address.rs  0% smaller
  crates/hyperswitch_domain_models/src/payment_method_data.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_response_types.rs  0% smaller
  crates/hyperswitch_interfaces/src/types.rs  0% smaller
  crates/router/src/configs/secrets_transformers.rs  0% smaller
  crates/router/src/core/payments/flows.rs  0% smaller
  crates/router/src/core/payments/flows/authorize_flow.rs  0% smaller
  crates/router/src/core/payments/flows/external_proxy_flow.rs  0% smaller
  crates/router/src/core/payments/flows/psync_flow.rs  0% smaller
  crates/router/src/core/payments/flows/setup_mandate_flow.rs  0% smaller

merchant_reference_id: Option<ucs_types::UcsReferenceId>,

request_id: Option<String>,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please check with @maverox for the subsequent changes

mut client_builder: reqwest::ClientBuilder,
proxy_config: &Proxy,
) -> reqwest::ClientBuilder {
if let Some(mitm_ca_cert) = &proxy_config.mitm_ca_certificate {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if should have else block, avoid writing code without else block

pub struct ComparisonServiceConfig {
pub url: Url,
pub enabled: bool,
pub timeout_secs: Option<u64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be non optional value with default when value is not passed?

@bernard-eugine bernard-eugine added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit 115ef10 Oct 10, 2025
23 of 25 checks passed
@bernard-eugine bernard-eugine deleted the diff-fork branch October 10, 2025 12:36
chaitak-gorai pushed a commit that referenced this pull request Oct 16, 2025
…shadow mode (#9684)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
drdholu pushed a commit to drdholu/hyperswitch that referenced this pull request Oct 30, 2025
…shadow mode (juspay#9684)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
aadityaguptaa pushed a commit that referenced this pull request Nov 10, 2025
…shadow mode (#9684)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] : Need a framework to test the Req, Res and router data which is made through UCS

5 participants