-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(euclid): integration with decision engine #7930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changed Files
|
…perswitch into euclid_decision_engine
…perswitch into euclid_decision_engine
…h into euclid_decision_engine
…h into euclid_decision_engine
|
Migration tests failing @prajjwalkumar17 |
jagan-jaya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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