Skip to content

[feldera client] Move async lifecycle wait logic from integration tests into the Feldera Python client #5597

@igorscs

Description

@igorscs

In our Python integration tests, we currently use helper polling loops (waiting for resources/lifecycle transitions) to avoid races caused by asynchronous start/stop behavior.
I think this race handling should live in the Feldera Python client, and tests should rely on the client API rather than custom per-test wait loops.

Why:

  1. If we only solve these races in tests, client users can still hit the same races in real usage. We should move this logic into the client so users get safer deterministic behavior by default.
  2. A deterministic Python client API makes Feldera easier to use and understand, including for users who map client behavior to raw REST API behavior.

Examples of test-side wait helpers that should be moved into the client:

  • wait_for_start_observed_and_error_cleared() in python/tests/platform/test_bootstrapping.py
  • wait_for_deployment_status() in python/tests/platform/test_pipeline_lifecycle.py

Also, we should document lifecycle wait patterns in docs, similar to how we documented pipeline.wait_for_completion() in:

  • python/docs/examples.rst
  • python/tests/README.md

Metadata

Metadata

Assignees

Labels

QATesting and quality assuranceRFCRequest for CommentsdocumentationImprovements or additions to documentationpython-sdkIssues related to the feldera python sdk

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions