Skip to content

Update API Client#126

Open
etserend wants to merge 5 commits into
mainfrom
chore/splunk-ao-automation/update-api-client-2026-07-23-29968608968
Open

Update API Client#126
etserend wants to merge 5 commits into
mainfrom
chore/splunk-ao-automation/update-api-client-2026-07-23-29968608968

Conversation

@etserend

Copy link
Copy Markdown
Contributor

Fix any breaking changes if this pull request fails to deploy

etserend and others added 5 commits July 21, 2026 10:54
…-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>
@etserend etserend added the dependencies Pull requests that update a dependency file label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant