发布

  • [OPIK-7269] [SDK] fix: log direct project-scoped URLs on dataset and test suite creation (#7467)

    frostbyte_neo 发布于 2026-07-15 12:45:49 +00:00

    • [OPIK-7269] [SDK] fix: log direct project-scoped dataset URL on creation

    get_or_create_dataset logged a legacy session-redirect URL that resolved
    the dataset under "Default Project" via session context, not the project
    the dataset actually belongs to. Build the direct, project-scoped URL
    (/opik//projects/<project_id>/datasets/<dataset_id>/items)
    instead, matching the pattern used by get_project_url_by_id.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • feat(sdk): log direct project-scoped URL on test suite creation

    create_test_suite / get_or_create_test_suite previously logged no
    navigation URL. Log the direct, project-scoped test-suites URL
    (/opik//projects/<project_id>/test-suites//items),
    mirroring the dataset creation logging.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • refactor(sdk): make created-resource URL logging best-effort and shared

    Address review feedback on the dataset/test-suite URL logging:

    • Consolidate the two per-resource logging methods into one
      _log_created_resource_url helper to avoid drift.
    • Wrap the project-id/workspace resolution in try/except so a lookup
      failure never turns an already-successful create into an error; the
      URL is logged best-effort with a debug log on failure.
    • Rewrite the logging unit tests to assert the actual project-scoped
      URL emitted via LOGGER.info (caplog) instead of patching the private
      helper, per the SDK testing conventions.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • test(integration): temporarily skip Vertex AI tests hitting 429 quota

    Vertex AI integration tests are failing in CI with 429 RESOURCE_EXHAUSTED
    (quota), which is unrelated to code under test. Skip the google_vertexai
    cases across crewai, langchain, metrics_with_llm_judge, and the openai
    agents suite. The adk and genai suites keep their Vertex coverage.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • ci(adk): run legacy ADK matrix on 3.10 and 3.14 only

    The legacy ADK suite makes live Vertex AI calls against the shared
    opik-sdk-tests GCP project; the full 3.10-3.14 matrix multiplied those
    into 429 RESOURCE_EXHAUSTED. Run only the oldest and newest supported
    Python versions, matching the non-legacy ADK workflow.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • style(sdk): apply ruff-format to created-resource URL logging

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

    下载附件