发布

  • [OPIK-4659] [INFRA] Skip frontend build in SDK E2E CI workflows (#5456)

    frostbyte_neo 发布于 2026-03-02 11:26:28 +00:00

    • [OPIK-4659] [INFRA] Skip frontend build in SDK E2E CI workflows
    • Switch sdk-e2e-library-tests.yaml, sdk-e2e-tests.yaml, and
      typescript_sdk_e2e_tests.yml from ./opik.sh --build (full stack)
      to ./opik.sh --backend [--guardrails] --build, skipping the
      frontend container (node install, vite build, nginx image)
    • Add each workflow file to its own path trigger so CI runs when
      the workflow itself is modified in a PR
    • Add explicit permissions block to sdk-e2e-tests.yaml (contents:
      read, checks: write, pull-requests: write) required by the
      publish-unit-test-result-action step

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Revision 2: Use OPIK_URL_OVERRIDE to route health check in backend-only mode

    check_backend.sh now uses OPIK_URL_OVERRIDE as the base URL (falling back
    to http://localhost:5173/api when unset), so the health check and SDK tests
    both use the same URL without requiring separate BACKEND/PORT_MAPPING vars.

    Workflows set OPIK_URL_OVERRIDE: http://localhost:8080 and pass --port-mapping
    to opik.sh so the backend port is exposed. The lib integration action's
    hardcoded export is removed since it now inherits from the workflow env.

    • Revision 3: Route guardrails via direct port instead of nginx

    Add OPIK_GUARDRAILS_URL_OVERRIDE SDK config to bypass nginx-routed
    guardrails path when running with direct backend port mapping. Expose
    guardrails container port in docker-compose.override.yaml and set the
    override in sdk-e2e-tests workflow.

    • Revision 4: Skip python-backend in SDK E2E workflows

    Add SKIP_PYTHON_BACKEND env var support to opik.sh and opik.ps1.
    When set, builds only the Java backend service and starts without
    python-backend (--scale python-backend=0), avoiding both the build
    and the pull. Set in all 3 SDK E2E CI workflows.

    • Revision 5: Fix SKIP_PYTHON_BACKEND container health checks

    Filter python-backend-1 from the containers array in both
    check_containers_status and start_missing_containers so the
    health check loop doesn't fail on the intentionally absent container.

    • Revision 6: Use single up --build --scale to skip python-backend

    Replace separate build+up with a single docker compose up --build
    --scale python-backend=0, which in Compose v2 skips the build for
    services scaled to 0. Also set PYTHON_BACKEND_PULL_POLICY=never to
    prevent any pull attempt.

    • Revision 7: Build only Java backend when SKIP_PYTHON_BACKEND=true

    docker compose up --build --scale python-backend=0 still triggers
    the python-backend Dockerfile in some docker compose versions.

    Separate build from start: explicitly build only the backend service,
    then start without --build to ensure python-backend is never built.

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Revision 8: Use PYTHON_BACKEND_PROFILE env var to truly skip python-backend

    When SKIP_PYTHON_BACKEND=true, set PYTHON_BACKEND_PROFILE=python-backend-disabled
    before any docker compose call. docker-compose.yaml uses this via
    profiles: [${PYTHON_BACKEND_PROFILE:-backend}, opik, ...]
    so python-backend is no longer in the backend profile scope — docker
    compose never builds, pulls, or starts it.

    Default behaviour (PYTHON_BACKEND_PROFILE unset) resolves to 'backend',
    keeping full backward compatibility.

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Revert SKIP_PYTHON_BACKEND optimization

    30s saving not worth the complexity. python-backend builds in CI
    alongside the Java backend without significant impact on total runtime.

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Revision 9: Remove leftover empty lines from SKIP_PYTHON_BACKEND revert

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • Revision 10: Revert opik.sh / opik.ps1 empty-line cleanup — out of scope

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com


    Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com

    下载附件