Update API Client#126
Open
etserend wants to merge 5 commits into
Open
Conversation
…-882)
Port of upstream rungalileo/galileo-python commit d0dd159.
- Delete src/splunk_ao/job_progress.py and src/splunk_ao/jobs.py; both
relied on GET /jobs/{job_id} and GET /projects/{id}/runs/{id}/jobs
endpoints that the backend removed from the OpenAPI spec.
- Rewrite Experiment.monitor_progress() to poll experiment status
directly via get_status() + tqdm, removing the dependency on the
jobs table. The old job_id parameter is preserved as a deprecated
keyword-only argument that emits DeprecationWarning so callers
aren't broken silently.
- Delete tests/test_job_progress.py and tests/test_jobs.py.
- Add tests/test_experiment_progress.py with 6 tests for the new
polling-based monitor_progress() implementation.
- Remove Jobs.create patches from tests/test_experiments.py.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ard to monitor_progress - Add timeout_seconds param (default 1h) so the polling loop exits with TimeoutError if the experiment never completes - Check status.is_failed each iteration and raise RuntimeError immediately instead of polling forever on a failed experiment - Detect a string passed positionally as poll_interval_seconds (legacy callers that used the old job_id positional param) and emit a DeprecationWarning instead of letting it fail later with TypeError - Add tests for all three new paths Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…n _make_status type(status).is_failed = property(...) mutated the ExperimentStatusInfo class itself, causing all subsequent instances in the same test session to return is_failed=True — breaking test_raises_timeout_error_when_deadline_exceeded. Switch _make_status to return a plain MagicMock with explicit attribute values so tests are fully isolated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mypy correctly rejects isinstance(poll_interval_seconds, str) when the parameter is typed as float — the check is statically unreachable. Drop the runtime guard and document the hard break in the docstring instead, as the reviewer suggested. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix any breaking changes if this pull request fails to deploy