feldera 0.160.0__tar.gz → 0.162.0__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.

Files changed (31) hide show
  1. {feldera-0.160.0 → feldera-0.162.0}/PKG-INFO +1 -1
  2. {feldera-0.160.0 → feldera-0.162.0}/feldera/pipeline.py +49 -0
  3. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/_httprequests.py +8 -0
  4. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/feldera_client.py +16 -1
  5. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/pipeline.py +1 -0
  6. {feldera-0.160.0 → feldera-0.162.0}/feldera/runtime_config.py +2 -0
  7. {feldera-0.160.0 → feldera-0.162.0}/feldera.egg-info/PKG-INFO +1 -1
  8. {feldera-0.160.0 → feldera-0.162.0}/pyproject.toml +1 -1
  9. {feldera-0.160.0 → feldera-0.162.0}/README.md +0 -0
  10. {feldera-0.160.0 → feldera-0.162.0}/feldera/__init__.py +0 -0
  11. {feldera-0.160.0 → feldera-0.162.0}/feldera/_callback_runner.py +0 -0
  12. {feldera-0.160.0 → feldera-0.162.0}/feldera/_helpers.py +0 -0
  13. {feldera-0.160.0 → feldera-0.162.0}/feldera/enums.py +0 -0
  14. {feldera-0.160.0 → feldera-0.162.0}/feldera/output_handler.py +0 -0
  15. {feldera-0.160.0 → feldera-0.162.0}/feldera/pipeline_builder.py +0 -0
  16. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/__init__.py +0 -0
  17. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/_helpers.py +0 -0
  18. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/config.py +0 -0
  19. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/errors.py +0 -0
  20. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/feldera_config.py +0 -0
  21. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/sql_table.py +0 -0
  22. {feldera-0.160.0 → feldera-0.162.0}/feldera/rest/sql_view.py +0 -0
  23. {feldera-0.160.0 → feldera-0.162.0}/feldera/stats.py +0 -0
  24. {feldera-0.160.0 → feldera-0.162.0}/feldera/tests/test_datafusionize.py +0 -0
  25. {feldera-0.160.0 → feldera-0.162.0}/feldera/testutils.py +0 -0
  26. {feldera-0.160.0 → feldera-0.162.0}/feldera/testutils_oidc.py +0 -0
  27. {feldera-0.160.0 → feldera-0.162.0}/feldera.egg-info/SOURCES.txt +0 -0
  28. {feldera-0.160.0 → feldera-0.162.0}/feldera.egg-info/dependency_links.txt +0 -0
  29. {feldera-0.160.0 → feldera-0.162.0}/feldera.egg-info/requires.txt +0 -0
  30. {feldera-0.160.0 → feldera-0.162.0}/feldera.egg-info/top_level.txt +0 -0
  31. {feldera-0.160.0 → feldera-0.162.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: feldera
3
- Version: 0.160.0
3
+ Version: 0.162.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Feldera Team <dev@feldera.com>
6
6
  License: MIT
@@ -931,6 +931,35 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
931
931
  description=description,
932
932
  )
933
933
 
934
+ def update_runtime(self):
935
+ """
936
+ Recompile a pipeline with the Feldera runtime version included in the
937
+ currently installed Feldera platform.
938
+
939
+ Use this endpoint after upgrading Feldera to rebuild pipelines that were
940
+ compiled with older platform versions. In most cases, recompilation is not
941
+ required—pipelines compiled with older versions will continue to run on the
942
+ upgraded platform.
943
+
944
+ Situations where recompilation may be necessary:
945
+ - To benefit from the latest bug fixes and performance optimizations.
946
+ - When backward-incompatible changes are introduced in Feldera. In this case,
947
+ attempting to start a pipeline compiled with an unsupported version will
948
+ result in an error.
949
+
950
+ If the pipeline is already compiled with the current platform version,
951
+ this operation is a no-op.
952
+
953
+ Note that recompiling the pipeline with a new platform version may change its
954
+ query plan. If the modified pipeline is started from an existing checkpoint,
955
+ it may require bootstrapping parts of its state from scratch. See Feldera
956
+ documentation for details on the bootstrapping process.
957
+
958
+ :raises FelderaAPIError: If the pipeline is not in a STOPPED state.
959
+ """
960
+
961
+ self.client.update_pipeline_runtime(self._inner.name)
962
+
934
963
  def storage_status(self) -> StorageStatus:
935
964
  """
936
965
  Return the storage status of the pipeline.
@@ -951,6 +980,18 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
951
980
  self.refresh(PipelineFieldSelector.STATUS)
952
981
  return ProgramStatus.from_value(self._inner.program_status)
953
982
 
983
+ def testing_force_update_platform_version(self, platform_version: str):
984
+ """
985
+ Used to simulate a pipeline compiled with a different platform version than the one currently in use.
986
+ This is useful for testing platform upgrade behavior without actually upgrading Feldera.
987
+
988
+ This method is only available when Feldera runs with the "testing" unstable feature enabled.
989
+ """
990
+
991
+ self.client.testing_force_update_platform_version(
992
+ name=self._inner.name, platform_version=platform_version
993
+ )
994
+
954
995
  def program_status_since(self) -> datetime:
955
996
  """
