feat(adms): add SAP ADMS module with sync/async clients and BDD tests#138
Open
adwitiyasushant wants to merge 5 commits into
Open
feat(adms): add SAP ADMS module with sync/async clients and BDD tests#138adwitiyasushant wants to merge 5 commits into
adwitiyasushant wants to merge 5 commits into
Conversation
Adds a full-featured ADMS (Attachment Document Management Service) module to the SDK with sync and async clients, IAS X.509 token authentication, OData V4 service support (DocumentService, ConfigurationService, AdminService), and pytest-bdd integration tests with Gherkin scenarios. Also adds shared SDK building blocks consumed by ADMS: IAS token fetcher, mTLS support, async HTTP client, and the ADMS telemetry module entry.
Required by upstream's "Enforce version bump when src/ is modified" CI check.
- Revert global [tool.pytest.ini_options] integration marker description and remove asyncio_mode=auto so the change does not leak into other modules' test runs. - Extract /etc/secrets/appfnd and CLOUD_SDK_CFG as module-level constants in adms/config.py for consistency with the existing _SERVICE_PATH / _ADMIN_SERVICE_PATH constants.
Upstream's data-anonymization PR (SAP#93) also bumped to 0.20.0 — bumping to 0.20.1 to satisfy the version-bump CI check on the rebased branch.
2a3f60e to
74a9909
Compare
Required for pytest-asyncio strict mode (the project default after asyncio_mode auto was scoped out). Matches the convention already in use in tests/agentgateway/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
sap_cloud_sdk.admsmodule providing a Python client for SAP'sAttachment Document Management Service (ADMS), along with the shared SDK
building blocks it depends on (IAS X.509 token fetcher, mTLS support, async
HTTP client, telemetry entry).
ADMS is the BTP service that lets agentic and business applications attach
documents to business object nodes (purchase orders, sales orders, etc.) with
virus scanning, scoped downloads, and audit metadata. This module is the
prerequisite for higher-level agent workflows that read/write documents on
behalf of users.
What's included
Public API (
sap_cloud_sdk.adms)AdmsClient(sync) andAsyncAdmsClientwith sub-namespaces:client.documents.*— document CRUD, content download URLs, scan-stategating
client.relations.*—DocumentRelationlifecycle (create / get / list /update / delete) plus draft create-validate-activate-discard flow
client.config.*—ConfigurationServicereads (allowed domains,document types, BO node types, type→BO mappings)
create_client()/create_async_client()factories that load the IASbinding from a mounted secret volume with env-var fallback.
Auth / HTTP
IasTokenFetcher(core.auth) — IASclient_credentialsflow with theresourceparameter that scopes the JWT'saudclaim to the ADMapplication.
AdmsHttp/ async variant — typedget/get_list/post/patch/deletehelpers with OData error → typed exception mapping(
DocumentNotFoundError,ScanNotCleanError,ConfigError, etc.).mTLShelpers incore.auth._mtls.Tests
mapping, and config resolution.
(
tests/adms/integration/document_flow.feature,async_flow.feature) — skipped when the service URL isn't configured.Module.ADMSto the telemetry enum.Why one squashed commit
This branch was rebased onto
mainand squashed before opening the PR toremove unrelated UCL prototype commits and version drift. Full review-by-review
history is preserved on my fork at
backup/contrib-adms-pre-rebase.Verification