-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 |
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_algorithm
table.Diff Hunk Explanation
crates/api_models/src/routing.rs
decision_engine_routing_id
toRoutingDictionaryRecord
to expose the DE mapping in API responses.RoutingAlgorithmKind
withPartialEq
to aid in logic branching.crates/diesel_models/src/routing_algorithm.rs
decision_engine_routing_id
to map to Euclid's algorithm record.crates/diesel_models/src/schema.rs
routing_algorithm
schema to includedecision_engine_routing_id VARCHAR(64)
.crates/router/src/core/payments/routing.rs
perform_decision_euclid_routing
into static routing flow for test execution and future use.crates/router/src/core/routing.rs
ActivateRoutingConfigRequest
.retrieve_merchant_routing_dictionary
to fetch and append decision engine routing configs by profile ID.crates/router/src/core/routing/transformers.rs
decision_engine_routing_id
is preserved and transformed when converting between internal and API models.migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/*.sql
decision_engine_routing_id
column in therouting_algorithm
table via Diesel migrations.Additional Changes
Motivation and Context
How did you test it?
Here is the complete testing guidelines.
Migrations
Checklist
cargo +nightly fmt --all
cargo clippy