956
997
  Return the timestamp when the current program status was set.
@@ -959,6 +1000,14 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
959
1000
  self.refresh(PipelineFieldSelector.STATUS)
960
1001
  return datetime.fromisoformat(self._inner.program_status_since)
961
1002
 
1003
+ def platform_version(self) -> str:
1004
+ """
1005
+ Return the Feldera platform witch which the program was compiled.
1006
+ """
1007
+
1008
+ self.refresh(PipelineFieldSelector.STATUS)
1009
+ return self._inner.platform_version
1010
+
962
1011
  def udf_rust(self) -> str:
963
1012
  """
964
1013
  Return the Rust code for UDFs.
@@ -56,6 +56,8 @@ class HttpRequests:
56
56
  """
57
57
  self.headers["Content-Type"] = content_type
58
58
 
59
+ prev_resp: Optional[requests.Response] = None
60
+
59
61
  try:
60
62
  conn_timeout = self.config.connection_timeout
61
63
  timeout = self.config.timeout
@@ -102,6 +104,8 @@ class HttpRequests:
102
104
  verify=self.requests_verify,
103
105
  )
104
106
 
107
+ prev_resp = request
108
+
105
109
  try:
106
110
  resp = self.__validate(request, stream=stream)
107
111
  logging.debug("got response: %s", str(resp))
@@ -134,6 +138,10 @@ class HttpRequests:
134
138
  except requests.exceptions.ConnectionError as err:
135
139
  raise FelderaCommunicationError(str(err)) from err
136
140
 
141
+ raise FelderaAPIError(
142
+ "Max retries exceeded, couldn't successfully connect to Feldera", prev_resp
143
+ )
144
+
137
145
  def get(
138
146
  self,
139
147
  path: str,
@@ -185,7 +185,7 @@ class FelderaClient:
185
185
  elapsed = time.monotonic() - start_time
186
186
  if elapsed > timeout_s:
187
187
  raise TimeoutError(
188
- f"Timed out waiting for pipeline {pipeline_name} to"
188
+ f"Timed out waiting for pipeline {pipeline_name} to "
189
189
  f"transition to '{state}' state"
190
190
  )
191
191
 
@@ -287,6 +287,21 @@ Reason: The pipeline is in a STOPPED state due to the following error:
287
287
  },
288
288
  )
289
289
 
290
+ def testing_force_update_platform_version(self, name: str, platform_version: str):
291
+ self.http.post(
292
+ path=f"/pipelines/{name}/testing",
293
+ params={"set_platform_version": platform_version},
294
+ )
295
+
296
+ def update_pipeline_runtime(self, name: str):
297
+ """
298
+ Recompile a pipeline with the Feldera runtime version included in the currently installed Feldera platform.
299
+
300
+ :param name: The name of the pipeline
301
+ """
302
+
303
+ self.http.post(path=f"/pipelines/{name}/update_runtime")
304
+
290
305
  def delete_pipeline(self, name: str):
291
306
  """
292
307
  Deletes a pipeline by name
@@ -57,6 +57,7 @@ class Pipeline:
57
57
  )
58
58
  self.program_status: Optional[str] = None
59
59
  self.program_status_since: Optional[str] = None
60
+ self.platform_version: Optional[str] = None
60
61
  self.program_error: Optional[dict] = None
61
62
  self.storage_status: Optional[str] = None
62
63
 
@@ -81,6 +81,7 @@ class RuntimeConfig:
81
81
  fault_tolerance_model: Optional[FaultToleranceModel] = None,
82
82
  checkpoint_interval_secs: Optional[int] = None,
83
83
  dev_tweaks: Optional[dict] = None,
84
+ logging: Optional[str] = None,
84
85
  ):
85
86
  self.workers = workers
86
87
  self.tracing = tracing
@@ -105,6 +106,7 @@ class RuntimeConfig:
105
106
  else:
106
107
  raise ValueError(f"Unknown value '{storage}' for storage")
107
108
  self.dev_tweaks = dev_tweaks
109
+ self.logging = logging
108
110
 
109
111
  @staticmethod
110
112
  def default() -> "RuntimeConfig":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: feldera
3
- Version: 0.160.0
3
+ Version: 0.162.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Feldera Team <dev@feldera.com>
6
6
  License: MIT
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
  name = "feldera"
7
7
  readme = "README.md"
8
8
  description = "The feldera python client"
9
- version = "0.160.0"
9
+ version = "0.162.0"
10
10
  license = { text = "MIT" }
11
11
  requires-python = ">=3.10"
12
12
  authors = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes