Skip to content

Fix samples

f296e39
Select commit
Loading
Failed to load commit list.
Closed

[azure-ai-projects] Emit SDK from TypeSpec (models, routines, optimization) #47004

Fix samples
f296e39
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - pullrequest failed May 19, 2026 in 28m 49s

Build #20260519.111 had test failures

Details

Tests

  • Failed: 612 (4.14%)
  • Passed: 12,150 (82.12%)
  • Other: 2,034 (13.75%)
  • Total: 14,796

Annotations

Check failure on line 108 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L108

1ES PT Non-Blocking Error: Please complete the PR: https://github.com/Azure/azure-sdk-for-python/pull/46993

Check failure on line 92 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L92

1ES PT Internal Error: An exception of type InternalErrorException occurred in run_sdl_scan_optimization.py. Arguments: (FileNotFoundError(2, 'No such file or directory'),)

Check failure on line 79133 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L79133

PowerShell exited with code '1'.

Check failure on line 289 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L289

The process '/mnt/vss/_work/1/s/venv/bin/python' failed with exit code 1

Check failure on line 1 in test_workflow_agent_creation_with_tracing_content_recording_enabled

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_workflow_agent_creation_with_tracing_content_recording_enabled

azure.core.exceptions.ResourceNotFoundError: Playback failure -- for help resolving, see https://aka.ms/azsdk/python/test-proxy/troubleshoot. Error details:
Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
Header differences:
    <Foundry-Features> values differ, request <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview>, record <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview>
Body differences:
Remaining Entries:
0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1

Content: {"Message":"Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\nHeader differences:\n    \u003CFoundry-Features\u003E values differ, request \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview\u003E, record \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview\u003E\nBody differences:\nRemaining Entries:\n0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\n1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1\n","Status":"NotFound"}
Raw output
args = (<test_ai_agents_instrumentor.TestAiAgentsInstrumentor object at 0x7f262276c140>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
trimmed_kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
test_id = 'sdk/ai/azure-ai-projects/tests/recordings/agents/telemetry/test_ai_agents_instrumentor.pyTestAiAgentsInstrumentortest_workflow_agent_creation_with_tracing_content_recording_enabled'
variables = {}
make_combined_call = <function _make_proxy_decorator.<locals>._decorator.<locals>.record_wrap.<locals>.make_combined_call at 0x7f2621a14720>
test_variables = None, test_run = False
originals = [(<class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>, 'send', <function RequestsTransport.send at 0x7f2625c609a0>)]
owner = <class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>

    def record_wrap(*args, **kwargs):
        # ---- your existing trimming/early-exit logic ----
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
    
        # Build a wrapper factory so each patched method closes over its own original
        def make_combined_call(original_transport_func, is_httpx=False):
            def combined_call(*call_args, **call_kwargs):
                if is_httpx:
                    adjusted_args, adjusted_kwargs = _transform_httpx_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    restore_httpx_response_url(result)
                else:
                    adjusted_args, adjusted_kwargs = _transform_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    # rewrite request.url to the original upstream for LROs, etc.
                    parsed_result = url_parse.urlparse(result.request.url)
                    upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
                    upstream_uri_dict = {"scheme": upstream_uri.scheme, "netloc": upstream_uri.netloc}
                    original_target = parsed_result._replace(**upstream_uri_dict).geturl()
                    result.request.url = original_target
                return result
    
            return combined_call
    
        # Patch multiple transports and ensure restoration
        test_variables = None
        test_run = False
        originals = []
        # monkeypatch all requested transports
        for owner, name in transports:
            original = getattr(owner, name)
            # Check if this is an httpx transport by comparing with httpx transport classes
            is_httpx_transport = (
                (HTTPXTransport is not None and owner is HTTPXTransport)
                or (AsyncHTTPXTransport is not None and owner is AsyncHTTPXTransport)
                or (httpx is not None and owner.__module__.startswith("httpx"))
            )
            setattr(owner, name, make_combined_call(original, is_httpx=is_httpx_transport))
            originals.append((owner, name, original))
    
        try:
            try:
>               test_variables 
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_workflow_agent_creation_with_tracing_content_recording_enabled_with_attributes

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_workflow_agent_creation_with_tracing_content_recording_enabled_with_attributes

azure.core.exceptions.ResourceNotFoundError: Playback failure -- for help resolving, see https://aka.ms/azsdk/python/test-proxy/troubleshoot. Error details:
Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
Header differences:
    <Foundry-Features> values differ, request <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview>, record <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview>
Body differences:
Remaining Entries:
0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1

Content: {"Message":"Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\nHeader differences:\n    \u003CFoundry-Features\u003E values differ, request \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview\u003E, record \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview\u003E\nBody differences:\nRemaining Entries:\n0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\n1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1\n","Status":"NotFound"}
Raw output
args = (<test_ai_agents_instrumentor.TestAiAgentsInstrumentor object at 0x7f262276c2d0>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
trimmed_kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
test_id = 'sdk/ai/azure-ai-projects/tests/recordings/agents/telemetry/test_ai_agents_instrumentor.pyTestAiAgentsInstrumentortest_workflow_agent_creation_with_tracing_content_recording_enabled_with_attributes'
variables = {}
make_combined_call = <function _make_proxy_decorator.<locals>._decorator.<locals>.record_wrap.<locals>.make_combined_call at 0x7f261ffe62a0>
test_variables = None, test_run = False
originals = [(<class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>, 'send', <function RequestsTransport.send at 0x7f2625c609a0>)]
owner = <class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>

    def record_wrap(*args, **kwargs):
        # ---- your existing trimming/early-exit logic ----
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
    
        # Build a wrapper factory so each patched method closes over its own original
        def make_combined_call(original_transport_func, is_httpx=False):
            def combined_call(*call_args, **call_kwargs):
                if is_httpx:
                    adjusted_args, adjusted_kwargs = _transform_httpx_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    restore_httpx_response_url(result)
                else:
                    adjusted_args, adjusted_kwargs = _transform_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    # rewrite request.url to the original upstream for LROs, etc.
                    parsed_result = url_parse.urlparse(result.request.url)
                    upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
                    upstream_uri_dict = {"scheme": upstream_uri.scheme, "netloc": upstream_uri.netloc}
                    original_target = parsed_result._replace(**upstream_uri_dict).geturl()
                    result.request.url = original_target
                return result
    
            return combined_call
    
        # Patch multiple transports and ensure restoration
        test_variables = None
        test_run = False
        originals = []
        # monkeypatch all requested transports
        for owner, name in transports:
            original = getattr(owner, name)
            # Check if this is an httpx transport by comparing with httpx transport classes
            is_httpx_transport = (
                (HTTPXTransport is not None and owner is HTTPXTransport)
                or (AsyncHTTPXTransport is not None and owner is AsyncHTTPXTransport)
                or (httpx is not None and owner.__module__.startswith("httpx"))
            )
            setattr(owner, name, make_combined_call(original, is_httpx=is_httpx_transport))
            originals.append((owner, name, original))
    
        try:
            try:
>              
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_workflow_agent_creation_with_tracing_content_recording_disabled

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_workflow_agent_creation_with_tracing_content_recording_disabled

azure.core.exceptions.ResourceNotFoundError: Playback failure -- for help resolving, see https://aka.ms/azsdk/python/test-proxy/troubleshoot. Error details:
Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
Header differences:
    <Foundry-Features> values differ, request <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview>, record <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview>
Body differences:
Remaining Entries:
0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1

Content: {"Message":"Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\nHeader differences:\n    \u003CFoundry-Features\u003E values differ, request \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview\u003E, record \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview\u003E\nBody differences:\nRemaining Entries:\n0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\n1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1\n","Status":"NotFound"}
Raw output
args = (<test_ai_agents_instrumentor.TestAiAgentsInstrumentor object at 0x7f262276c370>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
trimmed_kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
test_id = 'sdk/ai/azure-ai-projects/tests/recordings/agents/telemetry/test_ai_agents_instrumentor.pyTestAiAgentsInstrumentortest_workflow_agent_creation_with_tracing_content_recording_disabled'
variables = {}
make_combined_call = <function _make_proxy_decorator.<locals>._decorator.<locals>.record_wrap.<locals>.make_combined_call at 0x7f261ffe5e40>
test_variables = None, test_run = False
originals = [(<class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>, 'send', <function RequestsTransport.send at 0x7f2625c609a0>)]
owner = <class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>

    def record_wrap(*args, **kwargs):
        # ---- your existing trimming/early-exit logic ----
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
    
        # Build a wrapper factory so each patched method closes over its own original
        def make_combined_call(original_transport_func, is_httpx=False):
            def combined_call(*call_args, **call_kwargs):
                if is_httpx:
                    adjusted_args, adjusted_kwargs = _transform_httpx_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    restore_httpx_response_url(result)
                else:
                    adjusted_args, adjusted_kwargs = _transform_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    # rewrite request.url to the original upstream for LROs, etc.
                    parsed_result = url_parse.urlparse(result.request.url)
                    upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
                    upstream_uri_dict = {"scheme": upstream_uri.scheme, "netloc": upstream_uri.netloc}
                    original_target = parsed_result._replace(**upstream_uri_dict).geturl()
                    result.request.url = original_target
                return result
    
            return combined_call
    
        # Patch multiple transports and ensure restoration
        test_variables = None
        test_run = False
        originals = []
        # monkeypatch all requested transports
        for owner, name in transports:
            original = getattr(owner, name)
            # Check if this is an httpx transport by comparing with httpx transport classes
            is_httpx_transport = (
                (HTTPXTransport is not None and owner is HTTPXTransport)
                or (AsyncHTTPXTransport is not None and owner is AsyncHTTPXTransport)
                or (httpx is not None and owner.__module__.startswith("httpx"))
            )
            setattr(owner, name, make_combined_call(original, is_httpx=is_httpx_transport))
            originals.append((owner, name, original))
    
        try:
            try:
>               test_variables
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_workflow_agent_creation_with_tracing_content_recording_disabled_with_attributes

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_workflow_agent_creation_with_tracing_content_recording_disabled_with_attributes

azure.core.exceptions.ResourceNotFoundError: Playback failure -- for help resolving, see https://aka.ms/azsdk/python/test-proxy/troubleshoot. Error details:
Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
Header differences:
    <Foundry-Features> values differ, request <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview>, record <HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview>
Body differences:
Remaining Entries:
0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1
1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1

Content: {"Message":"Unable to find a record for the request POST https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\nHeader differences:\n    \u003CFoundry-Features\u003E values differ, request \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,ExternalAgents=V1Preview\u003E, record \u003CHostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview\u003E\nBody differences:\nRemaining Entries:\n0: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions?api-version=v1\n1: https://Sanitized.services.ai.azure.com/api/projects/sanitized-project-name/agents/test-workflow-agent/versions/1?api-version=v1\n","Status":"NotFound"}
Raw output
args = (<test_ai_agents_instrumentor.TestAiAgentsInstrumentor object at 0x7f262276c7d0>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
trimmed_kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'a2a_project_connection_id': '/subscriptions/00000000-0000-0...connection', 'a2a_user_input': 'What can the secondary agent do?', 'ai_search_index_name': 'sanitized-index-name', ...}
test_id = 'sdk/ai/azure-ai-projects/tests/recordings/agents/telemetry/test_ai_agents_instrumentor.pyTestAiAgentsInstrumentortest_workflow_agent_creation_with_tracing_content_recording_disabled_with_attributes'
variables = {}
make_combined_call = <function _make_proxy_decorator.<locals>._decorator.<locals>.record_wrap.<locals>.make_combined_call at 0x7f261fdb42c0>
test_variables = None, test_run = False
originals = [(<class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>, 'send', <function RequestsTransport.send at 0x7f2625c609a0>)]
owner = <class 'azure.core.pipeline.transport._requests_basic.RequestsTransport'>

    def record_wrap(*args, **kwargs):
        # ---- your existing trimming/early-exit logic ----
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
    
        # Build a wrapper factory so each patched method closes over its own original
        def make_combined_call(original_transport_func, is_httpx=False):
            def combined_call(*call_args, **call_kwargs):
                if is_httpx:
                    adjusted_args, adjusted_kwargs = _transform_httpx_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    restore_httpx_response_url(result)
                else:
                    adjusted_args, adjusted_kwargs = _transform_args(recording_id, *call_args, **call_kwargs)
                    result = original_transport_func(*adjusted_args, **adjusted_kwargs)
                    # rewrite request.url to the original upstream for LROs, etc.
                    parsed_result = url_parse.urlparse(result.request.url)
                    upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
                    upstream_uri_dict = {"scheme": upstream_uri.scheme, "netloc": upstream_uri.netloc}
                    original_target = parsed_result._replace(**upstream_uri_dict).geturl()
                    result.request.url = original_target
                return result
    
            return combined_call
    
        # Patch multiple transports and ensure restoration
        test_variables = None
        test_run = False
        originals = []
        # monkeypatch all requested transports
        for owner, name in transports:
            original = getattr(owner, name)
            # Check if this is an httpx transport by comparing with httpx transport classes
            is_httpx_transport = (
                (HTTPXTransport is not None and owner is HTTPXTransport)
                or (AsyncHTTPXTransport is not None and owner is AsyncHTTPXTransport)
                or (httpx is not None and owner.__module__.startswith("httpx"))
            )
            setattr(owner, name, make_combined_call(original, is_httpx=is_httpx_transport))
            originals.append((owner, name, original))
    
        try:
            try:
>             
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]