feat(euclid): integration with decision engine#7930
Merged
Gnanasundari24 merged 29 commits intomainfrom May 14, 2025
Merged
Conversation
Changed Files
|
…perswitch into euclid_decision_engine
…perswitch into euclid_decision_engine
…h into euclid_decision_engine
jagan-jaya
reviewed
May 12, 2025
…h into euclid_decision_engine
Contributor
|
Migration tests failing @prajjwalkumar17 |
Sarthak1799
reviewed
May 12, 2025
Sarthak1799
reviewed
May 12, 2025
jagan-jaya
reviewed
May 13, 2025
Contributor
jagan-jaya
left a comment
There was a problem hiding this comment.
Add an alter table command in v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql to remove the decision_engine_routing_id column in routing_algorithm.
Otherwise create down.sql also
jagan-jaya
previously approved these changes
May 13, 2025
Sarthak1799
approved these changes
May 13, 2025
jagan-jaya
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR integrates the Euclid-based decision engine with Hyperswitch’s dynamic routing infrastructure. It enables dual routing logic: legacy DSL-based evaluation and decision-engine-backed configurations. The integration ensures routing algorithms can be authored, activated, and evaluated via Euclid and linked seamlessly to merchant profiles.
Outcomes
decision_engine_routing_id) in the existingrouting_algorithmtable.Diff Hunk Explanation
crates/api_models/src/routing.rsdecision_engine_routing_idtoRoutingDictionaryRecordto expose the DE mapping in API responses.RoutingAlgorithmKindwithPartialEqto aid in logic branching.crates/diesel_models/src/routing_algorithm.rsdecision_engine_routing_idto map to Euclid's algorithm record.crates/diesel_models/src/schema.rsrouting_algorithmschema to includedecision_engine_routing_id VARCHAR(64).crates/router/src/core/payments/routing.rsperform_decision_euclid_routinginto static routing flow for test execution and future use.crates/router/src/core/routing.rsActivateRoutingConfigRequest.retrieve_merchant_routing_dictionaryto fetch and append decision engine routing configs by profile ID.crates/router/src/core/routing/transformers.rsdecision_engine_routing_idis preserved and transformed when converting between internal and API models.migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/*.sqldecision_engine_routing_idcolumn in therouting_algorithmtable via Diesel migrations.Additional Changes
Motivation and Context
How did you test it?
Here is the complete testing guidelines.
Migrations
Checklist
cargo +nightly fmt --allcargo clippy