Skip to content

fix: change system type label - #375

Merged
NicoleMGomes merged 3 commits into
SAP:mainfrom
lentzvitoria:main
Oct 6, 2026
Merged

NicoleMGomes merged 3 commits into
SAP:mainfrom
lentzvitoria:main

Conversation

@lentzvitoria

Copy link
Copy Markdown
Contributor

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

Fix label key mismatch in list_active_integrations: the read side was looking up sap-managed-runtime-system-type, but the write side (SPII system handler) stamps fragments with sap-managed-runtime-assigned-application-namespace. As a result, ConnectedSystem.system_type always returned None for every connected system.

The fix aligns _LABEL_SYSTEM_TYPE in _fragments.py with the key actually written to the Destination Service fragment, and updates the corresponding unit test mock to use the correct key.

Related Issue

Closes #<issue_number>

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

  1. Call agw_client.list_active_integrations() on a tenant with at least one connected backend system.
  2. Verify that the returned ConnectedSystem entries have a non-None system_type field (e.g. "sap.pce").
  3. Run the unit tests: uv run pytest tests/agentgateway/ -q — all 273 tests should pass.

Checklist

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

None. The system_type field was always None before this fix, so populating it correctly is purely additive.

Additional Notes

The label key sap-managed-runtime-assigned-application-namespace is defined as FragmentLabelKey.ASSIGNED_APPLICATION_NAMESPACE in the internal SPII SDK and must stay in sync with _LABEL_SYSTEM_TYPE in this repo. There is no shared contract between the two — if the key is ever renamed on the write side, the read side will silently regress to returning None again.

@lentzvitoria
lentzvitoria requested a review from a team as a code owner October 6, 2026 16:46
NicoleMGomes
NicoleMGomes previously approved these changes Oct 6, 2026
Comment thread pyproject.toml Outdated
@NicoleMGomes
NicoleMGomes merged commit 8ef34e0 into SAP:main Oct 6, 2026
11 checks passed
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