Skip to content

Commit af6916b

Browse files
authored
Fix infra config pubsub bug (#1857)
1 parent aed9954 commit af6916b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

runtimes/core/src/infracfg.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ pub fn map_infra_to_runtime(infra: InfraConfig) -> RuntimeConfig {
799799
)),
800800
})
801801
.collect();
802-
803802
let subscriptions = gcp
804803
.topics
805804
.iter()
@@ -812,22 +811,24 @@ pub fn map_infra_to_runtime(infra: InfraConfig) -> RuntimeConfig {
812811
topic_cloud_name: topic.name.clone(),
813812
subscription_cloud_name: sub.name.clone(),
814813
push_only: sub.push_config.is_some(),
815-
provider_config: sub.push_config.as_ref().map(|pc| {
814+
provider_config: Some(
816815
pub_sub_subscription::ProviderConfig::GcpConfig(
817816
pub_sub_subscription::GcpConfig {
818817
project_id: sub
819818
.project_id
820819
.clone()
821820
.unwrap_or_else(|| gcp.project_id.clone()),
822-
push_service_account: Some(
823-
pc.service_account.clone(),
824-
),
825-
push_jwt_audience: Some(
826-
pc.jwt_audience.clone(),
827-
),
821+
push_service_account: sub
822+
.push_config
823+
.as_ref()
824+
.map(|pc| pc.service_account.clone()),
825+
push_jwt_audience: sub
826+
.push_config
827+
.as_ref()
828+
.map(|pc| pc.jwt_audience.clone()),
828829
},
829-
)
830-
}),
830+
),
831+
),
831832
}
832833
})
833834
})

0 commit comments

Comments
 (0)