Skip to content

Make registry-backed batch endpoint notebook self-bootstrap its pipeline component in CI - #4079

Draft
lavakumarrepala with Copilot wants to merge 9 commits into
mainfrom
copilot/fix-registry-component-lookup
Draft

Make registry-backed batch endpoint notebook self-bootstrap its pipeline component in CI#4079
lavakumarrepala with Copilot wants to merge 9 commits into
mainfrom
copilot/fix-registry-component-lookup

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The from-registry batch endpoint notebook was executing in GitHub Actions but failing when it tried to resolve a registry component using unresolved placeholder values for component_name and component_version. This change makes the sample self-sufficient in CI by ensuring a real pipeline component exists in the target registry before the notebook fetches it.

  • Problem

    • CI templated registry_name, but left:
      • <PIPELINE_COMPONENT_NAME>
      • <PIPELINE_COMPONENT_VERSION>
    • The notebook then called registry_ml_client.components.get(...) against a non-existent registry asset and failed at runtime.
  • Change

    • Added a conditional bootstrap path in sdk/python/endpoints/batch/deploy-pipelines/from-registry/sdk-deploy-and-test.ipynb.
    • When the notebook still sees placeholder component values, it now:
      • loads the existing reusable pipeline component from the sibling hello-batch sample
      • registers that component into the target registry
      • captures the real returned component name/version
      • retrieves the component from the registry and continues with deployment
  • Repo consistency

    • Reuses an existing repo-owned sample component instead of introducing a one-off asset or relying on manual preregistration.
    • Preserves the existing sample flow for real user-provided component coordinates; the bootstrap path only activates for placeholder-based execution such as CI.
  • Effect

    • The notebook can now run end-to-end in CI without depending on a pre-seeded registry component.
if component_name.startswith("<") or component_version.startswith("<"):
    pipeline_component = load_component(
        source=Path("../hello-batch/hello-component/hello.yml")
    )
    pipeline_component = registry_ml_client.components.create_or_update(
        pipeline_component
    )
    component_name = pipeline_component.name
    component_version = pipeline_component.version

pipeline_component = registry_ml_client.components.get(
    name=component_name, version=component_version
)

Copilot AI requested a review from lavakumarrepala July 22, 2026 02:19
Base automatically changed from copilot/fix-batch-registry-pipeline-sample to main July 28, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants