Skip to content

feat(external_services): Fixed Url for Unified Connector Service gRPC Client #8587

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

Merged
merged 6 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,7 @@ static_routing_enabled = true # Enable or disable Open Router for stat
url = "http://localhost:8080" # Open Router URL

[grpc_client.unified_connector_service]
host = "localhost" # Unified Connector Service Client Host
port = 8000 # Unified Connector Service Client Port
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds

[billing_connectors_invoice_sync]
Expand Down
3 changes: 1 addition & 2 deletions config/deployments/env_specific.toml
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,7 @@ merchant_ids = "merchant_ids" # Comma-separated list of allowed mercha
connector_names = "connector_names" # Comma-separated list of allowed connector names

[grpc_client.unified_connector_service]
host = "localhost" # Unified Connector Service Client Host
port = 8000 # Unified Connector Service Client Port
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds

[chat]
Expand Down
3 changes: 1 addition & 2 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,7 @@ static_routing_enabled = false
url = "http://localhost:8080"

[grpc_client.unified_connector_service]
host = "localhost"
port = 8000
base_url = "http://localhost:8000"
connection_timeout = 10

[revenue_recovery]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use common_utils::{consts as common_utils_consts, errors::CustomResult};
use common_utils::{consts as common_utils_consts, errors::CustomResult, types::Url};
use error_stack::ResultExt;
use masking::{PeekInterface, Secret};
use router_env::logger;
Expand Down Expand Up @@ -110,11 +110,8 @@ pub struct UnifiedConnectorServiceClient {
/// Contains the Unified Connector Service Client config
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
pub struct UnifiedConnectorServiceClientConfig {
/// Host for the gRPC Client
pub host: String,

/// Port of the gRPC Client
pub port: u16,
/// Base URL of the gRPC Server
pub base_url: Url,

/// Contains the connection timeout duration in seconds
pub connection_timeout: u64,
Expand Down Expand Up @@ -147,13 +144,11 @@ impl UnifiedConnectorServiceClient {
pub async fn build_connections(config: &GrpcClientSettings) -> Option<Self> {
match &config.unified_connector_service {
Some(unified_connector_service_client_config) => {
let uri_str = format!(
"https://{}:{}",
unified_connector_service_client_config.host,
unified_connector_service_client_config.port
);

let uri: Uri = match uri_str.parse() {
let uri: Uri = match unified_connector_service_client_config
.base_url
.get_string_repr()
.parse()
{
Ok(parsed_uri) => parsed_uri,
Err(err) => {
logger::error!(error = ?err, "Failed to parse URI for Unified Connector Service");
Expand Down
Loading