Skip to content

Commit 289145a

Browse files
authored
Merge branch 'master' into otel-tracing-error
2 parents d4eb94d + 52d1bb6 commit 289145a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1466
-524
lines changed

client/src/raw.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,11 @@ proxier! {
12311231
(create_api_key, cloudreq::CreateApiKeyRequest, cloudreq::CreateApiKeyResponse);
12321232
(update_api_key, cloudreq::UpdateApiKeyRequest, cloudreq::UpdateApiKeyResponse);
12331233
(delete_api_key, cloudreq::DeleteApiKeyRequest, cloudreq::DeleteApiKeyResponse);
1234+
(get_nexus_endpoints, cloudreq::GetNexusEndpointsRequest, cloudreq::GetNexusEndpointsResponse);
1235+
(get_nexus_endpoint, cloudreq::GetNexusEndpointRequest, cloudreq::GetNexusEndpointResponse);
1236+
(create_nexus_endpoint, cloudreq::CreateNexusEndpointRequest, cloudreq::CreateNexusEndpointResponse);
1237+
(update_nexus_endpoint, cloudreq::UpdateNexusEndpointRequest, cloudreq::UpdateNexusEndpointResponse);
1238+
(delete_nexus_endpoint, cloudreq::DeleteNexusEndpointRequest, cloudreq::DeleteNexusEndpointResponse);
12341239
(get_user_groups, cloudreq::GetUserGroupsRequest, cloudreq::GetUserGroupsResponse);
12351240
(get_user_group, cloudreq::GetUserGroupRequest, cloudreq::GetUserGroupResponse);
12361241
(create_user_group, cloudreq::CreateUserGroupRequest, cloudreq::CreateUserGroupResponse);
@@ -1242,6 +1247,15 @@ proxier! {
12421247
(get_service_accounts, cloudreq::GetServiceAccountsRequest, cloudreq::GetServiceAccountsResponse);
12431248
(update_service_account, cloudreq::UpdateServiceAccountRequest, cloudreq::UpdateServiceAccountResponse);
12441249
(delete_service_account, cloudreq::DeleteServiceAccountRequest, cloudreq::DeleteServiceAccountResponse);
1250+
(get_usage, cloudreq::GetUsageRequest, cloudreq::GetUsageResponse);
1251+
(get_account, cloudreq::GetAccountRequest, cloudreq::GetAccountResponse);
1252+
(update_account, cloudreq::UpdateAccountRequest, cloudreq::UpdateAccountResponse);
1253+
(create_namespace_export_sink, cloudreq::CreateNamespaceExportSinkRequest, cloudreq::CreateNamespaceExportSinkResponse);
1254+
(get_namespace_export_sink, cloudreq::GetNamespaceExportSinkRequest, cloudreq::GetNamespaceExportSinkResponse);
1255+
(get_namespace_export_sinks, cloudreq::GetNamespaceExportSinksRequest, cloudreq::GetNamespaceExportSinksResponse);
1256+
(update_namespace_export_sink, cloudreq::UpdateNamespaceExportSinkRequest, cloudreq::UpdateNamespaceExportSinkResponse);
1257+
(delete_namespace_export_sink, cloudreq::DeleteNamespaceExportSinkRequest, cloudreq::DeleteNamespaceExportSinkResponse);
1258+
(validate_namespace_export_sink, cloudreq::ValidateNamespaceExportSinkRequest, cloudreq::ValidateNamespaceExportSinkResponse);
12451259
}
12461260

12471261
proxier! {

core/src/abstractions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ struct UseCtx<'a, SK: SlotKind> {
189189
permit: &'a SlotSupplierPermit,
190190
}
191191

192-
impl<'a, SK: SlotKind> SlotMarkUsedContext for UseCtx<'a, SK> {
192+
impl<SK: SlotKind> SlotMarkUsedContext for UseCtx<'_, SK> {
193193
type SlotKind = SK;
194194

195195
fn permit(&self) -> &SlotSupplierPermit {

core/src/core_tests/updates.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ async fn replay_with_signal_and_update_same_task() {
291291
StartTimer {
292292
seq: 1,
293293
start_to_fire_timeout: Some(prost_dur!(from_secs(1))),
294-
summary: None,
295294
}
296295
.into(),
297296
UpdateResponse {

core/src/core_tests/workers.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ async fn after_shutdown_of_worker_get_shutdown_err() {
4545
workflow_command::Variant::StartTimer(StartTimer {
4646
seq: 1,
4747
start_to_fire_timeout: Some(prost_dur!(from_secs(1))),
48-
summary: None,
4948
}),
5049
))
5150
.await
@@ -349,7 +348,6 @@ async fn worker_shutdown_api(#[case] use_cache: bool, #[case] api_success: bool)
349348
workflow_command::Variant::StartTimer(StartTimer {
350349
seq: 1,
351350
start_to_fire_timeout: Some(prost_dur!(from_secs(1))),
352-
summary: None,
353351
}),
354352
))
355353
.await

core/src/telemetry/log_export.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl fmt::Debug for CoreLogStreamConsumer {
168168

169169
struct JsonVisitor<'a>(&'a mut HashMap<String, serde_json::Value>);
170170

171-
impl<'a> tracing::field::Visit for JsonVisitor<'a> {
171+
impl tracing::field::Visit for JsonVisitor<'_> {
172172
fn record_f64(&mut self, field: &tracing::field::Field, value: f64) {
173173
self.0
174174
.insert(field.name().to_string(), serde_json::json!(value));

core/src/telemetry/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,13 @@ where
276276
}
277277
}
278278

279+
/// Helpers for test initialization
279280
#[cfg(test)]
280281
pub mod test_initters {
281282
use super::*;
282283
use temporal_sdk_core_api::telemetry::TelemetryOptionsBuilder;
283284

285+
/// Turn on logging to the console
284286
#[allow(dead_code)] // Not always used, called to enable for debugging when needed
285287
pub fn test_telem_console() {
286288
telemetry_init_global(

core/src/test_help/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ macro_rules! advance_fut {
10261026
};
10271027
}
10281028

1029+
/// Helps easily construct prost proto durations from stdlib duration constructors
10291030
#[macro_export]
10301031
macro_rules! prost_dur {
10311032
($dur_call:ident $args:tt) => {

core/src/worker/workflow/driven_workflow.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
telemetry::VecDisplayer,
3-
worker::workflow::{OutgoingJob, WFCommand, WorkflowStartedInfo},
3+
worker::workflow::{OutgoingJob, WFCommand, WFCommandVariant, WorkflowStartedInfo},
44
};
55
use prost_types::Timestamp;
66
use std::{
@@ -86,7 +86,12 @@ impl DrivenWorkflow {
8686
/// from a buffer that the language side sinks into when it calls [crate::Core::complete_task]
8787
pub(super) fn fetch_workflow_iteration_output(&mut self) -> Vec<WFCommand> {
8888
let in_cmds = self.incoming_commands.try_recv();
89-
let in_cmds = in_cmds.unwrap_or_else(|_| vec![WFCommand::NoCommandsFromLang]);
89+
let in_cmds = in_cmds.unwrap_or_else(|_| {
90+
vec![WFCommand {
91+
variant: WFCommandVariant::NoCommandsFromLang,
92+
metadata: None,
93+
}]
94+
});
9095
debug!(in_cmds = %in_cmds.display(), "wf bridge iteration fetch");
9196
in_cmds
9297
}

core/src/worker/workflow/machines/activity_state_machine.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use temporal_sdk_core_protos::{
3030
ActivityTaskCompletedEventAttributes, ActivityTaskFailedEventAttributes,
3131
ActivityTaskTimedOutEventAttributes,
3232
},
33-
sdk::v1::UserMetadata,
3433
},
3534
};
3635

@@ -115,10 +114,6 @@ impl ActivityMachine {
115114
internal_flags: InternalFlagsRef,
116115
use_compatible_version: bool,
117116
) -> NewMachineWithCommand {
118-
let user_metadata = attrs.summary.clone().map(|x| UserMetadata {
119-
summary: Some(x),
120-
details: None,
121-
});
122117
let mut s = Self::from_parts(
123118
Created {}.into(),
124119
SharedState {
@@ -133,16 +128,11 @@ impl ActivityMachine {
133128
);
134129
OnEventWrapper::on_event_mut(&mut s, ActivityMachineEvents::Schedule)
135130
.expect("Scheduling activities doesn't fail");
136-
let command = Command {
137-
command_type: CommandType::ScheduleActivityTask as i32,
138-
attributes: Some(schedule_activity_cmd_to_api(
131+
NewMachineWithCommand {
132+
command: schedule_activity_cmd_to_api(
139133
s.shared_state().attrs.clone(),
140134
use_compatible_version,
141-
)),
142-
user_metadata,
143-
};
144-
NewMachineWithCommand {
145-
command,
135+
),
146136
machine: s.into(),
147137
}
148138
}

core/src/worker/workflow/machines/cancel_external_state_machine.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use temporal_sdk_core_protos::{
1111
workflow_activation::ResolveRequestCancelExternalWorkflow,
1212
},
1313
temporal::api::{
14-
command::v1::{command, Command, RequestCancelExternalWorkflowExecutionCommandAttributes},
14+
command::v1::{command, RequestCancelExternalWorkflowExecutionCommandAttributes},
1515
enums::v1::{CancelExternalWorkflowExecutionFailedCause, CommandType, EventType},
1616
failure::v1::{failure::FailureInfo, ApplicationFailureInfo, Failure},
1717
history::v1::history_event,
@@ -75,13 +75,8 @@ pub(super) fn new_external_cancel(
7575
reason,
7676
},
7777
);
78-
let cmd = Command {
79-
command_type: CommandType::RequestCancelExternalWorkflowExecution as i32,
80-
attributes: Some(cmd_attrs),
81-
user_metadata: Default::default(),
82-
};
8378
NewMachineWithCommand {
84-
command: cmd,
79+
command: cmd_attrs,
8580
machine: s.into(),
8681
}
8782
}

0 commit comments

Comments
 (0)