feldera 0.29.0__py3-none-any.whl → 0.31.0__py3-none-any.whl
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.
Potentially problematic release.
This version of feldera might be problematic. Click here for more details.
- feldera/enums.py +6 -0
- feldera/pipeline.py +5 -2
- feldera/rest/feldera_client.py +30 -5
- {feldera-0.29.0.dist-info → feldera-0.31.0.dist-info}/METADATA +1 -1
- {feldera-0.29.0.dist-info → feldera-0.31.0.dist-info}/RECORD +7 -7
- {feldera-0.29.0.dist-info → feldera-0.31.0.dist-info}/WHEEL +1 -1
- {feldera-0.29.0.dist-info → feldera-0.31.0.dist-info}/top_level.txt +0 -0
feldera/enums.py
CHANGED
|
@@ -175,6 +175,12 @@ class PipelineStatus(Enum):
|
|
|
175
175
|
`PipelineStatus.SHUTDOWN` state.
|
|
176
176
|
"""
|
|
177
177
|
|
|
178
|
+
UNAVAILABLE = 9
|
|
179
|
+
"""
|
|
180
|
+
The pipeline was at least once initialized, but in the most recent status check either
|
|
181
|
+
could not be reached or returned it is not yet ready.
|
|
182
|
+
"""
|
|
183
|
+
|
|
178
184
|
@staticmethod
|
|
179
185
|
def from_str(value):
|
|
180
186
|
for member in PipelineStatus:
|
feldera/pipeline.py
CHANGED
|
@@ -233,10 +233,13 @@ class Pipeline:
|
|
|
233
233
|
status = self.status()
|
|
234
234
|
if status != PipelineStatus.SHUTDOWN:
|
|
235
235
|
raise RuntimeError(
|
|
236
|
-
f"pipeline {self.name} in state
|
|
236
|
+
f"pipeline {self.name} in state {str(status.name)} cannot be started\n"
|
|
237
|
+
+ self.client.get_pipeline(self.name).deployment_error.get(
|
|
238
|
+
"message", ""
|
|
239
|
+
)
|
|
237
240
|
)
|
|
238
241
|
|
|
239
|
-
self.
|
|
242
|
+
self.client.pause_pipeline(self.name, "Unable to START the pipeline.")
|
|
240
243
|
self.__setup_output_listeners()
|
|
241
244
|
self.resume()
|
|
242
245
|
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -200,35 +200,49 @@ class FelderaClient:
|
|
|
200
200
|
)
|
|
201
201
|
|
|
202
202
|
while True:
|
|
203
|
-
|
|
203
|
+
resp = self.get_pipeline(pipeline_name)
|
|
204
|
+
status = resp.deployment_status
|
|
204
205
|
|
|
205
206
|
if status == "Running":
|
|
206
207
|
break
|
|
207
208
|
elif status == "Failed":
|
|
208
|
-
raise RuntimeError(
|
|
209
|
+
raise RuntimeError(
|
|
210
|
+
f"""Unable to START the pipeline.
|
|
211
|
+
Reason: The pipeline is in a FAILED state due to the following error:
|
|
212
|
+
{resp.deployment_error.get("message", "")}"""
|
|
213
|
+
)
|
|
209
214
|
|
|
210
215
|
logging.debug(
|
|
211
216
|
"still starting %s, waiting for 100 more milliseconds", pipeline_name
|
|
212
217
|
)
|
|
213
218
|
time.sleep(0.1)
|
|
214
219
|
|
|
215
|
-
def pause_pipeline(self, pipeline_name: str):
|
|
220
|
+
def pause_pipeline(self, pipeline_name: str, error_message: str = None):
|
|
216
221
|
"""
|
|
217
222
|
Stop a pipeline
|
|
218
223
|
|
|
219
224
|
:param pipeline_name: The name of the pipeline to stop
|
|
225
|
+
:param error_message: The error message to show if the pipeline is in FAILED state
|
|
220
226
|
"""
|
|
221
227
|
self.http.post(
|
|
222
228
|
path=f"/pipelines/{pipeline_name}/pause",
|
|
223
229
|
)
|
|
224
230
|
|
|
231
|
+
if error_message is None:
|
|
232
|
+
error_message = "Unable to PAUSE the pipeline.\n"
|
|
233
|
+
|
|
225
234
|
while True:
|
|
226
|
-
|
|
235
|
+
resp = self.get_pipeline(pipeline_name)
|
|
236
|
+
status = resp.deployment_status
|
|
227
237
|
|
|
228
238
|
if status == "Paused":
|
|
229
239
|
break
|
|
230
240
|
elif status == "Failed":
|
|
231
|
-
raise RuntimeError(
|
|
241
|
+
raise RuntimeError(
|
|
242
|
+
error_message
|
|
243
|
+
+ f"""Reason: The pipeline is in a FAILED state due to the following error:
|
|
244
|
+
{resp.deployment_error.get("message", "")}"""
|
|
245
|
+
)
|
|
232
246
|
|
|
233
247
|
logging.debug(
|
|
234
248
|
"still pausing %s, waiting for 100 more milliseconds", pipeline_name
|
|
@@ -286,6 +300,17 @@ class FelderaClient:
|
|
|
286
300
|
|
|
287
301
|
raise RuntimeError(f"Failed to shutdown pipeline {pipeline_name}")
|
|
288
302
|
|
|
303
|
+
def checkpoint_pipeline(self, pipeline_name: str):
|
|
304
|
+
"""
|
|
305
|
+
Checkpoint a fault-tolerant pipeline
|
|
306
|
+
|
|
307
|
+
:param pipeline_name: The name of the pipeline to checkpoint
|
|
308
|
+
"""
|
|
309
|
+
|
|
310
|
+
self.http.post(
|
|
311
|
+
path=f"/pipelines/{pipeline_name}/checkpoint",
|
|
312
|
+
)
|
|
313
|
+
|
|
289
314
|
def push_to_pipeline(
|
|
290
315
|
self,
|
|
291
316
|
pipeline_name: str,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
feldera/__init__.py,sha256=PxkgCtEAuFwo4u8NGEDio-bF3M-GnbeV45tAQVoBbqE,297
|
|
2
2
|
feldera/_callback_runner.py,sha256=Tdf6BXN4zppyoy8t_y-Ooa3B0wEfvyezMHU9jxY2ZhA,4713
|
|
3
3
|
feldera/_helpers.py,sha256=TuaJPQdAnRV9K5bG7-DCAr45b2JxsZyrwkZBJf1806M,2684
|
|
4
|
-
feldera/enums.py,sha256=
|
|
4
|
+
feldera/enums.py,sha256=pdidN0KsYDruQRIDusdcklVsx2NW9sMXYfo9-kUqtak,6247
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
|
-
feldera/pipeline.py,sha256
|
|
6
|
+
feldera/pipeline.py,sha256=-ReBWeDGed-o9V0uG5RKk21RtD_TBaehomrBiMape4E,16127
|
|
7
7
|
feldera/pipeline_builder.py,sha256=FzpoBlMGPmN76uxLQ768ISI6f3N5jkGriune8jZMkJA,3688
|
|
8
8
|
feldera/runtime_config.py,sha256=PfYXsrLrs5Duty-7x3dGDf2uvp5hwp3Yb5n3bRQtLVk,2898
|
|
9
9
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
10
10
|
feldera/rest/_httprequests.py,sha256=y3RxFn4BCTKbUztO1LN2CWXgGA93dIIV5VLdyiWQWuQ,6181
|
|
11
11
|
feldera/rest/config.py,sha256=84Lj2QX6SYNZJdBfrCHPMh29Nj4MY7nRB-uddytx_ok,795
|
|
12
12
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
13
|
-
feldera/rest/feldera_client.py,sha256=
|
|
13
|
+
feldera/rest/feldera_client.py,sha256=SEG6DLlyZjzckRIx7Dd0hCOYoIb2h8nWJuXy6i6wdKU,17534
|
|
14
14
|
feldera/rest/pipeline.py,sha256=W5Oo_bwVduae-alF3g69RyDwQcuSUsWh-rL6cfvvunQ,2786
|
|
15
15
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
16
16
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
17
|
-
feldera-0.
|
|
18
|
-
feldera-0.
|
|
19
|
-
feldera-0.
|
|
20
|
-
feldera-0.
|
|
17
|
+
feldera-0.31.0.dist-info/METADATA,sha256=nlmQAlxhdaXPyLh5dY3LNrsvCmI0ZgmVHd6pgmn0VuM,2582
|
|
18
|
+
feldera-0.31.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
19
|
+
feldera-0.31.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
20
|
+
feldera-0.31.0.dist-info/RECORD,,
|
|
File without changes
|