Update API Client#118
Open
etserend wants to merge 10 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>
* fix(HYBIM-853): update patch script and regenerate client with openapi-python-client 0.29.0 - Rewrite _LOOP_RE in patch_http_validation_error.py to match 0.29.0 from_dict shape (_detail pop before type annotation, if _detail is not UNSET wrapper, loop without or []) - Update _loop_replacement to emit list[...] | Unset style (no Union) - Regenerate all 1136 files under src/splunk_ao/resources/ with 0.29.0 (Google-style docstrings, from __future__ import annotations, response variable naming, union reordering) - Confirmed patch re-applied: isinstance(_detail, list) guard present in http_validation_error.py - Confirmed generator warnings unchanged vs 0.26.x baseline (spec-level issues only, out of scope) Co-Authored-By: Claude <noreply@anthropic.com> * Fixing version conflicts brought by openapi version update * Updating openapi.yml from main and regen resources --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat(logger): add OTel context lifecycle for DTB * review comments * chore(deps): restore OpenTelemetry 1.38 baseline * fix(logger): scope OTel cleanup to flushing request
* feat(export): add deployment-aware OTLP export and DTB batching * fix(export): require ingest token for O11y OTLP export * use correct api url prefix * update standalone otlp endpoint otel/traces -> otel/v1/traces * addressed review comments for resources
…#103) * feat(annotation-queues): add annotation queue SDK support (HYBIM-882) Port upstream commit e34a5b19 from rungalileo/galileo-python. - Add src/splunk_ao/annotation_queues.py — full AnnotationQueues SDK class with create/get/list/update/delete/share/query operations, AnnotationField management, and record add/remove/search support - Export all AnnotationQueue* symbols from splunk_ao/__init__.py - integration.py: switch from IntegrationName → IntegrationProvider, use provider_name from integration_db.provider field - project.py: remove stale created_by docstring references (server-managed) - provider.py: rename _get_integration_name → _get_integration_provider, add LLMIntegration import for models endpoint Note: query_annotation_queues_annotation_queues_query_post generated module is missing from resources/ — needs regen workflow run to produce it from the existing openapi.yaml definition. Upstream: rungalileo/galileo-python@e34a5b1 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(annotation-queues): add missing generated files and fix integration test mock Hand-place generated API/model files that the regen workflow cannot produce because the live backend OpenAPI spec no longer exposes /annotation_queues/query: - resources/api/annotation_queue/query_annotation_queues_annotation_queues_query_post.py - resources/models/list_annotation_queue_params.py (+ register in models/__init__.py) Fix test_integration.py mock: set mock.provider alongside mock.name so _to_provider() can dispatch to the correct Provider subclass (introduced when porting e34a5b19 which switched dispatch to integration_db.provider). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(port): align with upstream e34a5b19 — param renames, type_ sync, rebrand docstring - integration.py: rename _get_integration_by_name param integration_name → integration_provider - provider.py: rename UnconfiguredProvider.__init__ param integration_name → integration_provider - project.py: restore missing type_ field sync in save() - annotation_queues.py: replace Galileo platform reference in AnnotationQueue docstring * fix(review): address reviewer feedback on PR #103 (HYBIM-882) - project.py: remove response.type_ sync block that was accidentally added to this port; it belongs to an earlier upstream commit (5d473ed) and was not part of e34a5b1's delta. - tests/test_annotation_queues.py: port 1053-line test file from upstream e34a5b1; covers all 16 annotation queue SDK functions and the AnnotationQueues class. - tests/test_integration.py: add missing test_property_matches_provider_when_display_name_differs regression test; fix create_mock_integration() signature to accept separate provider/name params so provider slug and display name can differ in tests (matches upstream). - tests/test_project.py: add update_body assertions verifying ProjectUpdate serializes to {name: ...} only (no type_ field). 1722 passed (60 new tests). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
…HYBIM-882) (#104) * fix(resources): preserve multipart file uploads in generated client (02ce8bb) Port of rungalileo/galileo-python@02ce8bb2 — fix: Preserve multipart file uploads in generated client (#624). - openapi.yaml: replace contentMediaType: application/octet-stream with format: binary for 7 Body_* multipart file fields so openapi-python-client generates File-typed attributes instead of plain str - scripts/import-openapi-yaml.sh: add yq patches for the 7 binary fields so the fix survives future openapi.yaml regenerations; tighten error handling - 6 generated Body_* models: update file fields from str → File, add BytesIO import, add File/FileTypes imports, call .to_tuple() in to_dict/to_multipart, construct File(payload=BytesIO(...)) in from_dict - tests/test_datasets.py: add two tests verifying File payloads round-trip through to_multipart() correctly * fix(scripts): add missing ListAnnotationQueueParams patch and verification block Two gaps vs upstream 02ce8bb: - ListAnnotationQueueParams.properties.sort.default patch was missing (added in e34a5b1 / PR#103 but not carried forward to this branch) - Post-patch verification block (yq -e with 14 assertions) was absent - Error message corrected: "Failed to fetch..." -> "Failed to patch..." * fix(tests): relax duration assertion to allow 0ns on low-resolution clocks On Windows, time.time_ns() resolution can be coarser than the execution time of a trivial function, so duration_ns can legitimately be 0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(review): correct docstring and add list-of-files multipart test - Fix docstring: file (str) -> file (File) in BodyCreateCodeScorerVersion - Add test_manual_llm_validate_multipart_body_serializes_list_of_files covering the loop-based query_files/response_files list handling in BodyManualLlmValidateMultipartScorersLlmValidateMultipartPost Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * revert(review): remove out-of-scope test per reviewer feedback Reviewer clarified that adding new tests is out of scope for this PR — it is a mechanical lift of the upstream commit only. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
etserend
force-pushed
the
chore/splunk-ao-automation/update-api-client-2026-07-22-29959156505
branch
from
July 22, 2026 21:35
6401d12 to
7e1ea8b
Compare
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