feldera 0.105.0__tar.gz → 0.107.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 (32) hide show
  1. {feldera-0.105.0 → feldera-0.107.0}/PKG-INFO +1 -1
  2. {feldera-0.105.0 → feldera-0.107.0}/feldera/pipeline.py +7 -1
  3. {feldera-0.105.0 → feldera-0.107.0}/feldera.egg-info/PKG-INFO +1 -1
  4. {feldera-0.105.0 → feldera-0.107.0}/pyproject.toml +1 -1
  5. {feldera-0.105.0 → feldera-0.107.0}/tests/test_shared_pipeline1.py +14 -5
  6. {feldera-0.105.0 → feldera-0.107.0}/README.md +0 -0
  7. {feldera-0.105.0 → feldera-0.107.0}/feldera/__init__.py +0 -0
  8. {feldera-0.105.0 → feldera-0.107.0}/feldera/_callback_runner.py +0 -0
  9. {feldera-0.105.0 → feldera-0.107.0}/feldera/_helpers.py +0 -0
  10. {feldera-0.105.0 → feldera-0.107.0}/feldera/enums.py +0 -0
  11. {feldera-0.105.0 → feldera-0.107.0}/feldera/output_handler.py +0 -0
  12. {feldera-0.105.0 → feldera-0.107.0}/feldera/pipeline_builder.py +0 -0
  13. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/__init__.py +0 -0
  14. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/_helpers.py +0 -0
  15. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/_httprequests.py +0 -0
  16. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/config.py +0 -0
  17. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/errors.py +0 -0
  18. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/feldera_client.py +0 -0
  19. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/feldera_config.py +0 -0
  20. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/pipeline.py +0 -0
  21. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/sql_table.py +0 -0
  22. {feldera-0.105.0 → feldera-0.107.0}/feldera/rest/sql_view.py +0 -0
  23. {feldera-0.105.0 → feldera-0.107.0}/feldera/runtime_config.py +0 -0
  24. {feldera-0.105.0 → feldera-0.107.0}/feldera/stats.py +0 -0
  25. {feldera-0.105.0 → feldera-0.107.0}/feldera.egg-info/SOURCES.txt +0 -0
  26. {feldera-0.105.0 → feldera-0.107.0}/feldera.egg-info/dependency_links.txt +0 -0
  27. {feldera-0.105.0 → feldera-0.107.0}/feldera.egg-info/requires.txt +0 -0
  28. {feldera-0.105.0 → feldera-0.107.0}/feldera.egg-info/top_level.txt +0 -0
  29. {feldera-0.105.0 → feldera-0.107.0}/setup.cfg +0 -0
  30. {feldera-0.105.0 → feldera-0.107.0}/tests/test_pipeline_builder.py +0 -0
  31. {feldera-0.105.0 → feldera-0.107.0}/tests/test_shared_pipeline0.py +0 -0
  32. {feldera-0.105.0 → feldera-0.107.0}/tests/test_udf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: feldera
3
- Version: 0.105.0
3
+ Version: 0.107.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Feldera Team <dev@feldera.com>
6
6
  License: MIT
@@ -3,6 +3,7 @@ import time
3
3
  from datetime import datetime
4
4
 
5
5
  import pandas
6
+ from uuid import UUID
6
7
 
7
8
  from typing import List, Dict, Callable, Optional, Generator, Mapping, Any
8
9
  from collections import deque
@@ -620,7 +621,7 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
620
621
  time.sleep(0.1)
621
622
  continue
622
623
 
623
- return status
624
+ break
624
625
 
625
626
  return uuid
626
627
 
@@ -636,6 +637,8 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
636
637
  resp = self.client.sync_checkpoint_status(self.name)
637
638
  success = resp.get("success")
638
639
 
640
+ fail = resp.get("failure") or {}
641
+
639
642
  if uuid == success:
640
643
  return CheckpointStatus.Success
641
644
 
@@ -645,6 +648,9 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
645
648
  failure.error = fail.get("error", "")
646
649
  return failure
647
650
 
651
+ if (success is None) or UUID(uuid) > UUID(success):
652
+ return CheckpointStatus.InProgress
653
+
648
654
  return CheckpointStatus.Unknown
649
655
 
650
656
  def query(self, query: str) -> Generator[Mapping[str, Any], None, None]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: feldera
3
- Version: 0.105.0
3
+ Version: 0.107.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.105.0"
9
+ version = "0.107.0"
10
10
  license = { text = "MIT" }
11
11
  requires-python = ">=3.10"
12
12
  authors = [
@@ -1,3 +1,5 @@
1
+ import random
2
+ import time
1
3
  from typing import Optional
2
4
  from feldera.runtime_config import RuntimeConfig, Storage
3
5
  from tests import enterprise_only
@@ -12,7 +14,7 @@ SECRET_KEY = "miniopasswd"
12
14
 
13
15
  def storage_cfg(
14
16
  endpoint: Optional[str] = None,
15
- start_from_checkpoint: bool = False,
17
+ start_from_checkpoint: Optional[str] = None,
16
18
  auth_err: bool = False,
17
19
  ) -> dict:
18
20
  return {
@@ -34,7 +36,7 @@ def storage_cfg(
34
36
 
35
37
  class TestCheckpointSync(SharedTestPipeline):
36
38
  @enterprise_only
37
- def test_checkpoint_sync(self, auth_err: bool = False):
39
+ def test_checkpoint_sync(self, from_uuid: bool = False, auth_err: bool = False):
38
40
  """
39
41
  CREATE TABLE t0 (c0 INT, c1 VARCHAR);
40
42
  CREATE MATERIALIZED VIEW v0 AS SELECT c0 FROM t0;
@@ -44,19 +46,22 @@ class TestCheckpointSync(SharedTestPipeline):
44
46
  self.set_runtime_config(RuntimeConfig(storage=Storage(config=storage_config)))
45
47
  self.pipeline.start()
46
48
 
47
- data = [{"c0": i, "c1": str(i)} for i in range(1, 4)]
49
+ random.seed(time.time())
50
+ data = [{"c0": i, "c1": str(i)} for i in range(1, random.randint(10, 20))]
48
51
  self.pipeline.input_json("t0", data)
49
52
  self.pipeline.execute("INSERT INTO t0 VALUES (4, 'exists')")
50
53
  got_before = list(self.pipeline.query("SELECT * FROM v0"))
51
54
 
52
55
  self.pipeline.checkpoint(wait=True)
53
- self.pipeline.sync_checkpoint(wait=True)
56
+ uuid = self.pipeline.sync_checkpoint(wait=True)
54
57
 
55
58
  self.pipeline.stop(force=True)
56
59
  self.pipeline.clear_storage()
57
60
 
58
61
  # Restart pipeline from checkpoint
59
- storage_config = storage_cfg(start_from_checkpoint=True, auth_err=auth_err)
62
+ storage_config = storage_cfg(
63
+ start_from_checkpoint=uuid if from_uuid else "latest", auth_err=auth_err
64
+ )
60
65
  self.set_runtime_config(RuntimeConfig(storage=Storage(config=storage_config)))
61
66
  self.pipeline.start()
62
67
  got_after = list(self.pipeline.query("SELECT * FROM v0"))
@@ -66,6 +71,10 @@ class TestCheckpointSync(SharedTestPipeline):
66
71
  self.pipeline.stop(force=True)
67
72
  self.pipeline.clear_storage()
68
73
 
74
+ @enterprise_only
75
+ def test_checkpoint_sync_from_uuid(self):
76
+ self.test_checkpoint_sync(from_uuid=True)
77
+
69
78
  @enterprise_only
70
79
  def test_checkpoint_sync_err(self):
71
80
  with self.assertRaisesRegex(RuntimeError, "SignatureDoesNotMatch"):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes