Skip to content

sync_schemas.py: support ADCP_BASE_URL env override for parity with JS SDK #284

@bokelley

Description

@bokelley

Context

DX-expert pre-merge review of #275 flagged a parity gap with the JS SDK:

  • @adcp/client/scripts/sync-schemas.ts reads ADCP_BASE_URL from env (defaults to https://adcontextprotocol.org), so CI / local dev can point sync at a fake CDN serving a fixture tarball.
  • adcp-client-python/scripts/sync_schemas.py hardcodes BUNDLE_BASE_URL = "https://adcontextprotocol.org/protocol" as a module constant. No way to redirect without editing source.

This bites whenever someone wants to:

  • Run cross-SDK CI against a fixture server (e.g. validate that JS + Python sync produce equivalent local trees from the same tarball).
  • Test sync_schemas.py locally against a release tarball that hasn't deployed to production yet.
  • Stand up an integration test that exercises the full sync pipeline without depending on the live CDN.

Proposal

Match the JS pattern: BUNDLE_BASE_URL = os.environ.get("ADCP_BASE_URL", "https://adcontextprotocol.org") + "/protocol".

Same env var name (ADCP_BASE_URL) so cross-SDK CI scripts can set it once.

Out of scope

  • Other configuration drift between the two SDKs (separate triage)
  • Adding integration tests that exercise the env override (would be nice, not required)

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions