Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
beb30b4
fix(datasources): bound connector reads and verify real query access
Atom-oh Oct 18, 2026
434f5f6
fix(datasources): share one request deadline and disclose limit satur…
Atom-oh Oct 18, 2026
06759fd
test(web): expect the stamped instance id on default re-mirrors
Atom-oh Oct 18, 2026
55b8c7d
fix: bind datasource credentials to their registered identity
Atom-oh Oct 18, 2026
4f061be
fix: address review feedback (iteration 2/5)
Atom-oh Oct 18, 2026
1cb5d40
Merge branch 'dev' into fix/datasource-connector-bounds
Atom-oh Oct 19, 2026
1e6e3a8
fix(agent): pin custom MCP connections to the validated address (#184)
Atom-oh Oct 19, 2026
22a8b81
Merge remote-tracking branch 'samples/dev' into fix/datasource-connec…
Atom-oh Oct 19, 2026
b5bfb94
fix(web): show datasource completeness, limits and shared scope (#185)
Atom-oh Oct 19, 2026
34b7d61
revert: move the web/datasource contract change out of this PR
Atom-oh Oct 19, 2026
52e472d
chore: move the web credential-contract changes to the web PR
Atom-oh Oct 19, 2026
ba0c319
fix: address review feedback (iteration 2/5)
Atom-oh Oct 19, 2026
c6b69d7
fix: address review feedback (iteration 3/5)
Atom-oh Oct 19, 2026
3270101
fix: address review feedback (iteration 4/5)
Atom-oh Oct 19, 2026
656a945
chore: keep this PR within the review input limit
Atom-oh Oct 19, 2026
3fb4254
chore: carry the connector CHANGELOG entry in the web contract PR
Atom-oh Oct 19, 2026
bca712b
fix: address review feedback (iteration 5/5)
Atom-oh Oct 19, 2026
bc30d23
chore: move connector regression tests to a stacked follow-up PR
Atom-oh Oct 20, 2026
f4c05e5
test(datasources): add connection identity and bounded I/O regressions
Atom-oh Oct 20, 2026
26d2404
fix: address review feedback (iteration 6/10)
Atom-oh Oct 20, 2026
13b500a
Merge remote-tracking branch 'samples/fix/datasource-connector-bounds…
Atom-oh Oct 20, 2026
b91c4a3
test(datasources): count only emitted Jaeger traces in returnedCount
Atom-oh Oct 20, 2026
a1c086b
fix: address review feedback (iteration 7/10)
Atom-oh Oct 20, 2026
9f85e0e
Merge remote-tracking branch 'samples/fix/datasource-connector-bounds…
Atom-oh Oct 20, 2026
ef9ab0a
fix: address review feedback (iteration 8/10)
Atom-oh Oct 20, 2026
88672db
Merge remote-tracking branch 'samples/fix/datasource-connector-bounds…
Atom-oh Oct 20, 2026
4b40254
fix: address review feedback (iteration 9/10)
Atom-oh Oct 20, 2026
1cde6a9
Merge remote-tracking branch 'samples/fix/datasource-connector-bounds…
Atom-oh Oct 20, 2026
7f5e446
Merge remote-tracking branch 'samples/dev' into fix/datasource-connec…
Atom-oh Oct 24, 2026
227d6f5
fix: address review feedback (iteration 10/10)
Atom-oh Oct 24, 2026
a2b2e21
chore: keep this PR within the review input limit
Atom-oh Oct 24, 2026
6082148
fix: address review feedback (iteration 11/12)
Atom-oh Oct 24, 2026
5561741
chore: move the Dynatrace connector regressions to the stacked test PR
Atom-oh Oct 24, 2026
b88e419
Merge remote-tracking branch 'samples/fix/datasource-connector-bounds…
Atom-oh Oct 24, 2026
66441d6
test(datasources): carry the Dynatrace connector regressions
Atom-oh Oct 24, 2026
50ffa25
Merge remote-tracking branch 'samples/dev' into test/datasource-conne…
Atom-oh Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions agent/lambda/test_dynatrace_mcp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""Dynatrace nested caps and advertised page-loss regressions; no live provider."""
import json
import sys
from pathlib import Path
from unittest.mock import patch

import pytest

sys.path.insert(0, str(Path(__file__).parent))
import dynatrace_mcp as dt


def query(response):
with patch.object(dt, "_ds", return_value={"endpoint": "https://provider.example.test"}), \
patch.object(dt, "_get", return_value=response) as request:
result = json.loads(dt.dynatrace_query({"query": "fixture.metric"})["body"])
request.assert_called_once()
return result


def series(count):
return [{"dimensions": [str(i)], "timestamps": [1000], "values": [i]} for i in range(count)]


def test_nested_dimension_loss_is_partial_even_for_one_metric():
response = {"result": [{"metricId": "fixture.metric", "data": series(dt.MAX_SERIES + 1)}]}
result = query(response)
assert len(result["result"][0]["data"]) == dt.MAX_SERIES
assert result["truncated"] is True and result["collectionStatus"] == "partial"
assert len(response["result"][0]["data"]) == dt.MAX_SERIES + 1


def test_outer_metric_cap_is_disclosed():
result = query({"result": [{"metricId": str(i), "data": series(1)} for i in range(dt.MAX_SERIES + 1)]})
assert len(result["result"]) == dt.MAX_SERIES and result["truncated"] is True


def test_unconsumed_compatibility_page_is_partial_and_is_not_automatically_fetched():
result = query({"result": [{"metricId": "fixture.metric", "data": series(1)}], "nextPageKey": "next-fixture"})
assert result["truncated"] is True and result["collectionStatus"] == "partial"


@pytest.mark.parametrize("page", [None, ""])
def test_exact_dimension_cap_and_no_next_page_are_not_loss(page):
result = query({"result": [{"metricId": "fixture.metric", "data": series(dt.MAX_SERIES)}], "nextPageKey": page})
assert result["truncated"] is False


def test_provider_warnings_demote_a_complete_looking_result_to_partial():
result = query({"result": [{"metricId": "fixture.metric", "data": series(1)}], "warnings": ["The result was limited."]})
assert result["truncated"] is False and result["collectionStatus"] == "partial"
Loading
Loading