feldera 0.30.0__tar.gz → 0.31.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.
Potentially problematic release.
This version of feldera might be problematic. Click here for more details.
- {feldera-0.30.0 → feldera-0.31.1}/PKG-INFO +1 -1
- {feldera-0.30.0 → feldera-0.31.1}/feldera/pipeline.py +5 -2
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/feldera_client.py +20 -6
- {feldera-0.30.0 → feldera-0.31.1}/feldera.egg-info/PKG-INFO +1 -1
- {feldera-0.30.0 → feldera-0.31.1}/pyproject.toml +1 -1
- {feldera-0.30.0 → feldera-0.31.1}/tests/test_pipeline_builder.py +59 -0
- {feldera-0.30.0 → feldera-0.31.1}/README.md +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/__init__.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/_callback_runner.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/_helpers.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/enums.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/output_handler.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/pipeline_builder.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/__init__.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/_httprequests.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/config.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/errors.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/pipeline.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/sql_table.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/rest/sql_view.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera/runtime_config.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera.egg-info/SOURCES.txt +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera.egg-info/dependency_links.txt +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera.egg-info/requires.txt +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/feldera.egg-info/top_level.txt +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/setup.cfg +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/tests/test_pipeline.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/tests/test_udf.py +0 -0
- {feldera-0.30.0 → feldera-0.31.1}/tests/test_variant.py +0 -0
|
@@ -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
|
|
|
@@ -79,7 +79,7 @@ class FelderaClient:
|
|
|
79
79
|
return [Pipeline.from_dict(pipeline) for pipeline in resp]
|
|
80
80
|
|
|
81
81
|
def __wait_for_compilation(self, name: str):
|
|
82
|
-
wait = ["Pending", "CompilingSql", "CompilingRust"]
|
|
82
|
+
wait = ["Pending", "CompilingSql", "SqlCompiled", "CompilingRust"]
|
|
83
83
|
|
|
84
84
|
while True:
|
|
85
85
|
p = self.get_pipeline(name)
|
|
@@ -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
|
|
@@ -951,6 +951,65 @@ Code snippet:
|
|
|
951
951
|
|
|
952
952
|
self.assertCountEqual(got, expected)
|
|
953
953
|
|
|
954
|
+
def test_issue2971(self):
|
|
955
|
+
sql = """
|
|
956
|
+
CREATE TABLE t0(c0 TINYINT) with ('materialized' = 'true');
|
|
957
|
+
CREATE MATERIALIZED VIEW v0 AS SELECT (c0 + 127::TINYINT) as out FROM t0;
|
|
958
|
+
"""
|
|
959
|
+
|
|
960
|
+
pipeline = PipelineBuilder(
|
|
961
|
+
TEST_CLIENT, name="test_issue2971", sql=sql
|
|
962
|
+
).create_or_replace()
|
|
963
|
+
pipeline.start()
|
|
964
|
+
pipeline.input_json("t0", {"c0": 10})
|
|
965
|
+
|
|
966
|
+
with self.assertRaises(RuntimeError) as err:
|
|
967
|
+
pipeline.pause()
|
|
968
|
+
|
|
969
|
+
got_err: str = err.exception.args[0].strip()
|
|
970
|
+
assert "attempt to add with overflow" in got_err
|
|
971
|
+
|
|
972
|
+
with self.assertRaises(RuntimeError) as err:
|
|
973
|
+
pipeline.start()
|
|
974
|
+
|
|
975
|
+
got_err: str = err.exception.args[0].strip()
|
|
976
|
+
assert "attempt to add with overflow" in got_err
|
|
977
|
+
|
|
978
|
+
pipeline.shutdown()
|
|
979
|
+
pipeline.delete()
|
|
980
|
+
|
|
981
|
+
def test_initialization_error(self):
|
|
982
|
+
sql = """
|
|
983
|
+
CREATE TABLE t0 (
|
|
984
|
+
c0 INT NOT NULL
|
|
985
|
+
) with (
|
|
986
|
+
'connectors' = '[{
|
|
987
|
+
"transport": {
|
|
988
|
+
"name": "datagen",
|
|
989
|
+
"config": {
|
|
990
|
+
"plan": [{
|
|
991
|
+
"fields": {
|
|
992
|
+
"c1": { "strategy": "uniform", "range": [100, 10000] }
|
|
993
|
+
}
|
|
994
|
+
}]
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}]'
|
|
998
|
+
);
|
|
999
|
+
"""
|
|
1000
|
+
|
|
1001
|
+
pipeline = PipelineBuilder(
|
|
1002
|
+
TEST_CLIENT, name="test_initialization_error", sql=sql
|
|
1003
|
+
).create_or_replace()
|
|
1004
|
+
with self.assertRaises(RuntimeError) as err:
|
|
1005
|
+
pipeline.start()
|
|
1006
|
+
|
|
1007
|
+
pipeline.shutdown()
|
|
1008
|
+
pipeline.delete()
|
|
1009
|
+
|
|
1010
|
+
got_err: str = err.exception.args[0].strip()
|
|
1011
|
+
assert "error: cannot START failed pipeline" in got_err
|
|
1012
|
+
|
|
954
1013
|
|
|
955
1014
|
if __name__ == "__main__":
|
|
956
1015
|
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|