Skip to content

[WIP] Extract ads.auth into standalone oracle-ads-auth package #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrDzurb
Copy link
Member

@mrDzurb mrDzurb commented May 5, 2025

Description:

This PR pulls our OCI-authentication logic (ads.auth) out of the main oracle-ads repository and into a brand-new, independently installable PyPI package called oracle-ads-auth. It’s the very first step in a broader effort to refactor the ADS monolith into a family of small, purpose-built components—so that users can choose to install only the pieces they need, reducing footprint and dependency bloat.

For new users:

pip install oracle-ads-auth
pip install oracle-ads

What Changed

  1. New Package:

    • Created oracle-ads-auth with its own pyproject.toml, README, and namespace package setup.
  2. Namespace Packaging:

    • Added pkgutil.extend_path in ads/__init__.py of both repos to share the ads namespace seamlessly.
    • Updated [tool.setuptools.packages.find] in both pyproject.toml files so that import ads.auth works regardless of install order.
  3. Backward Compatibility Shim:

    • Replaced ads/common/auth.py in the main repo with a thin forwarder that re-exports everything from ads.auth (in oracle-ads-auth).
    • Users of the old import paths (from ads.common.auth import default_signer, etc.) continue to work without change.

Migration & Usage

  • For new users:

    pip install oracle-ads-auth
    pip install oracle-ads
  • Existing code using any of these will remain functional:

    from ads.common import auth
    creds = authutil.default_signer()
    
    # or
    import ads.auth
    ads.auth.set_auth(...)
    
    # or
    import ads
    ads.set_auth(...)

Next Steps

  • Add CI jobs to publish and version these sub-packages independently.
  • Plan a deprecation timeline for legacy imports once downstream consumers have migrated.

Reviewer notes:
This change introduces no functional regression and keeps all existing ADS APIs intact. Feedback welcome on the packaging strategy and compatibility shim!

@mrDzurb mrDzurb added the wip Work in progress label May 5, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 5, 2025
Copy link

github-actions bot commented May 5, 2025

⚠️ This PR changed pyproject.toml file. ⚠️

  • PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in pyproject.toml.
  • PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in pyproject.toml.

@mrDzurb mrDzurb changed the title [WIP] Extract ads.auth into standalone oracle-ads-auth package (first step toward modularizing ADS) [WIP] Extract ads.auth into standalone oracle-ads-auth package May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant