chalk-remote-call-python 1.10.0__tar.gz → 1.10.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. {chalk_remote_call_python-1.10.0/chalk_remote_call_python.egg-info → chalk_remote_call_python-1.10.1}/PKG-INFO +1 -1
  2. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/Cargo.lock +1 -1
  3. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/Cargo.toml +1 -1
  4. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/self_consumer.rs +41 -11
  5. chalk_remote_call_python-1.10.1/chalk_remote_call/_version.py +1 -0
  6. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1/chalk_remote_call_python.egg-info}/PKG-INFO +1 -1
  7. chalk_remote_call_python-1.10.0/chalk_remote_call/_version.py +0 -1
  8. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/MANIFEST.in +0 -0
  9. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/README.md +0 -0
  10. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/Cargo.toml +0 -0
  11. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/Cargo.toml +0 -0
  12. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.auth.v1.rs +0 -0
  13. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.common.v1.rs +0 -0
  14. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.rs +0 -0
  15. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.tonic.rs +0 -0
  16. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.utils.v1.rs +0 -0
  17. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/descriptor.bin +0 -0
  18. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/lib.rs +0 -0
  19. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/async_service.rs +0 -0
  20. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/coalesce.rs +0 -0
  21. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/lib.rs +0 -0
  22. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/metrics.rs +0 -0
  23. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/python_bridge.rs +0 -0
  24. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/server.rs +0 -0
  25. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/chalk-remote-call-server/src/service.rs +0 -0
  26. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk-remote-call-rs/rust-toolchain.toml +0 -0
  27. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/__init__.py +0 -0
  28. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/__main__.py +0 -0
  29. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/__init__.py +0 -0
  30. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/__init__.py +0 -0
  31. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/auth/__init__.py +0 -0
  32. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/auth/v1/__init__.py +0 -0
  33. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2.py +0 -0
  34. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2_grpc.py +0 -0
  35. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/common/__init__.py +0 -0
  36. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/common/v1/__init__.py +0 -0
  37. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2.py +0 -0
  38. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2_grpc.py +0 -0
  39. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/runtime/__init__.py +0 -0
  40. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/runtime/v1/__init__.py +0 -0
  41. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2.py +0 -0
  42. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2_grpc.py +0 -0
  43. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/__init__.py +0 -0
  44. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/__init__.py +0 -0
  45. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2.py +0 -0
  46. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2_grpc.py +0 -0
  47. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2.py +0 -0
  48. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2_grpc.py +0 -0
  49. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2.py +0 -0
  50. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2_grpc.py +0 -0
  51. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/_native.pyi +0 -0
  52. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/arrow_utils.py +0 -0
  53. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/cli.py +0 -0
  54. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/errors.py +0 -0
  55. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/handler_loader.py +0 -0
  56. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/input_transform.py +0 -0
  57. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/logging.py +0 -0
  58. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/server.py +0 -0
  59. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/servicer.py +0 -0
  60. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call/tracing.py +0 -0
  61. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call_python.egg-info/SOURCES.txt +0 -0
  62. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call_python.egg-info/dependency_links.txt +0 -0
  63. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call_python.egg-info/entry_points.txt +0 -0
  64. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call_python.egg-info/requires.txt +0 -0
  65. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/chalk_remote_call_python.egg-info/top_level.txt +0 -0
  66. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/pyproject.toml +0 -0
  67. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/setup.cfg +0 -0
  68. {chalk_remote_call_python-1.10.0 → chalk_remote_call_python-1.10.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chalk-remote-call-python
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: Chalk remote call Python runtime interface client
5
5
  Author: Chalk AI, Inc.
6
6
  Project-URL: Homepage, https://chalk.ai
@@ -511,7 +511,7 @@ dependencies = [
511
511
  [[package]]
512
512
  name = "chalk-queue"
513
513
  version = "0.0.0"
514
- source = "git+https://github.com/chalk-ai/chalk-private.git?rev=c6eed6bd7bdad1f2a7568ef206e570c719c4c64f#c6eed6bd7bdad1f2a7568ef206e570c719c4c64f"
514
+ source = "git+https://github.com/chalk-ai/chalk-private.git?rev=41458754e6916245a092ddc09562bcaf4dea373e#41458754e6916245a092ddc09562bcaf4dea373e"
515
515
  dependencies = [
516
516
  "base64 0.22.1",
517
517
  "redis",
@@ -37,6 +37,6 @@ futures-util = "0.3"
37
37
  # `[patch.crates-io]` here it builds against vanilla crates.io redis (it only
38
38
  # uses standard APIs). Metrics and StatsD share a revision so their client types agree.
39
39
  [target.'cfg(target_os = "linux")'.dependencies]
40
- chalk-queue = { git = "https://github.com/chalk-ai/chalk-private.git", rev = "c6eed6bd7bdad1f2a7568ef206e570c719c4c64f" }
40
+ chalk-queue = { git = "https://github.com/chalk-ai/chalk-private.git", rev = "41458754e6916245a092ddc09562bcaf4dea373e" }
41
41
  chalk_metrics = { git = "https://github.com/chalk-ai/chalk-private.git", rev = "a0f8932ec10d3b8340af3e98cf63b800d60b4926" }
42
42
  chalk_statsd = { git = "https://github.com/chalk-ai/chalk-private.git", rev = "a0f8932ec10d3b8340af3e98cf63b800d60b4926" }
@@ -108,6 +108,7 @@ const PEER: &str = "fnq-self-consumer";
108
108
  enum ResultDestination {
109
109
  PerCall {
110
110
  stream_key: String,
111
+ result_ttl: Duration,
111
112
  },
112
113
  Batch {
113
114
  stream_key: String,
@@ -125,10 +126,18 @@ impl ResultDestination {
125
126
  batch_result.row_index,
126
127
  )
127
128
  });
128
- Self::from_routing(queue.stream_key_for(call_uuid), batch)
129
+ Self::from_routing(
130
+ queue.stream_key_for(call_uuid),
131
+ Duration::from_secs(work.result_ttl_seconds),
132
+ batch,
133
+ )
129
134
  }
130
135
 
131
- fn from_routing(per_call_stream_key: String, batch: Option<(String, String, u64)>) -> Self {
136
+ fn from_routing(
137
+ per_call_stream_key: String,
138
+ result_ttl: Duration,
139
+ batch: Option<(String, String, u64)>,
140
+ ) -> Self {
132
141
  match batch {
133
142
  Some((stream_key, call_id, row_index)) => Self::Batch {
134
143
  stream_key,
@@ -137,6 +146,7 @@ impl ResultDestination {
137
146
  },
138
147
  None => Self::PerCall {
139
148
  stream_key: per_call_stream_key,
149
+ result_ttl,
140
150
  },
141
151
  }
142
152
  }
@@ -148,7 +158,7 @@ impl ResultDestination {
148
158
  data: &[u8],
149
159
  ) -> Result<(), redis::RedisError> {
150
160
  match self {
151
- Self::PerCall { stream_key } => {
161
+ Self::PerCall { stream_key, .. } => {
152
162
  stream_writer::write_chunk(conn, stream_key, seq, data).await
153
163
  }
154
164
  Self::Batch {
@@ -169,7 +179,10 @@ impl ResultDestination {
169
179
  seq: u64,
170
180
  ) -> Result<(), redis::RedisError> {
171
181
  match self {
172
- Self::PerCall { stream_key } => stream_writer::write_end(conn, stream_key, seq).await,
182
+ Self::PerCall {
183
+ stream_key,
184
+ result_ttl,
185
+ } => stream_writer::write_end_with_ttl(conn, stream_key, seq, *result_ttl).await,
173
186
  Self::Batch {
174
187
  stream_key,
175
188
  call_id,
@@ -191,9 +204,20 @@ impl ResultDestination {
191
204
  traceback: Option<&str>,
192
205
  ) -> Result<(), redis::RedisError> {
193
206
  match self {
194
- Self::PerCall { stream_key } => {
195
- stream_writer::write_error(conn, stream_key, seq, exc_type, message, traceback)
196
- .await
207
+ Self::PerCall {
208
+ stream_key,
209
+ result_ttl,
210
+ } => {
211
+ stream_writer::write_error_with_ttl(
212
+ conn,
213
+ stream_key,
214
+ seq,
215
+ exc_type,
216
+ message,
217
+ traceback,
218
+ *result_ttl,
219
+ )
220
+ .await
197
221
  }
198
222
  Self::Batch {
199
223
  stream_key,
@@ -683,7 +707,7 @@ async fn run_one_call(
683
707
  {
684
708
  Ok(Ok(())) => true,
685
709
  Ok(Err(e)) => {
686
- // The call's result stream may be incomplete; the call's 24h stream TTL
710
+ // The call's result stream may be incomplete; the enqueue safety TTL
687
711
  // and the meta status are the backstop for a stuck poller.
688
712
  error!(call_id = %call_id, error = %e, "failed to execute/write queued call");
689
713
  false
@@ -769,8 +793,8 @@ async fn run_one_coalesced_call(
769
793
  {
770
794
  Ok(()) => true,
771
795
  Err(e) => {
772
- // The call's result stream may be incomplete; the 24h stream TTL and
773
- // the meta status are the backstop for a stuck poller.
796
+ // The call's result stream may be incomplete; the enqueue safety TTL
797
+ // and the meta status are the backstop for a stuck poller.
774
798
  error!(call_id = %call_id, error = %e, "failed to execute/write coalesced queued call");
775
799
  false
776
800
  }
@@ -1128,9 +1152,14 @@ mod tests {
1128
1152
  #[test]
1129
1153
  fn result_destination_preserves_per_call_stream() {
1130
1154
  assert_eq!(
1131
- ResultDestination::from_routing("tenant:gen:call-1:stream".to_string(), None),
1155
+ ResultDestination::from_routing(
1156
+ "tenant:gen:call-1:stream".to_string(),
1157
+ Duration::from_secs(60),
1158
+ None,
1159
+ ),
1132
1160
  ResultDestination::PerCall {
1133
1161
  stream_key: "tenant:gen:call-1:stream".to_string(),
1162
+ result_ttl: Duration::from_secs(60),
1134
1163
  }
1135
1164
  );
1136
1165
  }
@@ -1140,6 +1169,7 @@ mod tests {
1140
1169
  assert_eq!(
1141
1170
  ResultDestination::from_routing(
1142
1171
  "unused-per-call-stream".to_string(),
1172
+ Duration::from_secs(60),
1143
1173
  Some((
1144
1174
  "tenant:batch:batch-1:results".to_string(),
1145
1175
  "call-1".to_string(),
@@ -0,0 +1 @@
1
+ __version__ = "1.10.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chalk-remote-call-python
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: Chalk remote call Python runtime interface client
5
5
  Author: Chalk AI, Inc.
6
6
  Project-URL: Homepage, https://chalk.ai
@@ -1 +0,0 @@
1
- __version__ = "1.10.0"